From 16a3a73508e8109e453e35288c37fe545a8ab59e Mon Sep 17 00:00:00 2001 From: Patrick Welche Date: Thu, 28 Jul 2016 17:26:10 +0100 Subject: [PATCH 1/2] cmELF: Port to SCO OpenServer 5.0.7/3.2 Take changes used by pkgsrc [1]: * SCO OpenServer 5.0.7/3.2 does not support 64-bit ELF. [1] http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/cmake/patches/ --- Source/cmELF.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 15755cbc6..266b78636 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -46,6 +46,9 @@ typedef struct Elf32_Rela Elf32_Rela; #if defined(__sun) #include // For dynamic section information #endif +#ifdef _SCO_DS +#include // For DT_SONAME etc. +#endif // Low-level byte swapping implementation. template @@ -214,6 +217,7 @@ struct cmELFTypes32 }; // Configure the implementation template for 64-bit ELF files. +#ifndef _SCO_DS struct cmELFTypes64 { typedef Elf64_Ehdr ELF_Ehdr; @@ -223,6 +227,7 @@ struct cmELFTypes64 typedef KWIML_INT_uint64_t tagtype; static const char* GetName() { return "64-bit"; } }; +#endif // Parser implementation template. template @@ -800,10 +805,14 @@ cmELF::cmELF(const char* fname) if (ident[EI_CLASS] == ELFCLASS32) { // 32-bit ELF this->Internal = new cmELFInternalImpl(this, fin, order); - } else if (ident[EI_CLASS] == ELFCLASS64) { + } +#ifndef _SCO_DS + else if (ident[EI_CLASS] == ELFCLASS64) { // 64-bit ELF this->Internal = new cmELFInternalImpl(this, fin, order); - } else { + } +#endif + else { this->ErrorMessage = "ELF file class is not 32-bit or 64-bit."; return; } From 56539d89da4f8f0834a17faee14ef88f3b232048 Mon Sep 17 00:00:00 2001 From: Patrick Welche Date: Thu, 28 Jul 2016 17:26:10 +0100 Subject: [PATCH 2/2] SCO_SV: Enable so filename versioning Take changes used by pkgsrc [1]: * so filename versioning requires CMAKE_SHARED_LIBRARY_SONAME_C_FLAG. [1] http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/cmake/patches/ --- Modules/Platform/SCO_SV.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake index ddd960083..1cb4b38a2 100644 --- a/Modules/Platform/SCO_SV.cmake +++ b/Modules/Platform/SCO_SV.cmake @@ -1,2 +1,3 @@ set(CMAKE_DL_LIBS "") +set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h,") include(Platform/UnixPaths)