Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

O4: File format not recognized #15224

Closed Quuxplusone closed 11 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR15224
Status RESOLVED INVALID
Importance P normal
Reported by wbrana@gmail.com
Reported on 2013-02-10 10:00:38 -0800
Last modified on 2013-02-10 10:15:07 -0800
Version 3.2
Hardware PC Linux
CC anton@korobeynikov.info, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
compilation of nbench fails when -O4 is used
http://www.tux.org/~mayer/linux/nbench-byte-2.2.3.tar.gz

# make
clang -Wall -pipe -v -O4 -g0  -march=corei7 -fomit-frame-pointer -funroll-loops
-ffast-math -fno-PIE -fno-exceptions -fno-stack-protector -static     pointer.c
-o pointer
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-llvm-bc -disable-free -disable-llvm-verifier -main-file-name pointer.c -static-define -mrelocation-model static -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -ffp-contract=fast -ffast-math -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu corei7 -target-linker-version 2.23.1 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.2 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.2/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -fdebug-compilation-dir /mnt/md3/cache/inst/nbench-byte-2.2.3 -ferror-limit 19 -fmessage-length 317 -funroll-loops -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/pointer-xeWu3U.o -x c pointer.c
clang -cc1 version 3.2 based upon LLVM 3.2svn default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/bin/../lib/clang/3.2/include
 /usr/include
End of search list.
 "/usr/bin/x86_64-pc-linux-gnu-ld" -m elf_x86_64 -static -o pointer /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/crtbeginT.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/crtfastmath.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../.. -L/lib -L/usr/lib -plugin /usr/bin/../lib64/llvm/LLVMgold.so /tmp/pointer-xeWu3U.o --start-group -lgcc -lgcc_eh -lc --end-group /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../../../lib64/crtn.o
/tmp/pointer-xeWu3U.o: file not recognized: File format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pointer] Error 1

clang -Wall -pipe -v -O4 -g0  -march=corei7 -fomit-frame-pointer -funroll-loops
-ffast-math -fno-PIE -fno-exceptions -fno-stack-protector -static     pointer.c
-o pointer
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-llvm-bc -disable-free -disable-llvm-verifier -main-file-name pointer.c -static-define -mrelocation-model static -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -ffp-contract=fast -ffast-math -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu corei7 -target-linker-version 2.23.1 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.2 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.2/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -fdebug-compilation-dir /home/inst/nbench-byte-2.2.3 -ferror-limit 19 -fmessage-length 317 -funroll-loops -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/pointer-LihK1H.o -x c pointer.c
clang -cc1 version 3.2 based upon LLVM 3.2svn default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/bin/../lib/clang/3.2/include
 /usr/include
End of search list.
 "/usr/bin/x86_64-pc-linux-gnu-ld" -m elf_x86_64 -static -o pointer /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/crtbeginT.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/crtfastmath.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../.. -L/lib -L/usr/lib -plugin /usr/bin/../lib64/llvm/LLVMgold.so /tmp/pointer-LihK1H.o --start-group -lgcc -lgcc_eh -lc --end-group /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/crtn.o
/tmp/pointer-LihK1H.o: file not recognized: File format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pointer] Error 1
Quuxplusone commented 11 years ago

-O4 is same as -flto. See http://llvm.org/docs/GoldPlugin.html for more information