When trying to bootstrap mainline on Solaris 10/x86 with the native assembler, building libffi fails:
/vol/gcc/obj/gcc-4.2.0-20060126/10-gcc/./gcc/xgcc -B/vol/gcc/obj/gcc-4.2.0-20060126/10-gcc/./gcc/ -B/vol/gcc/share/i386-pc-solaris2.10/bin/ -B/vol/gcc/share/i386-pc-solaris2.10/lib/ -isystem /vol/gcc/share/i386-pc-solaris2.10/include -isystem /vol/gcc/share/i386-pc-solaris2.10/sys-include -I. -I/vol/gcc/src/gcc-dist/libffi/include -Iinclude -I/vol/gcc/src/gcc-dist/libffi/src -O2 -g -O2 -c /vol/gcc/src/gcc-dist/libffi/src/x86/sysv.S -fPIC -DPIC -o src/x86/.libs/sysv.o Assembler: "/var/tmp//ccQLHd1V.s", line 138 : Syntax error "/var/tmp//ccQLHd1V.s", line 138 : Illegal character: <7e> "/var/tmp//ccQLHd1V.s", line 139 : Syntax error "/var/tmp//ccQLHd1V.s", line 139 : Illegal character: <7e> "/var/tmp//ccQLHd1V.s", line 146 : Syntax error "/var/tmp//ccQLHd1V.s", line 146 : Illegal character: <7e> "/var/tmp//ccQLHd1V.s", line 204 : Warning: Illegal subtraction - symbols from different sections: ".LFB1", ".DOT-3" "/var/tmp//ccQLHd1V.s", line 223 : Warning: Illegal subtraction - symbols from different sections: ".LFB2", ".DOT-4" "/var/tmp//ccQLHd1V.s", line 246 : Warning: Illegal subtraction - symbols from different sections: ".LFB3", ".DOT-5" make[4]: *** [src/x86/sysv.lo] Error 1 The code in question (from running the command above with -save-temps) is ffi_closure_raw_SYSV: [...] movl ((10 + 3) & ~3)(%eax), %esi line 138 movl ((((10 + 3) & ~3) + 4) + 4)(%eax), %edx line 139 [...] call *(((10 + 3) & ~3) + 4)(%eax) line 146 .long .LEFDE1-.LASFDE1 .LASFDE1: .long .LASFDE1-.Lframe1 .long .LFB1-. line 204 I had already noticed this on 20051006, but hadn't reported it yet since the Solaris 10/x86 native as doesn't work due to still unfixed PR target/23359. The first part of the problem might perhaps be worked around by manual calculations as in src/mips/ffitarget.h, but I don't know a good solution for the second problem. The bug was introduced by this patch: 2005-08-11 Jakub Jelinek <[EMAIL PROTECTED]> * configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test. (AH_BOTTOM): Add FFI_HIDDEN definition. * configure: Rebuilt. * fficonfig.h.in: Rebuilt. * src/powerpc/ffi.c (hidden): Remove. (ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64, ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden. * src/powerpc/linux64_closure.S (ffi_closure_LINUX64, .ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden. * src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove, add FFI_HIDDEN to its prototype. (ffi_closure_SYSV_inner): New. * src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New. This is a regression from at least 3.4 where it was possible to bootstrap on Solaris 10/x86 with the native assembler. I don't know for sure about 4.0, though. Environment: System: SunOS erebus 5.10 Generic_Patch i86pc i386 i86pc Architecture: i86pc host: i386-pc-solaris2.10 build: i386-pc-solaris2.10 target: i386-pc-solaris2.10 configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls --disable-multilib --with-gmp-dir=/vol/gnu/obj/gmp-4.1.3 --with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr --enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap How-To-Repeat: Bootstrap mainline as described above. -- Summary: libffi doesn't build on Solaris 10/x86 with native assembler Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libffi AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ro at techfak dot uni-bielefeld dot de GCC build triplet: i386-pc-solaris2.10 GCC host triplet: i386-pc-solaris2.10 GCC target triplet: i386-pc-solaris2.10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26048