On 22/08/17 11:17, Richard Biener wrote: > On Tue, 22 Aug 2017, Szabolcs Nagy wrote: >> on aarch64_be-none-elf i see >> >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 (test for excess errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -O (test for excess errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -O3 (test for excess errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g1 (test for excess errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g1 -O (test for excess >> errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g1 -O3 (test for excess >> errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g3 (test for excess errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g3 -O (test for excess >> errors) >> PASS->FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g3 -O3 (test for excess >> errors) >> PASS->FAIL: gcc.dg/lto/20090914-1 c_lto_20090914-1_0.o-c_lto_20090914-1_0.o >> link, -flto >> PASS->FAIL: gcc.dg/lto/20100426 c_lto_20100426_0.o-c_lto_20100426_0.o link, >> -r -nostdlib -flto -g >> PASS->FAIL: gcc.dg/lto/20111207-2 c_lto_20111207-2_0.o-c_lto_20111207-2_0.o >> link, -g -O -flto >> PASS->FAIL: gcc.dg/lto/20111213-1 c_lto_20111213-1_0.o-c_lto_20111213-1_0.o >> link, -flto -g >> PASS->FAIL: gcc.dg/lto/pr51572-1 c_lto_pr51572-1_0.o-c_lto_pr51572-1_0.o >> link, -flto -g >> PASS->FAIL: gcc.dg/lto/pr53470 c_lto_pr53470_0.o-c_lto_pr53470_0.o link, >> -flto -g >> PASS->FAIL: gcc.dg/lto/pr59323 c_lto_pr59323_0.o-c_lto_pr59323_0.o link, >> -O2 -g -flto >> PASS->FAIL: gcc.dg/lto/pr59323-2 c_lto_pr59323-2_0.o-c_lto_pr59323-2_0.o >> link, -O2 -g -flto >> PASS->FAIL: gcc.dg/pr43557-1.c (test for excess errors) >> >> linking seems to fail with >> >> /tmp/ccqAb1Wfdebugobjtem: file not recognized: Bad value >> collect2: error: ld returned 1 exit status >> lto-wrapper: fatal error: B/gcc/xgcc returned 1 exit status >> compilation terminated. >> P/aarch64_be-none-elf/bin/ld: error: lto-wrapper failed >> collect2: error: ld returned 1 exit status >> compiler exited with status 1 > > Can you file a bugreport please? Can you investigate a bit, I suspect > a simple int main() {} and ./xgcc -B. -flto -g t.c fails the same way. > With -save-temps -v you should be able to inspect the generated > debugobj with readelf. >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81925 i could not figure much out, readelf could parse lto1 input but printed errors on the final link command input. > Is this a native compiler or a cross-compiler? [I suspect endianess > issues somewhere?] cross compiler (from aarch64-linux-gnu to aarch64_be-none-elf)