llvm.org GIT mirror llvm / 58a4c5e
Add support for building on solaris, working around namespace polution problems from system headers. Patch by Nathan Keynes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52682 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
3 changed file(s) with 45 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
448448
449449 # Building universal cannot compute dependencies automatically.
450450 DISABLE_AUTO_DEPENDENCIES=1
451 endif
452
453 ifeq ($(OS),SunOS)
454 CPP.BaseFlags += -include llvm/System/Solaris.h
451455 endif
452456
453457 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
0 /*===- llvm/System/Solaris.h ------------------------------------*- C++ -*-===*
1 *
2 * The LLVM Compiler Infrastructure
3 *
4 * This file is distributed under the University of Illinois Open Source
5 * License. See LICENSE.TXT for details.
6 *
7 *===----------------------------------------------------------------------===*
8 *
9 * This file contains portability fixes for Solaris hosts.
10 *
11 *===----------------------------------------------------------------------===*/
12
13 #ifndef LLVM_SYSTEM_SOLARIS_H
14 #define LLVM_SYSTEM_SOLARIS_H
15
16 #include
17 #include
18
19 #undef CS
20 #undef DS
21 #undef ES
22 #undef FS
23 #undef GS
24 #undef SS
25 #undef EAX
26 #undef ECX
27 #undef EDX
28 #undef EBX
29 #undef ESP
30 #undef EBP
31 #undef ESI
32 #undef EDI
33 #undef EIP
34 #undef UESP
35 #undef EFL
36 #undef ERR
37 #undef TRAPNO
38
39 #endif
9595 print "
$lib
    \n";
9696 }
9797 open UNDEFS,
98 "$nmPath -g -u $Directory/$lib | sed -e 's/^ *U //' | sort | uniq |";
98 "$nmPath -g -u $Directory/$lib | sed -e 's/^[ 0]* U //' | sort | uniq |";
9999 my %DepLibs;
100100 while () {
101101 chomp;