Merge topic 'port-to-sco'

56539d89 SCO_SV: Enable so filename versioning
16a3a735 cmELF: Port to SCO OpenServer 5.0.7/3.2
This commit is contained in:
Brad King 2016-08-03 09:20:47 -04:00 committed by CMake Topic Stage
commit ec807f6edf
2 changed files with 12 additions and 2 deletions

View File

@ -1,2 +1,3 @@
set(CMAKE_DL_LIBS "") set(CMAKE_DL_LIBS "")
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h,")
include(Platform/UnixPaths) include(Platform/UnixPaths)

View File

@ -46,6 +46,9 @@ typedef struct Elf32_Rela Elf32_Rela;
#if defined(__sun) #if defined(__sun)
#include <sys/link.h> // For dynamic section information #include <sys/link.h> // For dynamic section information
#endif #endif
#ifdef _SCO_DS
#include <link.h> // For DT_SONAME etc.
#endif
// Low-level byte swapping implementation. // Low-level byte swapping implementation.
template <size_t s> template <size_t s>
@ -214,6 +217,7 @@ struct cmELFTypes32
}; };
// Configure the implementation template for 64-bit ELF files. // Configure the implementation template for 64-bit ELF files.
#ifndef _SCO_DS
struct cmELFTypes64 struct cmELFTypes64
{ {
typedef Elf64_Ehdr ELF_Ehdr; typedef Elf64_Ehdr ELF_Ehdr;
@ -223,6 +227,7 @@ struct cmELFTypes64
typedef KWIML_INT_uint64_t tagtype; typedef KWIML_INT_uint64_t tagtype;
static const char* GetName() { return "64-bit"; } static const char* GetName() { return "64-bit"; }
}; };
#endif
// Parser implementation template. // Parser implementation template.
template <class Types> template <class Types>
@ -800,10 +805,14 @@ cmELF::cmELF(const char* fname)
if (ident[EI_CLASS] == ELFCLASS32) { if (ident[EI_CLASS] == ELFCLASS32) {
// 32-bit ELF // 32-bit ELF
this->Internal = new cmELFInternalImpl<cmELFTypes32>(this, fin, order); this->Internal = new cmELFInternalImpl<cmELFTypes32>(this, fin, order);
} else if (ident[EI_CLASS] == ELFCLASS64) { }
#ifndef _SCO_DS
else if (ident[EI_CLASS] == ELFCLASS64) {
// 64-bit ELF // 64-bit ELF
this->Internal = new cmELFInternalImpl<cmELFTypes64>(this, fin, order); this->Internal = new cmELFInternalImpl<cmELFTypes64>(this, fin, order);
} else { }
#endif
else {
this->ErrorMessage = "ELF file class is not 32-bit or 64-bit."; this->ErrorMessage = "ELF file class is not 32-bit or 64-bit.";
return; return;
} }