From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 2D2A53858D3C for ; Thu, 16 Dec 2021 04:28:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2D2A53858D3C Received: by mail-pj1-x1033.google.com with SMTP id gn2so134791pjb.5 for ; Wed, 15 Dec 2021 20:28:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OE3ZctuCD0nFX72msgMfCMqvc8OjT2S3wjeEwkQvuLM=; b=8DFsdC+iRxJp+z8KX+gJEn0IVciP1g5ONInaSipHMUr+YTMgL8dXMsIKqls34dKXPe mTih2grRUo4rJJsoWMI1eM5cl9QLMnQ1sOaU9oxILSLVGxzPrpr6r+xafrH1Hmz7h2tp ZgcHGEqtYnGXO+RPOWjvPgK6H1doDoKihFEmSoNUbAXW7i2Wp2WVIxGICnRZ6d/jzBbT XwhyAJ6Ww/fpFUtnLq4Grqjxaeuo72hyiuZqSHAPCXf6Nv1VHtLLcswmwDNNYSDscwCf 5KilIU2a1zfeV8ZrBszCUpKYziYjNkcx0VDQc/sXgFSVWHZUzqybcpEBvfNfNRkmWgNm Vf1A== X-Gm-Message-State: AOAM530E8ibHNuSKom190zi/mUFz3Lr7i/YBCv3qpyl2rmEl3P/HW9xs KOoOfXc4XdWjDE8hIaXKJVTBcGaiwOXrIAqSkZM= X-Google-Smtp-Source: ABdhPJxGeITOuOKUPDoJcMYP+Czp9QAf7t1EKo5AIMkLww+2CLb5yLl9klnh6mB9TpMcl5ffsHq7r7fJeYoeDOEFcL8= X-Received: by 2002:a17:90b:1e0e:: with SMTP id pg14mr3736809pjb.143.1639628931139; Wed, 15 Dec 2021 20:28:51 -0800 (PST) MIME-Version: 1.0 References: <20211113163353.5374-1-hjl.tools@gmail.com> <20211113163353.5374-2-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Wed, 15 Dec 2021 20:28:15 -0800 Message-ID: Subject: Re: [PATCH 1/2] Sync with binutils: GCC: Pass --plugin to AR and RANLIB To: Sandra Loosemore Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3022.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Thu, 16 Dec 2021 04:28:53 -0000 On Wed, Dec 15, 2021 at 7:38 PM Sandra Loosemore wrote: > > On 11/13/21 9:33 AM, H.J. Lu via Gcc-patches wrote: > > Sync with binutils for building binutils with LTO: > > > > From 50ad1254d5030d0804cbf89c758359ae202e8d55 Mon Sep 17 00:00:00 2001 > > From: "H.J. Lu" > > Date: Sat, 9 Jan 2021 06:43:11 -0800 > > Subject: [PATCH] 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. > > * configure.ac: AC_SUBST AR_PLUGIN_OPTION and > > RANLIB_PLUGIN_OPTION. > > * aclocal.m4: Regenerated. > > * configure: Likewise. > > > > zlib/ > > > > * configure: Regenerated. > > This patch appears to have broken my nios2-linux-gnu target, > x86_64-linux-gnu host cross build: > > x86_64-linux-gnu-ar --plugin > /usr/local/tools/gcc-2021/bin/../libexec/gcc/x86_64-linux-gnu/9.3.1/liblto_plugin.so > --plugin > /usr/local/tools/gcc-2021/bin/../libexec/gcc/x86_64-linux-gnu/9.3.1/liblto_plugin.so > rc ./libiberty.a \ > ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o > ./argv.o ./bsearch_r.o ./choose-temp.o ./concat.o ./cp-demint.o > ./crc32.o ./d-demangle.o ./dwarfnames.o ./dyn-string.o ./fdmatch.o > ./fibheap.o ./filedescriptor.o ./filename_cmp.o ./floatformat.o > ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o > ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o > ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o > ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o > ./pex-unix.o ./vprintf-support.o ./rust-demangle.o ./safe-ctype.o > ./simple-object.o ./simple-object-coff.o ./simple-object-elf.o > ./simple-object-mach-o.o ./simple-object-xcoff.o ./sort.o ./spaces.o > ./splay-tree.o ./stack-limit.o ./strerror.o ./strsignal.o > ./timeval-utils.o ./unlink-if-ordinary.o ./xasprintf.o ./xatexit.o > ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o > ./xvasprintf.o ./setproctitle.o > x86_64-linux-gnu-ar: no operation specified > > This is ar version 2.32.51. I also tried with an older set of host > tools using ar 2.25.51 and saw the same failure. > > -Sandra I built nios2-linux-gnu cross compiler using glibc build-many-glibcs.py script: /usr/bin/time /export/project/tools-build/glibc-many/src/glibc/scripts/build-man y-glibcs.py -j 96 /export/project/tools-build/glibc-many \ compilers nios2-linux-gnu make[1]: Entering directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu check-host-libraries PASS: compilers-nios2-linux-gnu binutils rm PASS: compilers-nios2-linux-gnu binutils mkdir PASS: compilers-nios2-linux-gnu binutils configure make[1]: Leaving directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu binutils build PASS: compilers-nios2-linux-gnu binutils install make[1]: Entering directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu binutils cleanup PASS: compilers-nios2-linux-gnu linux rm PASS: compilers-nios2-linux-gnu linux mkdir make[1]: Leaving directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu linux install-headers make[1]: Entering directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu linux cleanup PASS: compilers-nios2-linux-gnu gcc-first rm PASS: compilers-nios2-linux-gnu gcc-first mkdir PASS: compilers-nios2-linux-gnu gcc-first configure make[1]: Leaving directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu gcc-first build PASS: compilers-nios2-linux-gnu gcc-first install make[1]: Entering directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu gcc-first cleanup PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu rm PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu mkdir PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu configure make[1]: Leaving directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu build PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu install make[1]: Entering directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu mkdir-lib PASS: compilers-nios2-linux-gnu glibc nios2-linux-gnu cleanup PASS: compilers-nios2-linux-gnu gcc rm PASS: compilers-nios2-linux-gnu gcc mkdir PASS: compilers-nios2-linux-gnu gcc configure make[1]: Leaving directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu gcc build PASS: compilers-nios2-linux-gnu gcc install make[1]: Entering directory '/export/project/tools-build/glibc-many/build' PASS: compilers-nios2-linux-gnu gcc cleanup PASS: compilers-nios2-linux-gnu done make[1]: Leaving directory '/export/project/tools-build/glibc-many/build' using glibc master, binutils master and gcc master. Is there a way to reproduce it with build-many-glibcs.py? -- H.J.