Created attachment 35860 [details] res file With gcc 5.1 is was possible to compile executables statically with with an libc (musl) static library. It is no longer possible with 6.0 COLLECT_GCC_OPTIONS='-c' '-ffp-contract=off' '-fmath-errno' '-fsigned-zeros' '-ftrapping-math' '-fno-trapv' '-fno-openmp' '-fno-openacc' '-mtune=generic' '-march=x86-64' '-O2' '-fPIC' '-fno-exceptions' '-B' '/x32/gcc/stageN/./gcc/' '-B' '/x32/build/host/x86_64-sb-linux-muslx32/bin/' '-B' '/x32/build/host/x86_64-sb-linux-muslx32/lib/' '-v' '-save-temps' '-mtune=generic' '-march=x86-64' '-fltrans-output-list=/tmp/cctXDCnL.ltrans.out' '-fwpa' '-fresolution=conftest.res' /x32/gcc/stageN/./gcc/lto1 -quiet -dumpbase crt1.o -mtune=generic -march=x86-64 -mtune=generic -march=x86-64 -auxbase crt1 -O2 -version -ffp-contract=off -fmath-errno -fsigned-zeros -ftrapping-math -fno-trapv -fno-openmp -fno-openacc -fPIC -fno-exceptions -fltrans-output-list=/tmp/cctXDCnL.ltrans.out -fwpa -fresolution=conftest.res @/tmp/ccir6VzL GNU GIMPLE (GCC) version 6.0.0 20150619 (experimental) (x86_64-sb-linux-muslx32) compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 6.0.0 20150619 (experimental) (x86_64-sb-linux-muslx32) compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 lto1: internal compiler error: bytecode stream: found non-null terminated string Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: fatal error: /x32/gcc/stageN/./gcc/xgcc returned 1 exit status compilation terminated. [Leaving LTRANS /tmp/ccO8tBym] [Leaving LTRANS /tmp/cctXDCnL.ltrans.out] /x32/build/host/x86_64-sb-linux-muslx32/bin/ld: fatal error: lto-wrapper failed
Created attachment 35861 [details] preproc source
Are you sure that this is not a bug in musl?
Musl claims that they support LTO. Also all that I have changed was bumping gcc from the 5.1_release tag to the latest overnight commit. The res file doesn't even include libc.so (nor libc.a for a static build) which is strange and musl has long claimed to support lto without fat objects. (In reply to Andrew Pinski from comment #2) > Are you sure that this is not a bug in musl?
MUSL support is not included in GCC 5.x is another thing. Also you are using x32 which is not tested that much.
(In reply to Andrew Pinski from comment #4) > MUSL support is not included in GCC 5.x is another thing. Also you are > using x32 which is not tested that much. Can it be reproduced with x32 glibc?
(In reply to H.J. Lu from comment #5) > (In reply to Andrew Pinski from comment #4) > > MUSL support is not included in GCC 5.x is another thing. Also you are > > using x32 which is not tested that much. > > Can it be reproduced with x32 glibc? I am pretty sure it can be reproduced without any libc. Actually, for some reason the libc.a file isn't even in the res file. This used to appear in the 5.1 version.
(In reply to Guido Haztsis from comment #6) > I am pretty sure it can be reproduced without any libc. Actually, for some > reason the libc.a file isn't even in the res file. This used to appear in > the 5.1 version. Does it mean it is musl specific and it can be reproduced with musl for any targets?
(In reply to Guido Haztsis from comment #6) > (In reply to H.J. Lu from comment #5) > > (In reply to Andrew Pinski from comment #4) > > > MUSL support is not included in GCC 5.x is another thing. Also you are > > > using x32 which is not tested that much. > > > > Can it be reproduced with x32 glibc? > > I am pretty sure it can be reproduced without any libc. Actually, for some > reason the libc.a file isn't even in the res file. This used to appear in > the 5.1 version. We are talking about the compiled GCC here. Not the one being used with GCC at this point.
Are you sure you produced all LTO bytecode with exactly the same compiler? Reminds me to bump the LTO bytecode version again on trunk (it's still the same as that on the GCC 5 branch...)
(In reply to Richard Biener from comment #9) > Are you sure you produced all LTO bytecode with exactly the same compiler? > Reminds me to bump the LTO bytecode version again on trunk (it's still the > same > as that on the GCC 5 branch...) Was it bumped from 4 to 5? Yes, I am pretty sure I am using the same compliler.