On Wed, Dec 15, 2021 at 8:28 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > On Wed, Dec 15, 2021 at 7:38 PM Sandra Loosemore > <san...@codesourcery.com> 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" <hjl.to...@gmail.com> > > > 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
Let me revert this patch for now since this doesn't work with GCC bootstrap which needs to pass the newly built plugin to AR and RANLIB. > > 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. -- H.J.