public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Build of any gcc breaks on my sparc / illumos env
@ 2022-06-20 10:13 Gabriele Bulfon
  2022-06-20 11:04 ` Joel Sherrill
  2022-06-21  7:39 ` Eric Botcazou
  0 siblings, 2 replies; 10+ messages in thread
From: Gabriele Bulfon @ 2022-06-20 10:13 UTC (permalink / raw)
  To: gcc

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
....
 
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
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-20 10:13 Build of any gcc breaks on my sparc / illumos env Gabriele Bulfon
@ 2022-06-20 11:04 ` Joel Sherrill
  2022-06-20 11:23   ` Gabriele Bulfon
  2022-06-21  7:39 ` Eric Botcazou
  1 sibling, 1 reply; 10+ messages in thread
From: Joel Sherrill @ 2022-06-20 11:04 UTC (permalink / raw)
  To: Gabriele Bulfon; +Cc: GCC

On Mon, Jun 20, 2022, 5:14 AM Gabriele Bulfon via Gcc <gcc@gcc.gnu.org>
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
>
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-20 11:04 ` Joel Sherrill
@ 2022-06-20 11:23   ` Gabriele Bulfon
  2022-06-20 13:21     ` Joel Sherrill
  0 siblings, 1 reply; 10+ messages in thread
From: Gabriele Bulfon @ 2022-06-20 11:23 UTC (permalink / raw)
  To: joel; +Cc: GCC

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.
 
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 <joel@rtems.org>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: GCC <gcc@gcc.gnu.org>
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 <gcc@gcc.gnu.org> 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
 





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-20 11:23   ` Gabriele Bulfon
@ 2022-06-20 13:21     ` Joel Sherrill
  2022-06-20 16:09       ` Gabriele Bulfon
  0 siblings, 1 reply; 10+ messages in thread
From: Joel Sherrill @ 2022-06-20 13:21 UTC (permalink / raw)
  To: Gabriele Bulfon; +Cc: GCC

On Mon, Jun 20, 2022, 7:23 AM Gabriele Bulfon <gbulfon@sonicle.com> 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 <joel@rtems.org>
> *A:* Gabriele Bulfon <gbulfon@sonicle.com>
> *Cc:* GCC <gcc@gcc.gnu.org>
> *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 <gcc@gcc.gnu.org>
> 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
>>
>>
>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-20 13:21     ` Joel Sherrill
@ 2022-06-20 16:09       ` Gabriele Bulfon
  2022-06-21 11:44         ` Joel Sherrill
  0 siblings, 1 reply; 10+ messages in thread
From: Gabriele Bulfon @ 2022-06-20 16:09 UTC (permalink / raw)
  To: joel; +Cc: GCC

Thanks! This is what I get adding "-v", and to me it's not telling anything interesting, maybe you can see more than I can?

Reading specs from /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/specs
COLLECT_GCC=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/xgcc
COLLECT_LTO_WRAPPER=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/lto-wrapper
Target: sparc-sun-solaris2.11
Configured with: /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/spar
c-sun-solaris2.11/bin --disable-libitm --without-gnu-as --with-as=/usr/bin/as LDFLAGS=-R/usr/gcc/6/lib
Thread model: posix
gcc version 6.5.0 (XStreamOS 6.5.0-XS-2)
COMPILER_PATH=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/:/usr/ccs/bin/
LIBRARY_PATH=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-B' '/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc' '-nostdinc++' '-L/data/sources/sonicle/old-xstream-userl
and-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src' '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstd
c++-v3/src/.libs' '-L/data/sources/sonicle/old-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' '-L/
data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs' '-L/data/sources/sonicle/old-xstream-userland-gate/component
s/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src' '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs'
'-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc' '-o' '.libs/libstdc++.so.6.0.22' '-mcpu=v9'
 /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/collect2 -V -G -dy -z text -M /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/spa
rcv7/./gcc/libgcc-unwind.map -Y P,/usr/gcc/6/lib:/lib:/usr/lib -R /usr/gcc/6/lib -L /usr/gcc/6/lib -Qy -o .libs/libstdc++.so.6.0.22 -L/data/sources/sonicle/old-xstream-userland-gate/componen
ts/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs -L
/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs -L/data/sources/sonicle/old-xstream-userland-gate/components
/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/sr
c -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs -L/data/sources/sonicle/old-xstream-userland-gate/components/g
cc-6/build/sparcv7/./gcc -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc /usr/lib/crti.o /usr/lib/values-Xa.o /data/sources/sonicle/old-xstream-userlan
d-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/compatibil
ity-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o -z allextract ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/li
bc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -z defaultextract -lm -lgcc_s -lc -lgcc_s -lc /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gc
c/crtendS.o /usr/lib/crtn.o -M libstdc++-symbols.ver-sun -h libstdc++.so.6
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1756 (illumos)
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o: symbol .gcc_except_table (section): offset 0xffffffff7518de91 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o: symbol .gcc_except_table (section): offset 0xffffffff7518deb1 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518df39 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518df59 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-thread-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518dfb5 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-thread-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518dff5 is non-aligned
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 

 


Da: Joel Sherrill <joel@rtems.org>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: GCC <gcc@gcc.gnu.org>
Data: 20 giugno 2022 15.21.06 CEST
Oggetto: Re: Build of any gcc breaks on my sparc / illumos env





On Mon, Jun 20, 2022, 7:23 AM Gabriele Bulfon <gbulfon@sonicle.com> 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 <joel@rtems.org>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: GCC <gcc@gcc.gnu.org>
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 <gcc@gcc.gnu.org> 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
 









^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-20 10:13 Build of any gcc breaks on my sparc / illumos env Gabriele Bulfon
  2022-06-20 11:04 ` Joel Sherrill
@ 2022-06-21  7:39 ` Eric Botcazou
  2022-07-05 17:38   ` Gabriele Bulfon
  1 sibling, 1 reply; 10+ messages in thread
From: Eric Botcazou @ 2022-06-21  7:39 UTC (permalink / raw)
  To: Gabriele Bulfon; +Cc: gcc

> 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?

Using GNU as + Solaris ld is the recommended combination with recent versions 
of the compiler, but Solaris ld must be recent enough, otherwise building for 
sparc-sun-solaris2.11 probably does not work indeed.

-- 
Eric Botcazou



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-20 16:09       ` Gabriele Bulfon
@ 2022-06-21 11:44         ` Joel Sherrill
  2022-07-05 17:44           ` Gabriele Bulfon
  0 siblings, 1 reply; 10+ messages in thread
From: Joel Sherrill @ 2022-06-21 11:44 UTC (permalink / raw)
  To: Gabriele Bulfon; +Cc: GCC

Well we got gcc's verbose but in the we need ld's. Should be something like
-Wl,-v

If someone actually knew offhand which linker script template of used in
this cases it would help. I don't and always have to dig.

--joel

On Mon, Jun 20, 2022, 12:09 PM Gabriele Bulfon <gbulfon@sonicle.com> wrote:

> Thanks! This is what I get adding "-v", and to me it's not telling
> anything interesting, maybe you can see more than I can?
>
> Reading specs from
> /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/specs
>
> COLLECT_GCC=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/xgcc
>
> COLLECT_LTO_WRAPPER=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/lto-wrapper
> Target: sparc-sun-solaris2.11
> Configured with:
> /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/spar
> c-sun-solaris2.11/bin --disable-libitm --without-gnu-as
> --with-as=/usr/bin/as LDFLAGS=-R/usr/gcc/6/lib
> Thread model: posix
> gcc version 6.5.0 (XStreamOS 6.5.0-XS-2)
>
> COMPILER_PATH=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/:/usr/ccs/bin/
>
> LIBRARY_PATH=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/:/lib/:/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-B'
> '/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc'
> '-nostdinc++' '-L/data/sources/sonicle/old-xstream-userl
> and-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src'
> '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstd
> c++-v3/src/.libs'
> '-L/data/sources/sonicle/old-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' '-L/
> data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs'
> '-L/data/sources/sonicle/old-xstream-userland-gate/component
> s/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src'
> '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs'
> '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc'
> '-o' '.libs/libstdc++.so.6.0.22' '-mcpu=v9'
>  /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/collect2
> -V -G -dy -z text -M
> /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/spa
> rcv7/./gcc/libgcc-unwind.map -Y P,/usr/gcc/6/lib:/lib:/usr/lib -R
> /usr/gcc/6/lib -L /usr/gcc/6/lib -Qy -o .libs/libstdc++.so.6.0.22
> -L/data/sources/sonicle/old-xstream-userland-gate/componen
> ts/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src
> -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs
> -L
> /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs
> -L/data/sources/sonicle/old-xstream-userland-gate/components
> /gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs
> -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/sr
> c
> -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs
> -L/data/sources/sonicle/old-xstream-userland-gate/components/g
> cc-6/build/sparcv7/./gcc
> -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc
> /usr/lib/crti.o /usr/lib/values-Xa.o
> /data/sources/sonicle/old-xstream-userlan
> d-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/compatibil
> ity-atomic-c++0x.o .libs/compatibility-thread-c++0x.o
> .libs/compatibility-chrono.o .libs/compatibility-condvar.o -z allextract
> ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/li
> bc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -z
> defaultextract -lm -lgcc_s -lc -lgcc_s -lc
> /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gc
> c/crtendS.o /usr/lib/crtn.o -M libstdc++-symbols.ver-sun -h libstdc++.so.6
> ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1756
> (illumos)
> ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o:
> symbol .gcc_except_table (section): offset 0xffffffff7518de91 is non-aligned
> ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o:
> symbol .gcc_except_table (section): offset 0xffffffff7518deb1 is non-aligned
> ld: fatal: relocation error: R_SPARC_DISP32: file
> .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section):
> offset 0xffffffff7518df39 is non-aligned
> ld: fatal: relocation error: R_SPARC_DISP32: file
> .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section):
> offset 0xffffffff7518df59 is non-aligned
> ld: fatal: relocation error: R_SPARC_DISP32: file
> .libs/compatibility-thread-c++0x.o: symbol .gcc_except_table (section):
> offset 0xffffffff7518dfb5 is non-aligned
> ld: fatal: relocation error: R_SPARC_DISP32: file
> .libs/compatibility-thread-c++0x.o: symbol .gcc_except_table (section):
> offset 0xffffffff7518dff5 is non-aligned
>
>
> *Sonicle S.r.l. *: http://www.sonicle.com
> *Music: *http://www.gabrielebulfon.com
> *eXoplanets : *https://gabrielebulfon.bandcamp.com/album/exoplanets
>
>
> ------------------------------
>
>
> *Da:* Joel Sherrill <joel@rtems.org>
> *A:* Gabriele Bulfon <gbulfon@sonicle.com>
> *Cc:* GCC <gcc@gcc.gnu.org>
> *Data:* 20 giugno 2022 15.21.06 CEST
> *Oggetto:* Re: Build of any gcc breaks on my sparc / illumos env
>
>
>
>
> On Mon, Jun 20, 2022, 7:23 AM Gabriele Bulfon <gbulfon@sonicle.com> 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 <joel@rtems.org>
>> *A:* Gabriele Bulfon <gbulfon@sonicle.com>
>> *Cc:* GCC <gcc@gcc.gnu.org>
>> *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 <gcc@gcc.gnu.org>
>> 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
>>>
>>>
>>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-21  7:39 ` Eric Botcazou
@ 2022-07-05 17:38   ` Gabriele Bulfon
  2022-07-05 18:04     ` Rainer Orth
  0 siblings, 1 reply; 10+ messages in thread
From: Gabriele Bulfon @ 2022-07-05 17:38 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

Hi, took me some time to get back to this.
The reason why I need to build new gccs is that to build latest illumos gate I need gcc7 and gcc10 together.
The illumos gate that I can build with illumos gcc 4.4.4 is around 2019, so I tried backporting latest ld, libld, libelf, liblddbg sources to my 2019 gate and rebuilt only these components manually, than installed bin and libs manually.
The problem persists. Is there any other components I need to backport? Using ldd I see only these dependencies for ld.
 
Gabriele
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 




----------------------------------------------------------------------------------

Da: Eric Botcazou <ebotcazou@libertysurf.fr>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: gcc@gcc.gnu.org
Data: 21 giugno 2022 9.39.59 CEST
Oggetto: Re: Build of any gcc breaks on my sparc / illumos env

> 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?Using GNU as + Solaris ld is the recommended combination with recent versions of the compiler, but Solaris ld must be recent enough, otherwise building for sparc-sun-solaris2.11 probably does not work indeed.-- Eric Botcazou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-06-21 11:44         ` Joel Sherrill
@ 2022-07-05 17:44           ` Gabriele Bulfon
  0 siblings, 0 replies; 10+ messages in thread
From: Gabriele Bulfon @ 2022-07-05 17:44 UTC (permalink / raw)
  To: joel; +Cc: GCC

Hi, took me sometime to get back to this.
The "-v" options is not available on Solaris ld.
I tried other debug options but nothing special was in the output, just that long list of relocation errors.
What I see is that ld is complaining during link to produce ".so", about the single ".o" files, as if they are built wrong containing non-aligned offsets.
So I looked for a single ".o" how it was built and here is how it is built:
 
/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/build/sparcv7/./gcc/xgcc -shared-libgcc -B/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/build/sparcv7/./gcc -nostdinc++ -L/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src -L/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs -L/data/sources/sonicle/xstream-userland-gate/components/developer/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/developer/gcc-6/gcc-6.5.0/libstdc++-v3/../libgcc -I/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/include/sparc-sun-solaris2.11 -I/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/include -I/data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/gcc-6.5.0/libstdc++-v3/libsupc++ -std=gnu++11 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=wstring-io-inst.lo -g -O2 -c /data/sources/sonicle/xstream-userland-gate/components/developer/gcc-6/gcc-6.5.0/libstdc++-v3/src/c++11/wstring-io-inst.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o wstring-io-inst.o
 
So I'm thinking the problem is on the temporary built xgcc that is producing a wrong ".o".
 
Any more ideas?
 
Gabriele
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 

 


Da: Joel Sherrill <joel@rtems.org>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: GCC <gcc@gcc.gnu.org>
Data: 21 giugno 2022 13.44.22 CEST
Oggetto: Re: Build of any gcc breaks on my sparc / illumos env



Well we got gcc's verbose but in the we need ld's. Should be something like -Wl,-v 
If someone actually knew offhand which linker script template of used in this cases it would help. I don't and always have to dig.
 
--joel


On Mon, Jun 20, 2022, 12:09 PM Gabriele Bulfon <gbulfon@sonicle.com> wrote:
Thanks! This is what I get adding "-v", and to me it's not telling anything interesting, maybe you can see more than I can?

Reading specs from /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/specs
COLLECT_GCC=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/xgcc
COLLECT_LTO_WRAPPER=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/lto-wrapper
Target: sparc-sun-solaris2.11
Configured with: /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/spar
c-sun-solaris2.11/bin --disable-libitm --without-gnu-as --with-as=/usr/bin/as LDFLAGS=-R/usr/gcc/6/lib
Thread model: posix
gcc version 6.5.0 (XStreamOS 6.5.0-XS-2)
COMPILER_PATH=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/:/usr/ccs/bin/
LIBRARY_PATH=/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-B' '/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc' '-nostdinc++' '-L/data/sources/sonicle/old-xstream-userl
and-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src' '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstd
c++-v3/src/.libs' '-L/data/sources/sonicle/old-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' '-L/
data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs' '-L/data/sources/sonicle/old-xstream-userland-gate/component
s/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src' '-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs'
'-L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc' '-o' '.libs/libstdc++.so.6.0.22' '-mcpu=v9'
 /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc/collect2 -V -G -dy -z text -M /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/spa
rcv7/./gcc/libgcc-unwind.map -Y P,/usr/gcc/6/lib:/lib:/usr/lib -R /usr/gcc/6/lib -L /usr/gcc/6/lib -Qy -o .libs/libstdc++.so.6.0.22 -L/data/sources/sonicle/old-xstream-userland-gate/componen
ts/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs -L
/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs -L/data/sources/sonicle/old-xstream-userland-gate/components
/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/libsupc++/.libs -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/sr
c -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libstdc++-v3/src/.libs -L/data/sources/sonicle/old-xstream-userland-gate/components/g
cc-6/build/sparcv7/./gcc -L/data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gcc /usr/lib/crti.o /usr/lib/values-Xa.o /data/sources/sonicle/old-xstream-userlan
d-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/compatibil
ity-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o -z allextract ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/li
bc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -z defaultextract -lm -lgcc_s -lc -lgcc_s -lc /data/sources/sonicle/old-xstream-userland-gate/components/gcc-6/build/sparcv7/./gc
c/crtendS.o /usr/lib/crtn.o -M libstdc++-symbols.ver-sun -h libstdc++.so.6
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1756 (illumos)
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o: symbol .gcc_except_table (section): offset 0xffffffff7518de91 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility.o: symbol .gcc_except_table (section): offset 0xffffffff7518deb1 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518df39 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-atomic-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518df59 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-thread-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518dfb5 is non-aligned
ld: fatal: relocation error: R_SPARC_DISP32: file .libs/compatibility-thread-c++0x.o: symbol .gcc_except_table (section): offset 0xffffffff7518dff5 is non-aligned
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 

 


Da: Joel Sherrill <joel@rtems.org>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: GCC <gcc@gcc.gnu.org>
Data: 20 giugno 2022 15.21.06 CEST
Oggetto: Re: Build of any gcc breaks on my sparc / illumos env





On Mon, Jun 20, 2022, 7:23 AM Gabriele Bulfon <gbulfon@sonicle.com> 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 <joel@rtems.org>
A: Gabriele Bulfon <gbulfon@sonicle.com>
Cc: GCC <gcc@gcc.gnu.org>
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 <gcc@gcc.gnu.org> 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
 











^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Build of any gcc breaks on my sparc / illumos env
  2022-07-05 17:38   ` Gabriele Bulfon
@ 2022-07-05 18:04     ` Rainer Orth
  0 siblings, 0 replies; 10+ messages in thread
From: Rainer Orth @ 2022-07-05 18:04 UTC (permalink / raw)
  To: Gabriele Bulfon via Gcc

Hi Gabriele,

> Hi, took me some time to get back to this.
> The reason why I need to build new gccs is that to build latest illumos
> gate I need gcc7 and gcc10 together.
> The illumos gate that I can build with illumos gcc 4.4.4 is around 2019, so
> I tried backporting latest ld, libld, libelf, liblddbg sources to my 2019
> gate and rebuilt only these components manually, than installed bin and
> libs manually.
> The problem persists. Is there any other components I need to backport?
> Using ldd I see only these dependencies for ld.

no matter if you just want to build openindiana userland or the illumos
core, you will have no luck with unpatched upstream GCC: the
Illumos/OpenIndiana guys are keeping a large set of patches that have
never been upstreamed and are almost certainly required to get a working
gcc on Illumos, let alone one that is capable of building Illumos ON.

If at all, you should be starting from the oi-userland repo
(cf. components/developer/gcc-*) and check which version of GCC (beyond
the heavily patched gcc 4.4.4) is required to build Illumos.  Besides,
SPARC support has been removed from Illumos completely some time ago, so
you're pretty much on your own here.  You may have some luck getting
hints from Peter Tribble of Tribblix fame who provided a SPARC version
of his distribtion until August 2018.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-07-05 18:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 10:13 Build of any gcc breaks on my sparc / illumos env Gabriele Bulfon
2022-06-20 11:04 ` Joel Sherrill
2022-06-20 11:23   ` Gabriele Bulfon
2022-06-20 13:21     ` Joel Sherrill
2022-06-20 16:09       ` Gabriele Bulfon
2022-06-21 11:44         ` Joel Sherrill
2022-07-05 17:44           ` Gabriele Bulfon
2022-06-21  7:39 ` Eric Botcazou
2022-07-05 17:38   ` Gabriele Bulfon
2022-07-05 18:04     ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).