From patchwork Thu Oct 22 12:49:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1386255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=e81qbXQv; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CH6dg483Nz9sVX for ; Thu, 22 Oct 2020 23:49:59 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D4023986839; Thu, 22 Oct 2020 12:49:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D4023986839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1603370969; bh=ybLXXXI9Z2vEEe0IknXCAeckOwbQU0jt6iDMrny9wvM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=e81qbXQvzzfufMg5wjYdPYVpWBjmUbCbeBFTMe6xHxQ3etyDiEu+UXPsUkQfDWb0e gDIyvjMjCoo7XyBqzIIwlXply98ulOxZnOXoGW9g9WNN4AQLvolZzN7cD9K6mfo6sZ tOlzBm1DV8DN5KjGYBiczlAkboOKrVtkqUNy7O0s= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by sourceware.org (Postfix) with ESMTPS id 85C73398542D for ; Thu, 22 Oct 2020 12:49:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 85C73398542D Received: by mail-pj1-x1044.google.com with SMTP id m3so921287pjf.4 for ; Thu, 22 Oct 2020 05:49:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ybLXXXI9Z2vEEe0IknXCAeckOwbQU0jt6iDMrny9wvM=; b=VCv5U2zU5I4/kS/jXSA4fAgH9RUCRkqfzNaCmhPPWgTAF9zHagVwI+iY8PxVvVa3ho h04d6fUW6/d7kQQ2velAhWTxb32W3XLsOuh3R8kxzblqbBPmTmzYobEwTI0NTaQdu3ff PjhCZTiSft/Cn+3pamExxY0RVY/CUYOJcI3Yj44Pm67kek2gWgveQ5AWQU0GrRZ1JMlj Xyx1j7LIWmVYQYmTJfUzS1+DgExuZad9DumZKPkK9ikOh13/4E+IUy9c+ISSr8dpZ6Tr fgkHHxNby1d1zgZ+20WheLt8Lad8tfJHLGFdI5GDJT8pScG4fV6LDmhzxrq58LCSPhFe PiUw== X-Gm-Message-State: AOAM532jris5JztixVSExPcS4wLlhhU37HH87aAKIjLZjVnFkP1KmukL RpT5NJf+eo3mSMkOKUWDqOWa8PcSrr0= X-Google-Smtp-Source: ABdhPJxOKlNSCHANEg0T9nX+bhUkOAvGVPvcHnhYm4lCEvooRQh3FD1G4h00lbxTI55bARCLxL94MQ== X-Received: by 2002:a17:902:b492:b029:d4:d88c:d1a7 with SMTP id y18-20020a170902b492b02900d4d88cd1a7mr2509579plr.15.1603370959890; Thu, 22 Oct 2020 05:49:19 -0700 (PDT) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id z10sm2050031pjz.49.2020.10.22.05.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:49:19 -0700 (PDT) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 04A211A0900; Thu, 22 Oct 2020 05:49:18 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH 1/2] GCC: Pass --plugin to AR and RANLIB Date: Thu, 22 Oct 2020 05:49:16 -0700 Message-Id: <20201022124917.3679457-2-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201022124917.3679457-1-hjl.tools@gmail.com> References: <20201022124917.3679457-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3040.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" 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. --- Makefile.in | 4 +- Makefile.tpl | 5 +- config/gcc-plugin.m4 | 28 ++++++ configure | 37 ++++++++ configure.ac | 13 +++ libiberty/Makefile.in | 5 +- libiberty/aclocal.m4 | 1 + libiberty/configure | 37 ++++++++ libiberty/configure.ac | 12 +++ libtool.m4 | 25 ++++- zlib/configure | 206 ++++++++++++++++++++++++++++++++++++++++- 11 files changed, 363 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index fe34132f9e5..87179f5ac9b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -387,7 +387,7 @@ MAKEINFOFLAGS = --split-size=5000000 # --------------------------------------------- AS = @AS@ -AR = @AR@ +AR = @AR@ @AR_PLUGIN_OPTION@ AR_FLAGS = rc CC = @CC@ CXX = @CXX@ @@ -396,7 +396,7 @@ LD = @LD@ LIPO = @LIPO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -RANLIB = @RANLIB@ +RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@ READELF = @READELF@ STRIP = @STRIP@ WINDRES = @WINDRES@ diff --git a/Makefile.tpl b/Makefile.tpl index 5b118a8ba4a..a280a1498c0 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -390,7 +390,7 @@ MAKEINFOFLAGS = --split-size=5000000 # --------------------------------------------- AS = @AS@ -AR = @AR@ +AR = @AR@ @AR_PLUGIN_OPTION@ AR_FLAGS = rc CC = @CC@ CXX = @CXX@ @@ -399,7 +399,7 @@ LD = @LD@ LIPO = @LIPO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -RANLIB = @RANLIB@ +RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@ READELF = @READELF@ STRIP = @STRIP@ WINDRES = @WINDRES@ @@ -1967,6 +1967,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) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 8f278719118..c5b72e9a13d 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -124,3 +124,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 +]) diff --git a/configure b/configure index 68779feb42b..8b9e7b34fdb 100755 --- a/configure +++ b/configure @@ -616,6 +616,8 @@ GFORTRAN_FOR_TARGET GCC_FOR_TARGET CXX_FOR_TARGET CC_FOR_TARGET +RANLIB_PLUGIN_OPTION +AR_PLUGIN_OPTION READELF OBJDUMP OBJCOPY @@ -10007,6 +10009,41 @@ 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 + +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. diff --git a/configure.ac b/configure.ac index d16a2757689..4cfa0feddbd 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) @@ -3376,6 +3377,18 @@ AC_SUBST(CXX) AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) +GCC_PLUGIN_OPTION(PLUGIN_OPTION) +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + AC_SUBST(AR_PLUGIN_OPTION) + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + AC_SUBST(RANLIB_PLUGIN_OPTION) + fi +fi + # Target tools. AC_ARG_WITH([build-time-tools], [AS_HELP_STRING([--with-build-time-tools=PATH], diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index 895f701bcd0..0ffcdc1c53d 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -49,13 +49,13 @@ mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs # Some compilers can't handle cc -c blah.c -o foo/blah.o. OUTPUT_OPTION = @OUTPUT_OPTION@ -AR = @AR@ +AR = @AR@ @AR_PLUGIN_OPTION@ AR_FLAGS = rc CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ -RANLIB = @RANLIB@ +RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@ MAKEINFO = @MAKEINFO@ PERL = @PERL@ @@ -485,6 +485,7 @@ configure_deps = $(srcdir)/aclocal.m4 \ $(srcdir)/../config/acx.m4 \ $(srcdir)/../config/cet.m4 \ $(srcdir)/../config/enable.m4 \ + $(srcdir)/../config/gcc-plugin.m4 \ $(srcdir)/../config/no-executables.m4 \ $(srcdir)/../config/override.m4 \ $(srcdir)/../config/picflag.m4 \ diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index 34c0a5bab62..b2e54d9e32a 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -1,6 +1,7 @@ sinclude(../config/acx.m4) sinclude(../config/cet.m4) sinclude(../config/enable.m4) +sinclude(../config/gcc-plugin.m4) sinclude(../config/no-executables.m4) sinclude(../config/override.m4) sinclude(../config/picflag.m4) diff --git a/libiberty/configure b/libiberty/configure index ff93c9ee9a6..4406ccb35ae 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -645,6 +645,8 @@ CPPFLAGS LDFLAGS CFLAGS CC +RANLIB_PLUGIN_OPTION +AR_PLUGIN_OPTION RANLIB AR host_os @@ -2932,6 +2934,41 @@ else 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 + +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 + # Add --enable-multilib to configure. # Default to --enable-multilib # Check whether --enable-multilib was given. diff --git a/libiberty/configure.ac b/libiberty/configure.ac index 4e2599c14a8..38ae8ab3a67 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -108,6 +108,18 @@ dnl to call AC_CHECK_PROG. AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) +GCC_PLUGIN_OPTION(PLUGIN_OPTION) +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + AC_SUBST(AR_PLUGIN_OPTION) + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + AC_SUBST(RANLIB_PLUGIN_OPTION) + fi +fi + dnl When switching to automake, replace the following with AM_ENABLE_MULTILIB. # Add --enable-multilib to configure. # Default to --enable-multilib diff --git a/libtool.m4 b/libtool.m4 index 434530059fa..c24453fc752 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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]) diff --git a/zlib/configure b/zlib/configure index de6fa7e9960..0d7763b1040 100755 --- a/zlib/configure +++ b/zlib/configure @@ -5407,6 +5407,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 x$plugin_so = x$plugin ; then + plugin_so=`${CC} ${CFLAGS} --print-file-name plugin` + fi + if 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 @@ -5500,6 +5513,98 @@ else fi test -z "$AR" && AR=ar +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}"$AR $plugin_option"", so it can be a program name with args. +set dummy ${ac_tool_prefix}"$AR $plugin_option"; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}"$AR $plugin_option"" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of ""$AR $plugin_option"", so it can be a program name with args. +set dummy "$AR $plugin_option"; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR=""$AR $plugin_option"" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="$AR" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -5703,7 +5808,102 @@ else RANLIB="$ac_cv_prog_RANLIB" fi -test -z "$RANLIB" && RANLIB=: +if test -z "$RANLIB"; then + RANLIB=: +else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}"$RANLIB $plugin_option"", so it can be a program name with args. +set dummy ${ac_tool_prefix}"$RANLIB $plugin_option"; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}"$RANLIB $plugin_option"" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of ""$RANLIB $plugin_option"", so it can be a program name with args. +set dummy "$RANLIB $plugin_option"; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB=""$RANLIB $plugin_option"" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB="$RANLIB" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +fi @@ -10644,7 +10844,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10647 "configure" +#line 10847 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10750,7 +10950,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10753 "configure" +#line 10953 "configure" #include "confdefs.h" #if HAVE_DLFCN_H