From 87b6078fc212ccba5f043399c6370ee20f6b355a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 3 Nov 2025 10:59:50 +1030 Subject: [PATCH] tidy m4 plugin config support In CLANG_PLUGIN_FILE it is possible for plugin_file to be non-NULL when LLVMgold.so does not exist. configure output is messy, with results not printed against their "checking.." line, eg. checking for clang... (cached) yes checking for clang plugin file... checking for x86_64-pc-linux-gnu-ar... (cached) ar --plugin /usr/lib/llvm-20/lib/clang/20/../../LLVMgold.so /usr/lib/llvm-20/lib/clang/20/../../LLVMgold.so This patch fixes those problems, and a similar interposition of other configure output between AC_MSG_CHECKING and AC_MSG_RESULT in gcc-plugin.m4. It also tidies some of the message text, and makes similar code in gcc-plugin.m4 and clang-plugin.m4 a little more consistent. config/ * clang-plugin.m4 (CLANG_PLUGIN_FILE): Don't place checks for tools (llvm-config, ar) inside AC_MSG_CHECKING..AC_MSG_RESULT for clang plugin file. Clear plugin_file before loop exit. (CLANG_PLUGIN_FILE_FOR_TARGET): Similarly. * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Similarly. (GCC_PLUGIN_OPTION_FOR_TARGET): Correct AC_MSG_CHECKING. Tidy return code. binutils/ * testsuite/lib/binutils-common.exp : Set for non-native. * configure: Regenerate. / * configure: Regenerate. bfd/ * configure: Regenerate. gas/ * configure: Regenerate. gdb/ * configure: Regenerate. gprof/ * configure: Regenerate. gprofng/ * configure: Regenerate. * libcollector/configure: Regenerate. ld/ * configure: Regenerate. libbacktrace/ * configure: Regenerate. libctf/ * configure: Regenerate. libiberty/ * configure: Regenerate. libsframe/ * configure: Regenerate. opcodes/ * configure: Regenerate. sim/ * configure: Regenerate. zlib/ * configure: Regenerate. --- bfd/configure | 129 ++++++++------- binutils/configure | 129 ++++++++------- binutils/testsuite/lib/binutils-common.exp | 29 ++-- config/clang-plugin.m4 | 77 +++++---- config/gcc-plugin.m4 | 43 +++-- configure | 176 ++++++++++----------- gas/configure | 129 ++++++++------- gdb/configure | 126 +++++++-------- gprof/configure | 129 ++++++++------- gprofng/configure | 126 +++++++-------- gprofng/libcollector/configure | 126 +++++++-------- ld/configure | 129 ++++++++------- libbacktrace/configure | 129 ++++++++------- libctf/configure | 129 ++++++++------- libiberty/configure | 125 ++++++++------- libsframe/configure | 129 ++++++++------- opcodes/configure | 129 ++++++++------- sim/configure | 129 ++++++++------- zlib/configure | 129 ++++++++------- 19 files changed, 1112 insertions(+), 1135 deletions(-) diff --git a/bfd/configure b/bfd/configure index d07f9e926e4..d9d77b7004c 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6230,15 +6230,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6330,22 +6322,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6437,42 +6438,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6564,25 +6549,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11528,7 +11527,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11531 "configure" +#line 11530 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11634,7 +11633,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11637 "configure" +#line 11636 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/binutils/configure b/binutils/configure index b1c38b4a076..214fddb0340 100755 --- a/binutils/configure +++ b/binutils/configure @@ -6127,15 +6127,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6227,22 +6219,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6334,42 +6335,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6461,25 +6446,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11456,7 +11455,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11459 "configure" +#line 11458 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11562,7 +11561,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11565 "configure" +#line 11564 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index fb12607303f..edde241024a 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -1824,21 +1824,20 @@ if { [isnative] } then { set CLANG_FOR_TARGET clang } } - if [info exists CLANG_FOR_TARGET] then { - set llvm_plug_so [string trim [exec $CLANG_FOR_TARGET -print-file-name=LLVMgold.so]] - if { $llvm_plug_so ne "LLVMgold.so" } then { - set llvm_plug_opt "--plugin $llvm_plug_so" - } - - if { $llvm_plug_opt eq "" } then { - # If it is still blank, try llvm-config --libdir. Clang - # searches CLANG_INSTALL_LIBDIR_BASENAME which corresponds - # to this. - catch "exec llvm-config --libdir" got - if {[file isdirectory $got] \ - && [file isfile $got/LLVMgold.so]} then { - set llvm_plug_opt "--plugin $got/LLVMgold.so" - } +} +if [info exists CLANG_FOR_TARGET] then { + set llvm_plug_so [string trim [exec $CLANG_FOR_TARGET -print-file-name=LLVMgold.so]] + if { $llvm_plug_so ne "LLVMgold.so" } then { + set llvm_plug_opt "--plugin $llvm_plug_so" + } + if { $llvm_plug_opt eq "" && [isnative] } then { + # If it is still blank, try llvm-config --libdir. Clang + # searches CLANG_INSTALL_LIBDIR_BASENAME which corresponds + # to this. + catch "exec llvm-config --libdir" got + if {[file isdirectory $got] \ + && [file isfile $got/LLVMgold.so]} then { + set llvm_plug_opt "--plugin $got/LLVMgold.so" } } } diff --git a/config/clang-plugin.m4 b/config/clang-plugin.m4 index cc051fe48e3..e94c4bbb6be 100644 --- a/config/clang-plugin.m4 +++ b/config/clang-plugin.m4 @@ -20,43 +20,42 @@ AC_DEFUN([CLANG_PLUGIN_FILE],[dnl yes #endif ], clang_cv_is_clang=yes, clang_cv_is_clang=no)]) + AC_CHECK_TOOL(LLVM_CONFIG, llvm-config) plugin_file= if test $clang_cv_is_clang = yes; then AC_MSG_CHECKING([for clang plugin file]) plugin_names="LLVMgold.so" for plugin in $plugin_names; do plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - AC_CHECK_TOOL(LLVM_CONFIG, llvm-config) - if test "$?" != 0; then - AC_MSG_ERROR([Required tool 'llvm-config' not found on PATH.]) - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi - done - if test -z $plugin_file; then - AC_MSG_ERROR([Couldn't find clang plugin file for $CC.]) - fi - dnl Check if ${AR} $plugin_option rc works. - AC_CHECK_TOOL(AR, ar) - if test "${AR}" = "" ; then - AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - AC_MSG_WARN([Failed: $AR $plugin_option rc]) plugin_file= + done + if test -z "$plugin_file"; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT($plugin_file) + dnl Check if ${AR} $plugin_option rc works. + AC_CHECK_TOOL(AR, ar) + if test -z "${AR}"; then + AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - AC_MSG_RESULT($plugin_file) fi $1="$plugin_file" ]) @@ -84,30 +83,26 @@ AC_DEFUN([CLANG_PLUGIN_FILE_FOR_TARGET],[dnl CC="$saved_CC" plugin_file= if test $clang_target_cv_working = yes; then + GCC_TARGET_TOOL(llvm-config, LLVM_CONFIG_FOR_TARGET, LLVM_CONFIG) AC_MSG_CHECKING([for clang plugin file for target]) plugin_names="LLVMgold.so" - dnl Check if the host compiler is used. for plugin in $plugin_names; do plugin_file=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - GCC_TARGET_TOOL(llvm-config, LLVM_CONFIG_FOR_TARGET, LLVM_CONFIG) - if test "$?" != 0; then - AC_MSG_ERROR([Required target tool 'llvm-config' not found.]) - fi - clang_lib_dir=`$LLVM_CONFIG_FOR_TARGET --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - fi - if test x$plugin_file != x$plugin; then + if test "$plugin_file" != "$plugin"; then break; fi + if test -n "${LLVM_CONFIG_FOR_TARGET}"; then + plugin_file=`${LLVM_CONFIG_FOR_TARGET} --libdir`/$plugin + if test -f "$plugin_file"; then + break; + fi + fi plugin_file= done - if test -n $plugin_file; then - AC_MSG_RESULT($plugin_file) - else + if test -z "$plugin_file"; then AC_MSG_RESULT([no]) + else + AC_MSG_RESULT($plugin_file) fi fi $1="$plugin_file" diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 0382147b381..fbccba4a473 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -136,8 +136,11 @@ dnl GCC_PLUGIN_OPTION dnl (SHELL-CODE_HANDLER) dnl AC_DEFUN([GCC_PLUGIN_OPTION],[dnl +AC_CHECK_TOOL(AR, ar) +if test -z "${AR}"; then + AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) +fi AC_MSG_CHECKING([for -plugin option]) - plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" plugin_option= for plugin in $plugin_names; do @@ -150,24 +153,20 @@ for plugin in $plugin_names; do break fi done -dnl Check if ${AR} $plugin_option rc works. -AC_CHECK_TOOL(AR, ar) -if test "${AR}" = "" ; then - AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) -fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - AC_MSG_WARN([Failed: $AR $plugin_option rc]) - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - $1="$plugin_option" - AC_MSG_RESULT($plugin_option) -else +if test -z "$plugin_option"; then AC_MSG_RESULT([no]) +else + AC_MSG_RESULT($plugin_option) + dnl Check if ${AR} $plugin_option rc works. + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + plugin_option= + fi + rm -f conftest.* fi +$1="$plugin_option" ]) dnl @@ -190,7 +189,7 @@ AC_CACHE_CHECK([for gcc for target], gcc_target_cv_working, [ gcc_target_cv_working=yes, gcc_target_cv_working=no)]) CC="$saved_CC" -AC_MSG_CHECKING([for -plugin option]) +AC_MSG_CHECKING([for target -plugin option]) plugin_option= if test $gcc_target_cv_working = yes; then plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" @@ -205,10 +204,10 @@ if test $gcc_target_cv_working = yes; then fi done fi -if test -n "$plugin_option"; then - $1="$plugin_option" - AC_MSG_RESULT($plugin_option) -else +if test -z "$plugin_option"; then AC_MSG_RESULT([no]) +else + AC_MSG_RESULT($plugin_option) fi +$1="$plugin_option" ]) diff --git a/configure b/configure index 54b71af5d3b..673c6728604 100755 --- a/configure +++ b/configure @@ -14560,15 +14560,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -14660,22 +14652,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -14767,42 +14768,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi PLUGIN_FILE="$plugin_file" if test -n "$PLUGIN_FILE"; then PLUGIN_OPTION="--plugin $PLUGIN_FILE" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -14894,25 +14879,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - PLUGIN_OPTION="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +PLUGIN_OPTION="$plugin_option" fi AR_PLUGIN_OPTION= @@ -20637,13 +20636,7 @@ $as_echo "$clang_target_cv_working" >&6; } CC="$saved_CC" plugin_file= if test $clang_target_cv_working = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file for target" >&5 -$as_echo_n "checking for clang plugin file for target... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target llvm-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target llvm-config" >&5 $as_echo_n "checking where to find the target llvm-config... " >&6; } if test "x${build}" != "x${host}" ; then if expr "x$LLVM_CONFIG_FOR_TARGET" : "x/" > /dev/null; then @@ -20674,25 +20667,28 @@ $as_echo "pre-installed" >&6; } fi fi - if test "$?" != 0; then - as_fn_error $? "Required target tool 'llvm-config' not found." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG_FOR_TARGET --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - fi - if test x$plugin_file != x$plugin; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file for target" >&5 +$as_echo_n "checking for clang plugin file for target... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then break; fi + if test -n "${LLVM_CONFIG_FOR_TARGET}"; then + plugin_file=`${LLVM_CONFIG_FOR_TARGET} --libdir`/$plugin + if test -f "$plugin_file"; then + break; + fi + fi plugin_file= done - if test -n $plugin_file; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } - else + if test -z "$plugin_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } fi fi PLUGIN_FILE_FOR_TARGET="$plugin_file" @@ -20733,8 +20729,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_target_cv_working" >&5 $as_echo "$gcc_target_cv_working" >&6; } CC="$saved_CC" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target -plugin option" >&5 +$as_echo_n "checking for target -plugin option... " >&6; } plugin_option= if test $gcc_target_cv_working = yes; then plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" @@ -20749,14 +20745,14 @@ if test $gcc_target_cv_working = yes; then fi done fi -if test -n "$plugin_option"; then - PLUGIN_OPTION_FOR_TARGET="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } fi +PLUGIN_OPTION_FOR_TARGET="$plugin_option" fi if test -n "$PLUGIN_OPTION_FOR_TARGET"; then diff --git a/gas/configure b/gas/configure index f2cdd77b1fb..104fdb109dd 100755 --- a/gas/configure +++ b/gas/configure @@ -5825,15 +5825,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5925,22 +5917,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6032,42 +6033,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6159,25 +6144,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11154,7 +11153,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11157 "configure" +#line 11156 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11260,7 +11259,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11263 "configure" +#line 11262 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gdb/configure b/gdb/configure index 9993e3fcc66..a565edd5db5 100755 --- a/gdb/configure +++ b/gdb/configure @@ -6519,15 +6519,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6619,22 +6611,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6726,42 +6727,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6853,25 +6838,40 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then diff --git a/gprof/configure b/gprof/configure index 1c70f82bd14..885f099f36b 100755 --- a/gprof/configure +++ b/gprof/configure @@ -5701,15 +5701,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5801,22 +5793,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5908,42 +5909,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6035,25 +6020,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11030,7 +11029,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11033 "configure" +#line 11032 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11136,7 +11135,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11139 "configure" +#line 11138 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gprofng/configure b/gprofng/configure index 2a8f6bd1ae9..6739d648641 100755 --- a/gprofng/configure +++ b/gprofng/configure @@ -7327,15 +7327,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7427,22 +7419,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7534,42 +7535,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7661,25 +7646,40 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then diff --git a/gprofng/libcollector/configure b/gprofng/libcollector/configure index 6e2429a815e..e018ad43e66 100755 --- a/gprofng/libcollector/configure +++ b/gprofng/libcollector/configure @@ -7139,15 +7139,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7239,22 +7231,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7346,42 +7347,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7473,25 +7458,40 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then diff --git a/ld/configure b/ld/configure index 11c17f21ee4..95729556429 100755 --- a/ld/configure +++ b/ld/configure @@ -6564,15 +6564,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6664,22 +6656,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6771,42 +6772,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6898,25 +6883,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11894,7 +11893,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11897 "configure" +#line 11896 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12000,7 +11999,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12003 "configure" +#line 12002 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libbacktrace/configure b/libbacktrace/configure index 2349bba258b..398e1621144 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -6624,15 +6624,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6724,22 +6716,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6831,42 +6832,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6958,25 +6943,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11953,7 +11952,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11956 "configure" +#line 11955 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12059,7 +12058,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12062 "configure" +#line 12061 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libctf/configure b/libctf/configure index becb131103a..1b02c399dd9 100755 --- a/libctf/configure +++ b/libctf/configure @@ -8672,15 +8672,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -8772,22 +8764,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -8879,42 +8880,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -9006,25 +8991,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -13971,7 +13970,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13974 "configure" +#line 13973 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14077,7 +14076,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14080 "configure" +#line 14079 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libiberty/configure b/libiberty/configure index 0c4a1b0d391..4c72b5a9283 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -4506,15 +4506,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -4606,22 +4598,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -4713,42 +4714,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi PLUGIN_FILE="$plugin_file" if test -n "$PLUGIN_FILE"; then PLUGIN_OPTION="--plugin $PLUGIN_FILE" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -4840,25 +4825,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - PLUGIN_OPTION="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +PLUGIN_OPTION="$plugin_option" fi if test -n "$PLUGIN_OPTION"; then diff --git a/libsframe/configure b/libsframe/configure index 715ce58f700..5f7604e48d7 100755 --- a/libsframe/configure +++ b/libsframe/configure @@ -6639,15 +6639,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6739,22 +6731,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6846,42 +6847,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6973,25 +6958,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11938,7 +11937,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11941 "configure" +#line 11940 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12044,7 +12043,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12047 "configure" +#line 12046 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/opcodes/configure b/opcodes/configure index df9f63d1031..48c53a2ff2b 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -5979,15 +5979,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6079,22 +6071,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6186,42 +6187,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6313,25 +6298,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11278,7 +11277,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11281 "configure" +#line 11280 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11384,7 +11383,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11387 "configure" +#line 11386 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/sim/configure b/sim/configure index b6c6d658b7d..da4caa57aa1 100755 --- a/sim/configure +++ b/sim/configure @@ -6893,15 +6893,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6993,22 +6985,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7100,42 +7101,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7227,25 +7212,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -13174,7 +13173,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13177 "configure" +#line 13176 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13280,7 +13279,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13283 "configure" +#line 13282 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/zlib/configure b/zlib/configure index 6e9b96835b4..be8b683b6e8 100755 --- a/zlib/configure +++ b/zlib/configure @@ -5687,15 +5687,7 @@ rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 $as_echo "$clang_cv_is_clang" >&6; } - plugin_file= - if test $clang_cv_is_clang = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } - plugin_names="LLVMgold.so" - for plugin in $plugin_names; do - plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` - if test x$plugin_file = x$plugin; then - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5787,22 +5779,31 @@ else LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" fi - if test "$?" != 0; then - as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 - fi - clang_lib_dir=`$LLVM_CONFIG --libdir` - if test -f $clang_lib_dir/$plugin; then - plugin_file=$clang_lib_dir/$plugin - fi - if test x$plugin_file != x$plugin; then + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then break; fi fi + plugin_file= done - if test -z $plugin_file; then - as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 - fi - if test -n "$ac_tool_prefix"; then + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5894,42 +5895,26 @@ else AR="$ac_cv_prog_AR" fi - if test "${AR}" = "" ; then - as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - fi - plugin_option="--plugin $plugin_file" - touch conftest.c - ${AR} $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_file= + plugin_file= + fi + rm -f conftest.* fi - rm -f conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; } fi plugin_file="$plugin_file" if test -n "$plugin_file"; then plugin_option="--plugin $plugin_file" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do - plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` - if test x$plugin_so = x$plugin; then - plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` - fi - if test x$plugin_so != x$plugin; then - plugin_option="--plugin $plugin_so" - break - fi -done -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -6021,25 +6006,39 @@ else AR="$ac_cv_prog_AR" fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then - plugin_option="$plugin_option" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -z "$plugin_option"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* fi +plugin_option="$plugin_option" fi if test -n "$ac_tool_prefix"; then @@ -11178,7 +11177,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11181 "configure" +#line 11180 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11284,7 +11283,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11287 "configure" +#line 11286 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- 2.47.3