GCC: Pass --plugin to AR and RANLIB

Detect GCC LTO plugin.  Pass --plugin to AR and RANLIB to support LTO
build.

	* Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@
	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
	* configure.ac: Include config/gcc-plugin.m4.
	AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION.
	* libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and
	RANLIB if possible.
	* Makefile.in: Regenerated.
	* configure: Likewise.

config/

	* gcc-plugin.m4 (GCC_PLUGIN_OPTION): New.

libiberty/

	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
	(configure_deps): Depend on ../config/gcc-plugin.m4.
	* aclocal.m4: Include ../config/gcc-plugin.m4.
	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
	RANLIB_PLUGIN_OPTION.
	* configure: Regenerated.

zlib/

	* configure: Regenerated.
This commit is contained in:
H.J. Lu 2021-01-09 06:43:11 -08:00 committed by Mike Frysinger
parent 4a3b4d50e3
commit d8d5dac0fe
22 changed files with 512 additions and 37 deletions

View File

@ -392,7 +392,7 @@ MAKEINFOFLAGS = --split-size=5000000
# ---------------------------------------------
AS = @AS@
AR = @AR@
AR = @AR@ @AR_PLUGIN_OPTION@
AR_FLAGS = rc
CC = @CC@
CXX = @CXX@
@ -402,7 +402,7 @@ LIPO = @LIPO@
NM = @NM@
OBJCOPY = @OBJCOPY@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@
READELF = @READELF@
STRIP = @STRIP@
WINDRES = @WINDRES@
@ -56457,6 +56457,7 @@ AUTOCONF = autoconf
$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
$(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4 \
$(srcdir)/config/elf.m4 $(srcdir)/config/isl.m4 \
$(srcdir)/config/gcc-plugin.m4 \
$(srcdir)/libtool.m4 $(srcdir)/ltoptions.m4 $(srcdir)/ltsugar.m4 \
$(srcdir)/ltversion.m4 $(srcdir)/lt~obsolete.m4
cd $(srcdir) && $(AUTOCONF)

View File

@ -395,7 +395,7 @@ MAKEINFOFLAGS = --split-size=5000000
# ---------------------------------------------
AS = @AS@
AR = @AR@
AR = @AR@ @AR_PLUGIN_OPTION@
AR_FLAGS = rc
CC = @CC@
CXX = @CXX@
@ -405,7 +405,7 @@ LIPO = @LIPO@
NM = @NM@
OBJCOPY = @OBJCOPY@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@
READELF = @READELF@
STRIP = @STRIP@
WINDRES = @WINDRES@
@ -1972,6 +1972,7 @@ AUTOCONF = autoconf
$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
$(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4 \
$(srcdir)/config/elf.m4 $(srcdir)/config/isl.m4 \
$(srcdir)/config/gcc-plugin.m4 \
$(srcdir)/libtool.m4 $(srcdir)/ltoptions.m4 $(srcdir)/ltsugar.m4 \
$(srcdir)/ltversion.m4 $(srcdir)/lt~obsolete.m4
cd $(srcdir) && $(AUTOCONF)

View File

@ -111,3 +111,31 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
fi
fi
])
dnl
dnl
dnl GCC_PLUGIN_OPTION
dnl (SHELL-CODE_HANDLER)
dnl
AC_DEFUN([GCC_PLUGIN_OPTION],[dnl
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
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 "$plugin_option"; then
$1="$plugin_option"
AC_MSG_RESULT($plugin_option)
else
AC_MSG_RESULT([no])
fi
])

39
configure vendored
View File

@ -618,6 +618,8 @@ GCJ_FOR_TARGET
GCC_FOR_TARGET
CXX_FOR_TARGET
CC_FOR_TARGET
RANLIB_PLUGIN_OPTION
AR_PLUGIN_OPTION
READELF
OBJDUMP
OBJCOPY
@ -10007,6 +10009,43 @@ fi
{ $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 "$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}: result: no" >&5
$as_echo "no" >&6; }
fi
AR_PLUGIN_OPTION=
RANLIB_PLUGIN_OPTION=
if test -n "$PLUGIN_OPTION"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
fi
# Target tools.
# Check whether --with-build-time-tools was given.

View File

@ -23,6 +23,7 @@ m4_include(config/acx.m4)
m4_include(config/override.m4)
m4_include(config/proginstall.m4)
m4_include(config/elf.m4)
m4_include(config/gcc-plugin.m4)
m4_include([libtool.m4])
m4_include([ltoptions.m4])
m4_include([ltsugar.m4])
@ -3394,6 +3395,20 @@ AC_SUBST(CXX)
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
GCC_PLUGIN_OPTION(PLUGIN_OPTION)
AR_PLUGIN_OPTION=
RANLIB_PLUGIN_OPTION=
if test -n "$PLUGIN_OPTION"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
fi
AC_SUBST(AR_PLUGIN_OPTION)
AC_SUBST(RANLIB_PLUGIN_OPTION)
# Target tools.
AC_ARG_WITH([build-time-tools],
[AS_HELP_STRING([--with-build-time-tools=PATH],

25
libtool.m4 vendored
View File

@ -1323,8 +1323,26 @@ need_locks="$enable_libtool_lock"
# _LT_CMD_OLD_ARCHIVE
# -------------------
m4_defun([_LT_CMD_OLD_ARCHIVE],
[AC_CHECK_TOOL(AR, ar, false)
[plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
AC_CHECK_TOOL(AR, ar, false)
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1])
@ -1335,6 +1353,11 @@ _LT_DECL([], [STRIP], [1], [A symbol stripping program])
AC_CHECK_TOOL(RANLIB, ranlib, :)
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
_LT_DECL([], [RANLIB], [1],
[Commands used to install an old-style archive])

27
newlib/configure vendored
View File

@ -6626,6 +6626,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6719,6 +6732,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6923,6 +6941,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11818,7 +11841,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11821 "configure"
#line 11844 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11924,7 +11947,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11927 "configure"
#line 11950 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6201,6 +6201,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6294,6 +6307,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6498,6 +6516,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11393,7 +11416,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11396 "configure"
#line 11419 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11499,7 +11522,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11502 "configure"
#line 11525 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

27
newlib/libc/configure vendored
View File

@ -6325,6 +6325,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6418,6 +6431,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6622,6 +6640,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11517,7 +11540,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11520 "configure"
#line 11543 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11623,7 +11646,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11626 "configure"
#line 11649 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6263,6 +6263,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6356,6 +6369,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6560,6 +6578,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11455,7 +11478,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11458 "configure"
#line 11481 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11561,7 +11584,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11564 "configure"
#line 11587 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6203,6 +6203,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6296,6 +6309,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6500,6 +6518,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11395,7 +11418,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11398 "configure"
#line 11421 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11501,7 +11524,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11504 "configure"
#line 11527 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6233,6 +6233,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6326,6 +6339,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6530,6 +6548,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11425,7 +11448,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11428 "configure"
#line 11451 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11531,7 +11554,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11534 "configure"
#line 11557 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6249,6 +6249,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6342,6 +6355,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6546,6 +6564,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11441,7 +11464,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11444 "configure"
#line 11467 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11547,7 +11570,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11550 "configure"
#line 11573 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6247,6 +6247,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6340,6 +6353,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6544,6 +6562,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11439,7 +11462,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11442 "configure"
#line 11465 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11545,7 +11568,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11548 "configure"
#line 11571 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6205,6 +6205,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6298,6 +6311,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6502,6 +6520,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11397,7 +11420,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11400 "configure"
#line 11423 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11503,7 +11526,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11506 "configure"
#line 11529 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6243,6 +6243,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6336,6 +6349,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6540,6 +6558,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11435,7 +11458,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11438 "configure"
#line 11461 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11541,7 +11564,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11544 "configure"
#line 11567 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6206,6 +6206,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6299,6 +6312,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6503,6 +6521,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11398,7 +11421,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11401 "configure"
#line 11424 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11504,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 11507 "configure"
#line 11530 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6243,6 +6243,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6336,6 +6349,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6540,6 +6558,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11435,7 +11458,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11438 "configure"
#line 11461 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11541,7 +11564,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11544 "configure"
#line 11567 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

27
newlib/libm/configure vendored
View File

@ -6265,6 +6265,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6358,6 +6371,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6562,6 +6580,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11457,7 +11480,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11460 "configure"
#line 11483 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11563,7 +11586,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11566 "configure"
#line 11589 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6216,6 +6216,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6309,6 +6322,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6513,6 +6531,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11408,7 +11431,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11411 "configure"
#line 11434 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11514,7 +11537,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11517 "configure"
#line 11540 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6201,6 +6201,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6294,6 +6307,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6498,6 +6516,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11393,7 +11416,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11396 "configure"
#line 11419 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11499,7 +11522,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11502 "configure"
#line 11525 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -6201,6 +6201,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
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
# 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
@ -6294,6 +6307,11 @@ else
fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6498,6 +6516,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -11393,7 +11416,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11396 "configure"
#line 11419 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11499,7 +11522,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11502 "configure"
#line 11525 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H