aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--config/mh-darwin (renamed from config/mh-ppc-darwin)0
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac4
-rw-r--r--gcc/ChangeLog6
-rwxr-xr-xgcc/configure7
-rw-r--r--gcc/configure.ac7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/lib/plugin-support.exp22
9 files changed, 51 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e4760a..0812e34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-04 Iain Sandoe <iains@gcc.gnu.org>
+
+ * configure.ac (*-*-darwin*): Use mh-darwin for all Darwin variants.
+ * configure: Regenerate.
+ * config/mh-ppc-darwin: Rename to mh-darwin.
+
2010-11-03 Ian Lance Taylor <iant@google.com>
Dave Korn <dave.korn.cygwin@gmail.com>
diff --git a/config/mh-ppc-darwin b/config/mh-darwin
index 66f68b6..66f68b6 100644
--- a/config/mh-ppc-darwin
+++ b/config/mh-darwin
diff --git a/configure b/configure
index f3bfee2..7c313e2 100755
--- a/configure
+++ b/configure
@@ -3698,8 +3698,8 @@ fi
tentative_cc="/usr/cygnus/progressive/bin/gcc"
host_makefile_frag="config/mh-lynxrs6k"
;;
- powerpc-*-darwin*)
- host_makefile_frag="config/mh-ppc-darwin"
+ *-*-darwin*)
+ host_makefile_frag="config/mh-darwin"
;;
powerpc-*-aix*)
host_makefile_frag="config/mh-ppc-aix"
diff --git a/configure.ac b/configure.ac
index c0e7384..9b55f4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1157,8 +1157,8 @@ case "${host}" in
tentative_cc="/usr/cygnus/progressive/bin/gcc"
host_makefile_frag="config/mh-lynxrs6k"
;;
- powerpc-*-darwin*)
- host_makefile_frag="config/mh-ppc-darwin"
+ *-*-darwin*)
+ host_makefile_frag="config/mh-darwin"
;;
powerpc-*-aix*)
host_makefile_frag="config/mh-ppc-aix"
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a8d12c4..712366c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-04 Iain Sandoe <iains@gcc.gnu.org>
+
+ * gcc/configure.ac: Filter -mdynamic-no-pic from CFLAGS when testing for
+ plugin capabilities.
+ * gcc/configure: Regenerate.
+
2010-11-03 Xinliang David Li <davidxl@google.com>
PR target/46200
diff --git a/gcc/configure b/gcc/configure
index a4d8a21..e39b946 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -25956,11 +25956,15 @@ fi
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
+ saved_CFLAGS="$CFLAGS"
case "${host}" in
*-*-darwin*)
- LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+ CFLAGS="$CFLAGS -fPIC"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;;
*)
+ CFLAGS="$CFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared"
;;
esac
@@ -25991,6 +25995,7 @@ rm -f core conftest.err conftest.$ac_objext \
enable_plugin=no
fi
LDFLAGS="$saved_LDFLAGS"
+ CFLAGS="$saved_CFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index f62500d..cc40042 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4694,11 +4694,15 @@ if test x"$enable_plugin" = x"yes"; then
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
+ saved_CFLAGS="$CFLAGS"
case "${host}" in
*-*-darwin*)
- LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+ CFLAGS="$CFLAGS -fPIC"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;;
*)
+ CFLAGS="$CFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared"
;;
esac
@@ -4712,6 +4716,7 @@ if test x"$enable_plugin" = x"yes"; then
enable_plugin=no
fi
LDFLAGS="$saved_LDFLAGS"
+ CFLAGS="$saved_CFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1e27cd6..bbcf32d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-04 Iain Sandoe <iains@gcc.gnu.org>
+
+ * lib/plugin-support.exp (plugin-test-execute): Filter -mdynamic-no-pic from
+ plugin build flags on Darwin targets.
+
2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/pr46285.c: Require split_stack target.
diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp
index 9444f52..2e689a6 100644
--- a/gcc/testsuite/lib/plugin-support.exp
+++ b/gcc/testsuite/lib/plugin-support.exp
@@ -86,15 +86,29 @@ proc plugin-test-execute { plugin_src plugin_tests } {
-I${gcc_srcdir}/include -I${gcc_srcdir}/libcpp/include \
$GMPINC -I${gcc_objdir}/intl"
- set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared"
-
if { [ ishost *-*-darwin* ] } {
- set optstr [concat $optstr "-undefined dynamic_lookup"]
+ # -mdynamic-no-pic is incompatible with -fPIC.
+ set plug_cflags ""
+ foreach op $PLUGINCFLAGS {
+ if { [string compare "-mdynamic-no-pic" $op] } {
+ set plug_cflags [concat $plug_cflags " $op"]
+ }
+ }
+ set optstr "$includes"
+ foreach op $extra_flags {
+ if { [string compare "-mdynamic-no-pic" $op] } {
+ set optstr [concat $optstr " $op"]
+ }
+ }
+ set optstr [concat $optstr "-DIN_GCC -fPIC -shared -undefined dynamic_lookup"]
+ } else {
+ set plug_cflags $PLUGINCFLAGS
+ set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared"
}
# Temporarily switch to the environment for the plugin compiler.
restore_ld_library_path_env_vars
- set status [remote_exec build "$PLUGINCC $PLUGINCFLAGS $plugin_src $optstr -o $plugin_lib"]
+ set status [remote_exec build "$PLUGINCC $plug_cflags $plugin_src $optstr -o $plugin_lib"]
set status [lindex $status 0]
set_ld_library_path_env_vars