From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from einhorn-mail-out.in-berlin.de (einhorn-mail.in-berlin.de [217.197.80.20]) by sourceware.org (Postfix) with ESMTPS id 4201F39B4814 for ; Fri, 18 Jun 2021 10:19:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4201F39B4814 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ubuntu.com X-Envelope-From: doko@ubuntu.com Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 15IAJWqV026171 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 18 Jun 2021 12:19:32 +0200 To: Gaius Mulley , gcc-patches@gcc.gnu.org, Richard Biener , dje.gcc@gmail.com References: <87eed0nn4u.fsf@j228-gm.comp.glam.ac.uk> From: Matthias Klose Subject: Re: [PATCH] Modula-2 into the GCC tree on master Message-ID: Date: Fri, 18 Jun 2021 12:19:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87eed0nn4u.fsf@j228-gm.comp.glam.ac.uk> Content-Type: multipart/mixed; boundary="------------C925E5165A4014AA4EFE1A1B" Content-Language: en-US X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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-List-Received-Date: Fri, 18 Jun 2021 10:19:37 -0000 This is a multi-part message in MIME format. --------------C925E5165A4014AA4EFE1A1B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 6/18/21 12:26 AM, Gaius Mulley wrote: > > > Hello Richard, David, Matthias and GCC Steering Committee, > > here are a set of patches which merge the gm2 front end into the > GCC tree. The patches have been bootstrapped under aarch64 GNU/Linux > Debian Stretch using make -j 4, x86_64 GNU/Linux Debian Stretch built > using make -j 24 and also under x86_64 GNU/Linux Debian Buster using > make -j 4. > > Tested on Debian Stretch x86_64 > =============================== > > built GCC bootstrap 3 times: > > 1. built vanilla GCC (enabling bootstrap) enabling front ends: > c,c++,go,d,fortran and ran the regression tests. (make -j 4). > > 2. the patches below were applied and associated tarball untarred. > The same front ends c,c++,go,d,fortran (again building from > bootstrap) were enabled (no m2) and ran the regression tests. > There were no changes to the regression test results between 1 and > 2. > > 3. Then it was rebuilt (from bootstrap) enabling the front ends > c,c++,go,d,fortran,m2 and ran the > regression tests and again no extra failures were seen. > > 4. It has been built in source tree (./configure --enable-languages=m2) > and out of source tree with make -j 24. > > Built on Debian Buster x86_64 > ============================= > > 1. built vanilla GCC (enabling bootstrap) enabling front ends: > c,c++,go,d,fortran and ran the regression tests. > > 2. the patches below were applied and associated tarball untarred. > The same front ends c,c++,go,d,fortran (again building from > bootstrap) were enabled (no m2) and ran the regression tests. > There were no changes to the regression test results between 1 and > 2. > > 3. Then it was rebuilt (from bootstrap) enabling the front ends > c,c++,go,d,fortran,m2 and ran the > regression tests and again no extra failures were seen. > > Built a patched tree enabling bootstrap make -j 4 for front ends > c,c++,m2 all compiled and bootstrapped. I checked that with a profiled lto build. The build succeeds with the attached patch to respect the parallel linking limitations, which you can configure with --enable-link-serialization=N However the build fails in the installation step with: [...] Linking stage1/m2/cc1gm2 |>>>>>>>>>>>>>>>>-- | 0% x86_64-linux-gnu-g++-10 -std=c++11 -no-pie -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-q ual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition -Wc++-compat - fno-common -DHAVE_CONFIG_H -o stage1/m2/cc1gm2 m2/gm2-lang.o m2/stor-layout.o m2/m2pp.o m2/gm2-gcc/m2assert.o m2/gm2-gcc/m2block.o m2/gm2-gcc/m2builtins.o m2/gm2-gcc/m2except.o m2/gm2-gcc/m2convert.o m2/gm2-gcc/m2color.o m2/gm2-gcc/m2decl.o m2/gm2-gcc/m2expr.o m2/gm2-gcc/m2linemap.o m2/gm2-gcc/m2statement.o m2/gm2-gcc/m2type.o m2/gm2-gcc/m2tree.o m2/gm2-gcc/m2treelib.o m2/gm2-gcc/m2top.o m2/gm2-gcc/m2misc.o m2/gm2-gcc/init.o m2/gm2-compiler-boot/m2flex.o \ attribs.o \ m2/gm2-compiler-boot/gm2.a m2/gm2-libs-boot/libgm2.a m2/mc-boot-ch/Glibc.o m2/mc-boot-ch/Gmcrts.o m2/gm2-gcc/rtegraph.o \ libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl -lz -lzstd lto1: fatal error: bytecode stream in file 'm2/gm2-compiler-boot/m2flex.o' generated with LTO version 12.0 instead of the expected 9.2 compilation terminated. lto-wrapper: fatal error: x86_64-linux-gnu-g++-10 returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Command exited with non-zero status 1 x86_64-linux-gnu-g++-10 is the compiler used for the bootstrap. I haven't checked if that is also seen for a normal bootstrap. Apparently it tries to re-bootstrap the compiler. The build is configured with --with-build-config=bootstrap-lto-lean, built with make profiledbootstrap-lean Matthias --------------C925E5165A4014AA4EFE1A1B Content-Type: text/x-patch; charset=UTF-8; name="gm2-link.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gm2-link.diff" 2021-06-18 Matthias Klose * Make-lang.in (m2.serial): New target. (cc1gm2): Depend on $(m2.prev). (stageN/m2/cc1gm2): Call LLINKER, also call LINK_PROGRESS. --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in @@ -82,6 +82,7 @@ TEXISRC =3D $(objdir)/m2/images/gnu.eps \ # Define the names for selecting GNU Modula-2 in LANGUAGES. m2 modula-2 modula2: gm2$(exeext) xgcc$(exeext) cc1gm2$(exeext) \ $(GCC_TOOLS_FOR_GM2) +m2.serial =3D cc1gm2$(exeext) =20 # Tell GNU make to ignore these if they exist. .PHONY: m2 modula-2 modula2 @@ -530,7 +531,7 @@ GM2_LIBS_PARANOID =3D m2/gm2-compiler-para =20 gm2.paranoid: stage3/m2/cc1gm2$(exeext) gm2.verifyparanoid =20 -cc1gm2$(exeext): stage1/m2/cc1gm2$(exeext) +cc1gm2$(exeext): stage1/m2/cc1gm2$(exeext) $(m2.prev) cp -p $< $@ =20 gm2lcc$(exeext): stage1/m2/gm2lcc$(exeext) @@ -551,29 +552,35 @@ gm2m$(exeext): stage1/m2/gm2m$(exeext) stage3/m2/cc1gm2$(exeext): stage2/m2/cc1gm2$(exeext) m2/gm2-compiler-par= anoid/m2flex.o \ $(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(G= M2_LIBS_PARANOID) \ m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).= so - $(LINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler-= paranoid/m2flex.o \ + @$(call LINK_PROGRESS,$(INDEX.m2),start) + +$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compile= r-paranoid/m2flex.o \ attribs.o \ $(GM2_LIBS_PARANOID) \ $(BACKEND) $(LIBS) m2/gm2-gcc/rtegraph.o \= $(BACKENDLIBS) $(LIBSTDCXX) -lm + @$(call LINK_PROGRESS,$(INDEX.m2),end) =20 stage2/m2/cc1gm2$(exeext): stage1/m2/cc1gm2$(exeext) m2/gm2-compiler/m2f= lex.o $(P) \ $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LI= BS) \ m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).= so - $(LINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler/= m2flex.o \ + @$(call LINK_PROGRESS,$(INDEX.m2),start) + +$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compile= r/m2flex.o \ attribs.o \ $(GM2_LIBS) \ $(BACKEND) $(LIBS) m2/gm2-gcc/rtegraph.o \= $(BACKENDLIBS) $(LIBSTDCXX) -lm + @$(call LINK_PROGRESS,$(INDEX.m2),end) =20 stage1/m2/cc1gm2$(exeext): gm2$(exeext) m2/gm2-compiler-boot/m2flex.o \ $(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \ $(GM2_LIBS_BOOT) $(MC_LIBS) \ - m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).= so - $(LINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler-= boot/m2flex.o \ + m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).= so $(m2.prev) + @$(call LINK_PROGRESS,$(INDEX.m2),start) + +$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compile= r-boot/m2flex.o \ attribs.o \ $(GM2_LIBS_BOOT) $(MC_LIBS) m2/gm2-gcc/rteg= raph.o \ $(BACKEND) $(LIBS) $(BACKENDLIBS) + @$(call LINK_PROGRESS,$(INDEX.m2),end) =20 # Compiling object files from source files. =20 --------------C925E5165A4014AA4EFE1A1B--