[llvm-commits] [llvm] r52682 - in /llvm/trunk: Makefile.rules include/llvm/System/Solaris.h utils/GenLibDeps.pl
Chris Lattner
sabre at nondot.org
Tue Jun 24 10:44:43 PDT 2008
Author: lattner
Date: Tue Jun 24 12:44:42 2008
New Revision: 52682
URL: http://llvm.org/viewvc/llvm-project?rev=52682&view=rev
Log:
Add support for building on solaris, working around namespace
polution problems from system headers. Patch by Nathan Keynes!
Added:
llvm/trunk/include/llvm/System/Solaris.h
Modified:
llvm/trunk/Makefile.rules
llvm/trunk/utils/GenLibDeps.pl
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=52682&r1=52681&r2=52682&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Jun 24 12:44:42 2008
@@ -451,6 +451,10 @@
DISABLE_AUTO_DEPENDENCIES=1
endif
+ifeq ($(OS),SunOS)
+CPP.BaseFlags += -include llvm/System/Solaris.h
+endif
+
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
# All -I flags should go here, so that they don't confuse llvm-config.
Added: llvm/trunk/include/llvm/System/Solaris.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Solaris.h?rev=52682&view=auto
==============================================================================
--- llvm/trunk/include/llvm/System/Solaris.h (added)
+++ llvm/trunk/include/llvm/System/Solaris.h Tue Jun 24 12:44:42 2008
@@ -0,0 +1,40 @@
+/*===- llvm/System/Solaris.h ------------------------------------*- C++ -*-===*
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===*
+ *
+ * This file contains portability fixes for Solaris hosts.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_SYSTEM_SOLARIS_H
+#define LLVM_SYSTEM_SOLARIS_H
+
+#include <sys/types.h>
+#include <sys/regset.h>
+
+#undef CS
+#undef DS
+#undef ES
+#undef FS
+#undef GS
+#undef SS
+#undef EAX
+#undef ECX
+#undef EDX
+#undef EBX
+#undef ESP
+#undef EBP
+#undef ESI
+#undef EDI
+#undef EIP
+#undef UESP
+#undef EFL
+#undef ERR
+#undef TRAPNO
+
+#endif
Modified: llvm/trunk/utils/GenLibDeps.pl
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/GenLibDeps.pl?rev=52682&r1=52681&r2=52682&view=diff
==============================================================================
--- llvm/trunk/utils/GenLibDeps.pl (original)
+++ llvm/trunk/utils/GenLibDeps.pl Tue Jun 24 12:44:42 2008
@@ -96,7 +96,7 @@
print " <dt><b>$lib</b</dt><dd><ul>\n";
}
open UNDEFS,
- "$nmPath -g -u $Directory/$lib | sed -e 's/^ *U //' | sort | uniq |";
+ "$nmPath -g -u $Directory/$lib | sed -e 's/^[ 0]* U //' | sort | uniq |";
my %DepLibs;
while (<UNDEFS>) {
chomp;
More information about the llvm-commits
mailing list