Just a quick follow up... I tried to update my Solaris system (host and zones) to the last patchset I could get ( 2017.12.14 ). i still get the same errors whatever the gcc i'm using. Which is by the way :
/usr/pkgsrc/lang/gcc7/work/build/./gcc/xgcc -B/usr/pkgsrc/lang/gcc7/work/build/./gcc/ -B/usr/pkg/gcc7/sparc64-sun-solaris2.10/bin/ -B/usr/pkg/gcc7/sparc64-sun-solaris2.10/lib/ -isystem /usr/pkg/gcc7/sparc64-sun-solaris2.10/include -isystem /usr/pkg/gcc7/sparc64-sun-solaris2.10/sys-include -O2 -g -O2 -std=gnu99 -O3 -D_FORTIFY_SOURCE=2 -I/usr/include -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -shared -nodefaultlibs -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs -Wl,-M,libgcc.map -o sparcv8plus/libgcc_s.so.1.tmp -g -O2 -std=gnu99 -O3 -D_FORTIFY_SOURCE=2 -I/usr/include -m32 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f sparcv8plus/libgcc_s.so && if [ -f sparcv8plus/libgcc_s.so.1 ]; then mv -f sparcv8plus/libgcc_s.so.1 sparcv8plus/libgcc_s.so.1.backup; else true; fi && mv sparcv8plus/libgcc_s.so.1.tmp sparcv8plus/libgcc_s.so.1 && ln -s libgcc_s.so.1 sparcv8plus/libgcc_s.so
ld: fatal: relocation error: R_SPARC_32: file _negdi2_s.o: symbol .text (section): offset 0xc62da is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _lshrdi3_s.o: symbol .text (section): offset 0xc64db is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ashldi3_s.o: symbol .text (section): offset 0xc66e9 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ashrdi3_s.o: symbol .text (section): offset 0xc68f7 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _cmpdi2_s.o: symbol .text (section): offset 0xc6b05 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clear_cache_s.o: symbol .text (section): offset 0xc6f0b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _absvsi2_s.o: symbol .text (section): offset 0xc74dd is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _absvdi2_s.o: symbol .text (section): offset 0xc76e2 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _addvsi3_s.o: symbol .text (section): offset 0xc78ea is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _addvdi3_s.o: symbol .text (section): offset 0xc7aed is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _subvsi3_s.o: symbol .text (section): offset 0xc7cf2 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _subvdi3_s.o: symbol .text (section): offset 0xc7ef5 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _mulvsi3_s.o: symbol .text (section): offset 0xc80fa is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _mulvdi3_s.o: symbol .text (section): offset 0xc82fd is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _negvsi2_s.o: symbol .text (section): offset 0xc8543 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _negvdi2_s.o: symbol .text (section): offset 0xc8746 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ffssi2_s.o: symbol .text (section): offset 0xc8b3a is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ffsdi2_s.o: symbol .text (section): offset 0xc8d3f is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clzsi2_s.o: symbol .text (section): offset 0xc913e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clzdi2_s.o: symbol .text (section): offset 0xc9346 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ctzsi2_s.o: symbol .text (section): offset 0xc9556 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _popcountsi2_s.o: symbol .text (section): offset 0xc9b5f is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _popcountdi2_s.o: symbol .text (section): offset 0xc9d66 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _paritysi2_s.o: symbol .text (section): offset 0xc9f75 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _paritydi2_s.o: symbol .text (section): offset 0xca179 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _powidf2_s.o: symbol .text (section): offset 0xca58e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _powitf2_s.o: symbol .text (section): offset 0xca97e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _mulsc3_s.o: symbol .text (section): offset 0xcad7b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _muldc3_s.o: symbol .text (section): offset 0xcafc5 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _multc3_s.o: symbol .text (section): offset 0xcb3fb is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divsc3_s.o: symbol .text (section): offset 0xcb873 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divdc3_s.o: symbol .text (section): offset 0xcbaae is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divtc3_s.o: symbol .text (section): offset 0xcbeca is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _bswapsi2_s.o: symbol .text (section): offset 0xcc12d is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clrsbsi2_s.o: symbol .text (section): offset 0xcc545 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clrsbdi2_s.o: symbol .text (section): offset 0xcc74e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunssfsi_s.o: symbol .text (section): offset 0xcc95d is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunsdfsi_s.o: symbol .text (section): offset 0xccb61 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixsfdi_s.o: symbol .text (section): offset 0xccf47 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixdfdi_s.o: symbol .text (section): offset 0xcd14b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixtfdi_s.o: symbol .text (section): offset 0xcd533 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunssfdi_s.o: symbol .text (section): offset 0xcd737 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunsdfdi_s.o: symbol .text (section): offset 0xcd943 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunstfdi_s.o: symbol .text (section): offset 0xcdd2a is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatdidf_s.o: symbol .text (section): offset 0xce15a is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatditf_s.o: symbol .text (section): offset 0xce549 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatundisf_s.o: symbol .text (section): offset 0xce751 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatunditf_s.o: symbol .text (section): offset 0xced53 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divdi3_s.o: symbol .text (section): offset 0xcef5b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _moddi3_s.o: symbol .text (section): offset 0xcf1a6 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _udivdi3_s.o: symbol .text (section): offset 0xcf66f is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _umoddi3_s.o: symbol .text (section): offset 0xcf8ba is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _udivmoddi4_s.o: symbol .text (section): offset 0xcfb0b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _udiv_w_sdiv_s.o: symbol .text (section): offset 0xcfd63 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file enable-execute-stack_s.o: symbol .text.startup (section): offset 0xcfe5a is non-aligned
ld: fatal: relocation error: R_SPARC_32: file unwind-dw2_s.o: symbol .text (section): offset 0xd01b1 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file unwind-dw2-fde-dip_s.o: symbol .text (section): offset 0xd113e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file unwind-c_s.o: symbol .text (section): offset 0xd1f5e is non-aligned
collect2: error: ld returned 1 exit status
Makefile:977: recipe for target 'libgcc_s.so' failed
gmake[5]: *** [libgcc_s.so] Error 1
gmake[5]: Leaving directory '/usr/pkgsrc/lang/gcc7/work/build/sparc64-sun-solaris2.10/sparcv8plus/libgcc'
Makefile:1198: recipe for target 'multi-do' failed
gmake[4]: *** [multi-do] Error 1
gmake[4]: Leaving directory '/usr/pkgsrc/lang/gcc7/work/build/sparc64-sun-solaris2.10/libgcc'
Makefile:123: recipe for target 'all-multi' failed
gmake[3]: *** [all-multi] Error 2
gmake[3]: Leaving directory '/usr/pkgsrc/lang/gcc7/work/build/sparc64-sun-solaris2.10/libgcc'
Makefile:20904: recipe for target 'all-stage1-target-libgcc' failed
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory '/usr/pkgsrc/lang/gcc7/work/build'
Makefile:26034: recipe for target 'stage1-bubble' failed
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory '/usr/pkgsrc/lang/gcc7/work/build'
Makefile:937: recipe for target 'all' failed
I runned a "make clean clean-depends" before building.
Quick question here : Is it there anybody who has successfully used/tested pkgsrc ( 2017Q3 ) on a Solaris 10 system ( global zone or local zone ) ?