summaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authordoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 18:22:48 +0000
committerdoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 18:22:48 +0000
commit22dcc08a91f6f5edb85951a79d826f34988f1875 (patch)
treeb8fb449695248198a678ee918230c6583deb529f /gcc/configure
parent5ed26d6427fccb1a575eef8478b2ca39b5c54ba1 (diff)
downloadgcc-22dcc08a91f6f5edb85951a79d826f34988f1875.tar.gz
2010-09-09 Matthias Klose <doko@ubuntu.com>
PR bootstrap/43847 * configure.ac (--enable-plugin): Enhance for cross builds. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure65
1 files changed, 44 insertions, 21 deletions
diff --git a/gcc/configure b/gcc/configure
index ebbead293e3..e2c22a7ca47 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -25712,35 +25712,58 @@ fi
pluginlibs=
-if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
+case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+ export_sym_check="nm${exeext} -g"
+ elif x$host = x$target; then
export_sym_check="$gcc_cv_nm -g"
- ;;
- *)
+ else
+ export_sym_check=
+ fi
+ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+ elif x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
- ;;
- esac
+ else
+ export_sym_check=
+ fi
+ ;;
+esac
+
+if test x"$enable_plugin" = x"yes"; then
+
{ $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 $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 test "x$export_sym_check" != x; then
+ echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
+ ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
if $export_sym_check conftest | grep foobar > /dev/null; then
- plugin_rdynamic=yes
- pluginlibs="-rdynamic"
+ : # No need to use a flag
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
- plugin_rdynamic=no
- enable_plugin=no
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $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 $export_sym_check conftest | grep foobar > /dev/null; then
+ plugin_rdynamic=yes
+ pluginlibs="-rdynamic"
+ else
+ plugin_rdynamic=no
+ enable_plugin=no
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5
$as_echo "$plugin_rdynamic" >&6; }
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to check" >&5
+$as_echo "unable to check" >&6; }
fi
# Check -ldl