diff options
author | Jack Howarth <howarth@bromo.med.uc.edu> | 2010-04-26 20:48:35 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2010-04-26 20:48:35 +0000 |
commit | 9ec69d2ee7e74876adf6af4e50bd4686639dce05 (patch) | |
tree | 1ac670155f6c0757ae6d81e85e74118a35525058 /gcc/configure | |
parent | 920a8260a475c90750d1cd3da8024c8d8c870ca3 (diff) | |
download | gcc-9ec69d2ee7e74876adf6af4e50bd4686639dce05.zip gcc-9ec69d2ee7e74876adf6af4e50bd4686639dce05.tar.gz gcc-9ec69d2ee7e74876adf6af4e50bd4686639dce05.tar.bz2 |
re PR target/43715 (configure option --enable-plugin fails on darwin)
2010-04-26 Jack Howarth <howarth@bromo.med.uc.edu>
PR 43715
* gcc/configure.ac: Use "$gcc_cv_nm -g" on darwin
instead of "$gcc_cv_objdump -T".
Use "-undefined dynamic_lookup" on darwin.
From-SVN: r158748
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/configure b/gcc/configure index 53f5eb8..fc4013b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -25276,17 +25276,25 @@ fi pluginlibs= if test x"$enable_plugin" = x"yes"; then + case "${host}" in + *-*-darwin*) + export_sym_check="$gcc_cv_nm -g" + ;; + *) + export_sym_check="$gcc_cv_objdump -T" + ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5 $as_echo_n "checking for exported symbols... " >&6; } echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then + if $export_sym_check conftest | grep foobar > /dev/null; then : # No need to use a flag else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5 $as_echo_n "checking for -rdynamic... " >&6; } ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then + if $export_sym_check conftest | grep foobar > /dev/null; then plugin_rdynamic=yes pluginlibs="-rdynamic" else @@ -25362,7 +25370,14 @@ fi # Check that we can build shared objects with -fPIC -shared saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -fPIC -shared" + case "${host}" in + *-*-darwin*) + LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup" + ;; + *) + LDFLAGS="$LDFLAGS -fPIC -shared" + ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 $as_echo_n "checking for -fPIC -shared... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext |