From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by sourceware.org (Postfix) with ESMTPS id 411B33851AA5 for ; Mon, 20 Jun 2022 13:21:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 411B33851AA5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-101b4f9e825so9762615fac.5 for ; Mon, 20 Jun 2022 06:21:20 -0700 (PDT) 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:reply-to :from:date:message-id:subject:to:cc; bh=OgVs8vP7P2mZdO41t+sYXGoTNEKtWksdwjI5GuIU35g=; b=YKmPjwouJNjHEvV4eDqtT0j2do4tekLvsy3RMIzs9fQC6XJf4lVNqDAVVfRExG1pxQ htj4yws5YiB2+XdK1n1+Aj6U+EuZU73j/HumkBg0Iiz6pmBWYT89bXn2R5Shs1Wy3VpJ oWIEqyBxUVDWJlSkpLM1Dcg2HMpG9zur+pxdj6uPimF7fLZ/u2dJwJ8X0JyJX02tApYO yRslUbpL9aOwGj8VVDp6H5M3+8gK/xwvuTFFDNqjnRQWHVt3Fz4E0aBoKG+H7kJ5/pDM 4JCee7b6SAYzZ+U2s/cPvM6VcQjY1eI+cm9tZ0p/DPKulZwWKTrdq+IKJTBa1vfA5O4o POxw== X-Gm-Message-State: AJIora9Bl86olwerjeFAU3lqA6RnZ1jaljAyyRd/d7U+u6n1RMeskBNh 8E5CLWrewIplG4hDxeT2e8rjMoDd8qk= X-Google-Smtp-Source: AGRyM1tyggF6Z+Ugbq2KrjFdSvmHZjpjeQG4nlSe7IM5ox1zbezs+PSSQqlQ5e/6l0ht+JvmDhENfw== X-Received: by 2002:a05:6870:ea8e:b0:fe:251a:3c3d with SMTP id s14-20020a056870ea8e00b000fe251a3c3dmr18480397oap.62.1655731279065; Mon, 20 Jun 2022 06:21:19 -0700 (PDT) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com. [209.85.160.44]) by smtp.gmail.com with ESMTPSA id m4-20020a4a9504000000b0040e5ff4a737sm7635121ooi.26.2022.06.20.06.21.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jun 2022 06:21:18 -0700 (PDT) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-101ab23ff3fso10501132fac.1 for ; Mon, 20 Jun 2022 06:21:18 -0700 (PDT) X-Received: by 2002:a05:6870:461b:b0:e9:a015:36a6 with SMTP id z27-20020a056870461b00b000e9a01536a6mr16999068oao.185.1655731278613; Mon, 20 Jun 2022 06:21:18 -0700 (PDT) MIME-Version: 1.0 References: <1210252696.3932.1655720006494@www> <784163289.4050.1655724206563@www> In-Reply-To: <784163289.4050.1655724206563@www> Reply-To: joel@rtems.org From: Joel Sherrill Date: Mon, 20 Jun 2022 08:21:06 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Build of any gcc breaks on my sparc / illumos env To: Gabriele Bulfon Cc: GCC X-Spam-Status: No, score=-3031.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2022 13:21:23 -0000 On Mon, Jun 20, 2022, 7:23 AM Gabriele Bulfon wrote: > Who may be responsible for this alignment? > The same Makefile has been used in other distros, and the same 4.7 that > I'm using was built on another previous system without problems, but now > produces this error itself on the new system. > I bet this is something about the env on the new system, but I don't know > what piece is responsible for this alignment. > This would come from binutils. Did you upgrade those also? I think if you use a -v on the linking gcc invocation, it should show the linker.xommand and script used. Just follow that info to locate the linker script and then look just before the unaligned section. --joel > > Any clue? > Gabriele > > > *Sonicle S.r.l. *: http://www.sonicle.com > *Music: *http://www.gabrielebulfon.com > *eXoplanets : *https://gabrielebulfon.bandcamp.com/album/exoplanets > > > ------------------------------ > > > *Da:* Joel Sherrill > *A:* Gabriele Bulfon > *Cc:* GCC > *Data:* 20 giugno 2022 13.04.17 CEST > *Oggetto:* Re: Build of any gcc breaks on my sparc / illumos env > > > > > On Mon, Jun 20, 2022, 5:14 AM Gabriele Bulfon via Gcc > wrote: > >> Hi, >> >> I'm the maintainer of the XStreamOS/illumos distro, mainly x86 but we >> also have a sparc version. >> I'm currently trying to upgrade a T4 system running XStreamOS/sparc as of >> illumos 2019. >> This system contains a gcc 4.7 that I used to build all the various >> userland components, built on a previous XStreamOS basic system through a >> gcc 3. >> I don't know what changed in the env of the T4 system, with respect to >> the previous where I built gcc 4.7. >> On this system I cannot build any of gcc 5,6,7,8,9,10. >> The build always breaks here: >> >> libtool: link: >> /data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/xgcc >> -shared-libgcc >> -B/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc >> -nostdinc++ >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs >> -B/usr/gcc/6/sparc-sun-solaris2.11/bin/ >> -B/usr/gcc/6/sparc-sun-solaris2.11/lib/ -isystem >> /usr/gcc/6/sparc-sun-solaris2.11/include -isystem >> /usr/gcc/6/sparc-sun-solaris2.11/sys-include -shared -nostdlib >> /usr/lib/crti.o /usr/lib/values-Xa.o >> /data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/crtbeginS.o >> .libs/compatibility.o .libs/compatibility-debug_list.o >> .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o >> .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o >> .libs/compatibility-chrono.o .libs/compatibility-condvar.o -Wl,-z >> -Wl,allextract ../libsupc++/.libs/libsupc++convenience.a >> ../src/c++98/.libs/libc++98convenience.a >> ../src/c++11/.libs/libc++11convenience.a -Wl,-z -Wl,defaultextract >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs >> -lm >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc >> -lgcc_s -lc -lgcc_s -lc >> /data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/crtendS.o >> /usr/lib/crtn.o -Wl,-M -Wl,libstdc++-symbols.ver-sun -Wl,-h >> -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.22 >> ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o: >> symbol .gcc_except_table (section): offset 0xffffffff74d8ddf1 is non-aligned >> ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o: >> symbol .gcc_except_table (section): offset 0xffffffff74d8de11 is non-aligned >> ld: fatal: relocation error: R_SPARC_DISP32: file >> .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section): >> offset 0xffffffff74d8de99 is non-aligned >> ld: fatal: relocation error: R_SPARC_DISP32: file >> .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section): >> offset 0xffffffff74d8deb9 is non-aligned >> ... > > > Any chance the linker script is missing an align directive ahead of this > section? Or it is insufficient? Or (unlikely) broken? > > --joel > > >> >> As an example, the ".libs/compatibility.o" file is built like this: >> >> libtool: compile: >> /data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/xgcc >> -shared-libgcc >> -B/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc >> -nostdinc++ >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs >> -L/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs >> -B/usr/gcc/6/sparc-sun-solaris2.11/bin/ >> -B/usr/gcc/6/sparc-sun-solaris2.11/lib/ -isystem >> /usr/gcc/6/sparc-sun-solaris2.11/include -isystem >> /usr/gcc/6/sparc-sun-solaris2.11/sys-include >> -I/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/include/sparc-sun-solaris2.11 >> -I/data/sources/sonicle/xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/include >> -I/data/sources/sonicle/xstream-userland-gate/components/gcc-6/gcc-6.5.0/libstdc++-v3/libsupc++ >> -std=gnu++98 -fPIC -DPIC -fno-implicit-templates -Wall -Wextra >> -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once >> -ffunction-sections -fdata-sections -frandom-seed=compatibility.lo -g -O2 >> -c >> /data/sources/sonicle/xstream-userland-gate/components/gcc-6/gcc-6.5.0/libstdc++-v3/src/c++98/compatibility.cc >> -fPIC -DPIC -D_GLIBCXX_SHARED -o .libs/compatibility.o >> >> I cannot find what is causing this non-aligned problem. >> This is how configure is invoked: >> >> /data/sources/sonicle/xstream-userland-gate/components/gcc-6/gcc-6.5.0/configure >> --prefix=/usr/gcc/6 --mandir=/usr/gcc/6/share/man --bindir=/usr/gcc/6/bin >> --libdir=/usr/gcc/6/lib --sbindir=/usr/gcc/6/sbin --infodir=/usr/share/info >> --sysconfdir=/etc --without-gnu-as --with-as=/usr/bin/as >> --build=sparc-sun-solaris2.11 --sbindir=/usr/gcc/6/bin >> --libdir=/usr/gcc/6/lib --libexecdir=/usr/gcc/6/lib --host >> sparc-sun-solaris2.11 --build sparc-sun-solaris2.11 --target >> sparc-sun-solaris2.11 --with-pkgversion="XStreamOS 6.5.0-XS-2" >> --with-bugurl="https://bugs.xstreamos.org" --enable-plugins >> --enable-objc-gc --enable-initfini-array >> --enable-languages=c,c++,fortran,lto,objc --without-gnu-ld >> --with-ld=/usr/bin/ld >> --with-build-time-tools=/usr/gnu/sparc-sun-solaris2.11/bin --disable-libitm >> --without-gnu-as --with-as=/usr/bin/as LDFLAGS="-R/usr/gcc/6/lib" >> >> As you can see, I use both illumos as and ld, but I also tried using gnu >> as with the same result. >> I also tried using gnu ld (which is not recommended on a sparc build, >> AFAIK), but that brought in different problems earlier. >> >> Anyone can help? >> >> Thanks! >> Gabriele >> >> >> >> Sonicle S.r.l. : http://www.sonicle.com >> Music: http://www.gabrielebulfon.com >> eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets >> >> >>