Now that GNU binutils targets 64-bit by default, gcc needs to explicitly pass --32 to the assembler. --- illumos-gcc-0f5ed4c/gcc/config/i386/sol2-10.h.orig +++ illumos-gcc-0f5ed4c/gcc/config/i386/sol2-10.h @@ -26,7 +26,7 @@ #undef ASM_SPEC #ifdef USE_GAS #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \ - "%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)" + "%{Wa,*:%*} %{!m64:--32} %{m64:--64} -s %(asm_cpu)" #else #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \ "%{Wa,*:%*} %{m32:-xarch=generic} %{m64:-xarch=generic64} " \ --- illumos-gcc-0f5ed4c/gcc/configure.orig +++ illumos-gcc-0f5ed4c/gcc/configure @@ -22108,7 +22108,7 @@ leal foo@NTPOFF(%ecx), %eax' tls_first_major=2 tls_first_minor=14 - tls_as_opt=--fatal-warnings + tls_as_opt="-32 --fatal-warnings" ;; x86_64-*-*) conftest_s=' --- illumos-gcc-0f5ed4c/gcc/configure.ac.orig +++ illumos-gcc-0f5ed4c/gcc/configure.ac @@ -2551,7 +2551,7 @@ leal foo@NTPOFF(%ecx), %eax' tls_first_major=2 tls_first_minor=14 - tls_as_opt=--fatal-warnings + tls_as_opt="-32 --fatal-warnings" ;; x86_64-*-*) conftest_s='