[llvm-commits] [llvm-gcc-4.2] r137183 - in /llvm-gcc-4.2/trunk: config/mh-x86-darwin configure configure.in gcc/Makefile.in
Eric Christopher
echristo at apple.com
Tue Aug 9 16:45:56 PDT 2011
Author: echristo
Date: Tue Aug 9 18:45:56 2011
New Revision: 137183
URL: http://llvm.org/viewvc/llvm-project?rev=137183&view=rev
Log:
Allow llvm-gcc to build with clang for darwin. For hosts that have gcc
compatible compilers this should work in general.
Modified:
llvm-gcc-4.2/trunk/config/mh-x86-darwin
llvm-gcc-4.2/trunk/configure
llvm-gcc-4.2/trunk/configure.in
llvm-gcc-4.2/trunk/gcc/Makefile.in
Modified: llvm-gcc-4.2/trunk/config/mh-x86-darwin
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/config/mh-x86-darwin?rev=137183&r1=137182&r2=137183&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/config/mh-x86-darwin (original)
+++ llvm-gcc-4.2/trunk/config/mh-x86-darwin Tue Aug 9 18:45:56 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/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/configure?rev=137183&r1=137182&r2=137183&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/configure (original)
+++ llvm-gcc-4.2/trunk/configure Tue Aug 9 18:45:56 2011
@@ -7405,6 +7405,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
@@ -7416,9 +7420,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:7420: checking whether -fkeep-inline-functions is supported" >&5
+echo "configure:7424: checking whether -fkeep-inline-functions is supported" >&5
cat > conftest.$ac_ext <<EOF
-#line 7422 "configure"
+#line 7426 "configure"
#include "confdefs.h"
#if (__GNUC__ < 3) \
@@ -7431,7 +7435,7 @@
; return 0; }
EOF
-if { (eval echo configure:7435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7439: \"$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/trunk/configure.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/configure.in?rev=137183&r1=137182&r2=137183&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/configure.in (original)
+++ llvm-gcc-4.2/trunk/configure.in Tue Aug 9 18:45:56 2011
@@ -2462,6 +2462,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/trunk/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=137183&r1=137182&r2=137183&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/trunk/gcc/Makefile.in Tue Aug 9 18:45:56 2011
@@ -965,8 +965,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 += -DTARGET_CANONICAL_NAME=\"$(target)\"
ALL_CXXFLAGS += -frandom-seed=0
More information about the llvm-commits
mailing list