File tree 4 files changed +17
-19
lines changed
4 files changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -804,7 +804,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
804
804
endif (${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)" )
805
805
806
806
if ( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
807
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h" )
807
+ # special hack for Solaris to handle crazy system sys/regset.h
808
+ include_directories ("${LLVM_MAIN_INCLUDE_DIR} /llvm/Support/Solaris" )
808
809
endif ( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
809
810
810
811
# Make sure we don't get -rdynamic in every binary. For those that need it,
Original file line number Diff line number Diff line change 21
21
#include < endian.h>
22
22
#elif defined(_AIX)
23
23
#include < sys/machine.h>
24
+ #elif defined(__sun)
25
+ /* Solaris provides _BIG_ENDIAN/_LITTLE_ENDIAN selector in sys/types.h */
26
+ #include < sys/types.h>
27
+ #define BIG_ENDIAN 4321
28
+ #define LITTLE_ENDIAN 1234
29
+ #if defined(_BIG_ENDIAN)
30
+ #define BYTE_ORDER BIG_ENDIAN
31
+ #else
32
+ #define BYTE_ORDER LITTLE_ENDIAN
33
+ #endif
24
34
#else
25
35
#if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
26
36
#include < machine/endian.h>
Original file line number Diff line number Diff line change 1
- /* ===- llvm/Support/Solaris.h ------------ ------------------------*- C++ -*-===*
1
+ /* ===- llvm/Support/Solaris/sys/regset .h ------------------------*- C++ -*-===*
2
2
*
3
3
* The LLVM Compiler Infrastructure
4
4
*
7
7
*
8
8
*===----------------------------------------------------------------------===*
9
9
*
10
- * This file contains portability fixes for Solaris hosts.
10
+ * This file works around excessive name space pollution from the system header
11
+ * on Solaris hosts.
11
12
*
12
13
*===----------------------------------------------------------------------===*/
13
14
14
- #ifndef LLVM_SUPPORT_SOLARIS_H
15
- #define LLVM_SUPPORT_SOLARIS_H
15
+ #ifndef LLVM_SUPPORT_SOLARIS_SYS_REGSET_H
16
16
17
- #include < sys/regset.h>
18
- #include < sys/types.h>
19
-
20
- /* Solaris doesn't have endian.h. SPARC is the only supported big-endian ISA. */
21
- #define BIG_ENDIAN 4321
22
- #define LITTLE_ENDIAN 1234
23
- #if defined(__sparc) || defined(__sparc__)
24
- #define BYTE_ORDER BIG_ENDIAN
25
- #else
26
- #define BYTE_ORDER LITTLE_ENDIAN
27
- #endif
17
+ #include_next <sys/regset.h>
28
18
29
19
#undef CS
30
20
#undef DS
Original file line number Diff line number Diff line change @@ -275,9 +275,6 @@ module LLVM_Utils {
275
275
umbrella "Support"
276
276
module * { export * }
277
277
278
- // Exclude this; it's only included on Solaris.
279
- exclude header "Support/Solaris.h"
280
-
281
278
// Exclude this; it's fundamentally non-modular.
282
279
exclude header "Support/PluginLoader.h"
283
280
You can’t perform that action at this time.
0 commit comments