Commit 709e26f0 by Matthias Klose Committed by Matthias Klose

re PR bootstrap/43847 (test for plugin is using wrong objdump for host != target)

2010-09-09  Matthias Klose  <doko@ubuntu.com>

        PR bootstrap/43847
        * configure.ac (--enable-plugin): Enhance for cross builds.
        * configure: Regenerate.

From-SVN: r164113
parent 99da3840
2010-09-09 Matthias Klose <doko@ubuntu.com>
PR bootstrap/43847
* configure.ac (--enable-plugin): Enhance for cross builds.
* configure: Regenerate.
2010-09-09 Jan Hubicka <jh@suse.cz>
PR tree-optimization/45598
......
......@@ -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
......
......@@ -4639,32 +4639,52 @@ enable_plugin=$enableval,
enable_plugin=yes; default_plugin=yes)
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
AC_MSG_CHECKING([for exported symbols])
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
AC_MSG_CHECKING([for -rdynamic])
${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
AC_MSG_RESULT([yes])
else
plugin_rdynamic=no
enable_plugin=no
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for -rdynamic])
${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
AC_MSG_RESULT([$plugin_rdynamic])
fi
AC_MSG_RESULT([$plugin_rdynamic])
else
AC_MSG_RESULT([unable to check])
fi
# Check -ldl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment