[llvm-branch-commits] [llvm-gcc-branch] r137181 - in /llvm-gcc-4.2/branches/Apple/Morbo: config/mh-x86-darwin configure configure.in gcc/Makefile.in

Eric Christopher echristo at apple.com
Tue Aug 9 16:37:51 PDT 2011


Author: echristo
Date: Tue Aug  9 18:37:51 2011
New Revision: 137181

URL: http://llvm.org/viewvc/llvm-project?rev=137181&view=rev
Log:
Add some hackery to allow llvm-gcc to build with clang on darwin. Similar
constructs should work for linux.

Modified:
    llvm-gcc-4.2/branches/Apple/Morbo/config/mh-x86-darwin
    llvm-gcc-4.2/branches/Apple/Morbo/configure
    llvm-gcc-4.2/branches/Apple/Morbo/configure.in
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/Makefile.in

Modified: llvm-gcc-4.2/branches/Apple/Morbo/config/mh-x86-darwin
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/config/mh-x86-darwin?rev=137181&r1=137180&r2=137181&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/config/mh-x86-darwin (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/config/mh-x86-darwin Tue Aug  9 18:37:51 2011
@@ -2,7 +2,7 @@
 # The -mdynamic-no-pic ensures that the compiler executable is built without
 # position-independent-code -- the usual default on Darwin.
 
-BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
+BOOT_CFLAGS=-g -O2 -mdynamic-no-pic -std=gnu89
 
 # LLVM LOCAL
 # For hosts after darwin10 we want to pass in -no-pie

Modified: llvm-gcc-4.2/branches/Apple/Morbo/configure
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/configure?rev=137181&r1=137180&r2=137181&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/configure (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/configure Tue Aug  9 18:37:51 2011
@@ -7400,6 +7400,10 @@
     # that too.
     stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
     ;;
+  *-*-darwin*)
+    # -std=gnu89 never hurt
+    stage1_cflags="-g -std=gnu89"
+    ;;
 esac
 
 # LLVM LOCAL begin - LLVM uses inlined functions
@@ -7411,9 +7415,9 @@
   # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
   CFLAGS="$CFLAGS -fkeep-inline-functions"
   echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
-echo "configure:7415: checking whether -fkeep-inline-functions is supported" >&5
+echo "configure:7419: checking whether -fkeep-inline-functions is supported" >&5
   cat > conftest.$ac_ext <<EOF
-#line 7417 "configure"
+#line 7421 "configure"
 #include "confdefs.h"
 
 #if (__GNUC__ < 3) \
@@ -7426,7 +7430,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
 else

Modified: llvm-gcc-4.2/branches/Apple/Morbo/configure.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/configure.in?rev=137181&r1=137180&r2=137181&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/configure.in (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/configure.in Tue Aug  9 18:37:51 2011
@@ -2457,6 +2457,10 @@
     # that too.
     stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
     ;;
+  *-*-darwin*)
+    # -std=gnu89 never hurt
+    stage1_cflags="-g -std=gnu89"
+    ;;
 esac
 
 # LLVM LOCAL begin - LLVM uses inlined functions

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/Makefile.in?rev=137181&r1=137180&r2=137181&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/Makefile.in Tue Aug  9 18:37:51 2011
@@ -962,8 +962,11 @@
 
 # LLVM LOCAL begin
 # Disable C-only warning flags if they are present.
-ALL_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes \
-                            -Wold-style-definition -Wno-overlength-strings, $(ALL_CFLAGS)) -Wno-unused
+ALL_CXXFLAGS = $(filter-out -std=gnu89 \
+			    -Werror  -Wstrict-prototypes  \
+			    -Wmissing-prototypes \
+                            -Wold-style-definition -Wno-overlength-strings, \
+		$(ALL_CFLAGS)) -Wno-unused
 ALL_CXXFLAGS += -DTARGET_NAME=\"$(target_noncanonical)\"
 ALL_CXXFLAGS += -frandom-seed=0
 





More information about the llvm-branch-commits mailing list