Transplant a piece of gcc/configure.ac to set gcc_cv_objdump properly so that GCC_ENABLE_PLUGINS macro from config/gcc-plugin.m4 doesn't set export_sym_check to " -T". Regenerate libcc1/configure. --- libcc1/configure | 64 +++++++++++++++++++++++++++++++++++++++++++-- libcc1/configure.ac | 16 ++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-)
diff --git a/libcc1/configure b/libcc1/configure index ea689a353c8..06ce86846ed 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -637,6 +637,7 @@ ENABLE_PLUGIN_FALSE ENABLE_PLUGIN_TRUE DARWIN_DYNAMIC_LOOKUP_FALSE DARWIN_DYNAMIC_LOOKUP_TRUE +gcc_cv_objdump libsuffix GMPINC WERROR @@ -10890,7 +10891,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10893 "configure" +#line 10894 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10996,7 +10997,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10999 "configure" +#line 11000 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15051,6 +15052,65 @@ if test "$GXX" = yes; then fi +# Figure out what objdump we will be using. +gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/libcc1$,,'`/binutils +if ${gcc_cv_objdump+:} false; then : + +else + +if test -f $gcc_cv_binutils_srcdir/configure.ac \ + && test -f ../binutils/Makefile \ + && test x$build = x$host; then + # Single tree build which includes binutils. + gcc_cv_objdump=../binutils/objdump$build_exeext +elif test -x objdump$build_exeext; then + gcc_cv_objdump=./objdump$build_exeext +elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $2 ); then + gcc_cv_objdump="$OBJDUMP_FOR_TARGET" +else + # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. +set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_gcc_cv_objdump+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $gcc_cv_objdump in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump +if test -n "$gcc_cv_objdump"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5 +$as_echo "$gcc_cv_objdump" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket libraries" >&5 $as_echo_n "checking for socket libraries... " >&6; } if ${libcc1_cv_lib_sockets+:} false; then : diff --git a/libcc1/configure.ac b/libcc1/configure.ac index 87f157568e8..9651b7c6bc9 100644 --- a/libcc1/configure.ac +++ b/libcc1/configure.ac @@ -74,6 +74,22 @@ if test "$GXX" = yes; then fi AC_SUBST(libsuffix) +# Figure out what objdump we will be using. +gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/libcc1$,,'`/binutils +AS_VAR_SET_IF(gcc_cv_objdump,, [ +if test -f $gcc_cv_binutils_srcdir/configure.ac \ + && test -f ../binutils/Makefile \ + && test x$build = x$host; then + # Single tree build which includes binutils. + gcc_cv_objdump=../binutils/objdump$build_exeext +elif test -x objdump$build_exeext; then + gcc_cv_objdump=./objdump$build_exeext +elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $[2] ); then + gcc_cv_objdump="$OBJDUMP_FOR_TARGET" +else + AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) +fi]) + dnl Test for -lsocket and -lnsl. Copied from libgo/configure.ac. AC_CACHE_CHECK([for socket libraries], libcc1_cv_lib_sockets, [libcc1_cv_lib_sockets= -- 2.39.5