[Bug 804088] New: clang 3.1 and clang 3.2 fail to link 32 bit executable under 64 bit opensuse
https://bugzilla.novell.com/show_bug.cgi?id=804088 https://bugzilla.novell.com/show_bug.cgi?id=804088#c0 Summary: clang 3.1 and clang 3.2 fail to link 32 bit executable under 64 bit opensuse Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: tizbac2@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17 Trying to use -m32 switch on clang makes the linker use wrong libraries and then fail because they have wrong architecture tiziano@linux-953a:~> gcc -m32 test.c -o test32 tiziano@linux-953a:~> clang -m32 test.c -o test32 /usr/bin/ld: skipping incompatible /usr/bin/../lib64/gcc/x86_64-suse-linux/4.7/../../../libc.so when searching for -lc /usr/bin/ld: i386:x86-64 architecture of input file `/usr/bin/../lib64/gcc/x86_64-suse-linux/4.7/../../../crt1.o' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `/usr/bin/../lib64/gcc/x86_64-suse-linux/4.7/../../../crti.o' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `/usr/bin/../lib64/gcc/x86_64-suse-linux/4.7/../../../crtn.o' is incompatible with i386 output /usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-suse-linux/4.7/../../../crti.o: file class ELFCLASS64 incompatible with ELFCLASS32 /usr/bin/ld: final link failed: File in wrong format clang: error: linker command failed with exit code 1 (use -v to see invocation) tiziano@linux-953a:~> Reproducible: Always Steps to Reproduce: 1. Write a simple hello world like C program 2. Save it to .c file 3. Try to compile it with clang -m32 Actual Results: Linker failure because of wrong libraries choosen Expected Results: Succesful linking -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=804088
https://bugzilla.novell.com/show_bug.cgi?id=804088#c
Xiaolong Li
https://bugzilla.novell.com/show_bug.cgi?id=804088
https://bugzilla.novell.com/show_bug.cgi?id=804088#c1
--- Comment #1 from Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=804088
https://bugzilla.novell.com/show_bug.cgi?id=804088#c2
S J
https://bugzilla.novell.com/show_bug.cgi?id=804088
https://bugzilla.novell.com/show_bug.cgi?id=804088#c3
--- Comment #3 from Markus Kolb
https://bugzilla.novell.com/show_bug.cgi?id=804088
https://bugzilla.novell.com/show_bug.cgi?id=804088#c4
--- Comment #4 from Markus Kolb
https://bugzilla.novell.com/show_bug.cgi?id=804088
https://bugzilla.novell.com/show_bug.cgi?id=804088#c5
Ismail Donmez
participants (1)
-
bugzilla_noreply@novell.com