Summary: | sys-devel/clang-2.7-r2 fails one test | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Xake <kanelxake> |
Component: | New packages | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Xake
2010-08-05 16:34:12 UTC
Hello, please attach the full build.log and environment files mentioned at the end of the emerge process. Thanks, Michael The build.log is to big to attach, however the question is if it really is necessary. I think the problem is that the test makes an asm file with the help of clang, then compiles it into an object with the help of gcc, and then in the third step tries to link it with the help of gcc. the last step fails and I think it is due to the first two steps not creating any PIC code, however if you are using hardened the last step currently requires it. This is confirmed by doing the following: lillen ~ # "/var/tmp/portage/sys-devel/clang-2.7-r2/work/llvm-2.7/Release-Asserts/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -S -disable-free -disable-llvm-verifier -main-file-name hello.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -munwind-tables -target-cpu x86-64 -resource-dir /var/tmp/portage/sys-devel/clang-2.7-r2/work/llvm-2.7/Release-Asserts/lib/clang/1.1 -fmessage-length 0 -fgnu-runtime -fdiagnostics-show-option -o testing.s -x c /var/tmp/portage/sys-devel/clang-2.7-r2/work/llvm-2.7/tools/clang/test/Driver/hello.c lillen ~ # gcc -c -m64 -o testing.o -x assembler testing.s lillen ~ # gcc -m64 -o testing testing.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: bajs.o: relocation R_X86_64_32 against `.rodata.str1.16' can not be used when making a shared object; recompile with -fPIC bajs.o: could not read symbols: Bad value collect2: ld returnerade avslutningsstatus 1 lillen ~ # gcc -nopie -m64 -o testing testing.o lillen ~ # ./testing I'm a little driver, short and stout.lillen ~ # hehe, I saw I did not sanitise all output, do a s/bajs/testing/ in the last comment and everything is set.;) Cleaning old bugs, clang (and its ebuild) has come a long way since 2.7 :) |