|
From: | Christian Jullien |
Subject: | [Tinycc-devel] Linux port is broken with multi-arch |
Date: | Sun, 27 Nov 2016 16:55:49 +0100 |
Hi, I just installed Linux Fedora 25 on x86_64 adding i386 support because I maintain software mostly written in assembler and bound to i386 architecture. Trying to compile tcc from mob gives me a lot of errors probably related to wrong path to gcc lib. Cloning into 'tinycc'... Binary directory /usr/local/bin TinyCC directory /usr/local/lib/tcc Library directory /usr/local/lib Include directory /usr/local/include Manual directory /usr/local/share/man Info directory /usr/local/share/info Doc directory /usr/local/share/doc Target root prefix - Source path /home/jullien/tinycc C compiler gcc Target OS Linux CPU x86-64 Big Endian no Profiling no Cross compilers no Use libgcc no Triplet - Creating config.mak and config.h gcc -o tcc.o -c tcc.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after-state ment -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wno-si gn-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o libtcc.o -c libtcc.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after -statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign - Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o tccpp.o -c tccpp.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after-s tatement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wn o-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o tccgen.o -c tccgen.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after -statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign - Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o tccelf.o -c tccelf.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after -statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign - Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o tccasm.o -c tccasm.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after -statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign - Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o tccrun.o -c tccrun.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-after -statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign - Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. gcc -o x86_64-gen.o -c x86_64-gen.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclarati on-after-statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointe r-sign -Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-alias ing -I. gcc -o i386-asm.o -c i386-asm.c -DTCC_TARGET_X86_64 -Wall -g -O2 -Wdeclaration-a fter-statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-si gn -Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I. ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o x86_64-gen. o i386-asm.o gcc -o tcc tcc.o libtcc.a -Wall -g -O2 -Wdeclaration-after-statement -Wno-deprec ated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno- unused-result -Wno-uninitialized -fno-strict-aliasing -I. -lm -ldl make -C lib native make[1]: Entering directory '/home/jullien/tinycc/lib' mkdir -p x86_64 gcc -c libtcc1.c -o x86_64/libtcc1.o -Wall -g -O2 -Wdeclaration-after-statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wno-sign-c ompare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I.. -fPIC -DT CC_TARGET_X86_64 gcc -c alloca86_64.S -o x86_64/alloca86_64.o -Wall -g -O2 -Wdeclaration-after-s tatement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wn o-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I.. - fPIC -DTCC_TARGET_X86_64 gcc -c alloca86_64-bt.S -o x86_64/alloca86_64-bt.o -Wall -g -O2 -Wdeclaration-a fter-statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-si gn -Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I.. -fPIC -DTCC_TARGET_X86_64 gcc -c bcheck.c -o x86_64/bcheck.o -Wall -g -O2 -Wdeclaration-after-statement - Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wno-sign-com pare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing -I.. -fPIC -DTCC _TARGET_X86_64 bcheck.c: In function ‘__bound_local_new’: bcheck.c:240:18: warning: calling ‘__builtin_frame_address’ with a nonzero argum en t is unsafe [-Wframe-address] fp = (size_t)__builtin_frame_address(1);\ ^~~~~~~~~~~~~~~~~~~~~~~~~~ bcheck.c:249:5: note: in expansion of macro ‘GET_CALLER_FP’ GET_CALLER_FP(fp); ^~~~~~~~~~~~~ bcheck.c: In function ‘__bound_local_delete’: bcheck.c:240:18: warning: calling ‘__builtin_frame_address’ with a nonzero argum en t is unsafe [-Wframe-address] fp = (size_t)__builtin_frame_address(1);\ ^~~~~~~~~~~~~~~~~~~~~~~~~~ bcheck.c:266:5: note: in expansion of macro ‘GET_CALLER_FP’ GET_CALLER_FP(fp); ^~~~~~~~~~~~~ ar rcs ../libtcc1.a x86_64/libtcc1.o x86_64/alloca86_64.o x86_64/alloca86_64-bt. o x86_64/bcheck.o make[1]: Leaving directory '/home/jullien/tinycc/lib' ./texi2pod.pl tcc-doc.texi tcc.pod pod2man --section=1 --center="Tiny C Compiler" --release="0.9.26" tcc.pod > tcc. 1 makeinfo --no-split --html --number-sections -o tcc-doc.html tcc-doc.texi make: makeinfo: Command not found Makefile:294: recipe for target 'tcc-doc.html' failed make: [tcc-doc.html] Error 127 (ignored) makeinfo tcc-doc.texi make: makeinfo: Command not found Makefile:301: recipe for target 'tcc-doc.info' failed make: [tcc-doc.info] Error 127 (ignored) make -C tests make[1]: Entering directory '/home/jullien/tinycc/tests' ------------ hello-exe ------------ ../tcc -B.. -I../include -I.. -I.. ../examples/ex1.c -o hello || (../tcc -vv; ex it 1) && ./hello /usr/lib/crt1.o: error: invalid object file tcc: error: file 'crt1.o' not found /usr/lib/crti.o: error: invalid object file tcc: error: file 'crti.o' not found /lib/libc.so.6: error: bad architecture /usr/lib/libc.so:2: error: unrecognized file type /lib/libc.so.6: error: bad architecture /lib/libc.so:2: error: unrecognized file type tcc: error: library 'libc' not found /usr/lib/crtn.o: error: invalid object file tcc: error: file 'crtn.o' not found tcc: error: undefined symbol 'printf' tcc version 0.9.26 (x86-64 Linux) install: /usr/local/lib/tcc include: /usr/local/lib/tcc/include /usr/local/include /usr/include libraries: /usr/lib /lib /usr/local/lib crt: /usr/lib elfinterp: /lib64/ld-linux-x86-64.so.2 Makefile:65: recipe for target 'hello-exe' failed make[1]: *** [hello-exe] Error 1 ------------ hello-run ------------ ../tcc -B.. -I../include -I.. -I.. -run ../examples/ex1.c /usr/lib/libc.so:2: error: unrecognized file type /lib/libc.so:2: error: unrecognized file type tcc: error: library 'libc' not found Makefile:69: recipe for target 'hello-run' failed make[1]: *** [hello-run] Error 255 gcc -o libtcc_test libtcc_test.c ../libtcc.a -I.. -I.. -lm -ldl ------------ libtest ------------ ./libtcc_test -B.. -I../include -I.. -I.. /usr/lib/libc.so:2: error: unrecognized file type /lib/libc.so:2: error: unrecognized file type tcc: error: library 'libc' not found Makefile:73: recipe for target 'libtest' failed make[1]: *** [libtest] Error 1 gcc -o tcctest.gcc tcctest.c -DTCC_TARGET_X86_64 -I.. -I.. -w -O0 -std=gnu99 -fn o-omit-frame-pointer ./tcctest.gcc > test.ref ------------ test3 ------------ ../tcc -B.. -I../include -I.. -I.. -DTCC_TARGET_X86_64 -DONE_SOURCE -run ../tcc. c -B.. -I../include -I.. -I.. -DTCC_TARGET_X86_64 -DONE_SOURCE -run ../tcc.c -B. . -I../include -I.. -I.. -DTCC_TARGET_X86_64 -DONE_SOURCE -run ../tcc.c -B.. -I. ./include -I.. -I.. -run tcctest.c > test.out3 /usr/lib/libc.so:2: error: unrecognized file type /lib/libc.so:2: error: unrecognized file type tcc: error: library 'libc' not found Makefile:102: recipe for target 'test3' failed make[1]: *** [test3] Error 255 gcc -o abitest-cc abitest.c ../libtcc.a -I.. -I.. -lm -ldl -w ../tcc -B.. -I../include -I.. -I.. -o abitest-tcc abitest.c ../libtcc.c -DTCC_TA RGET_X86_64 -DONE_SOURCE -lm -ldl /usr/lib/crt1.o: error: invalid object file tcc: error: file 'crt1.o' not found /usr/lib/crti.o: error: invalid object file tcc: error: file 'crti.o' not found /usr/lib/libm.so: error: bad architecture /lib/libm.so: error: bad architecture tcc: error: library 'libm' not found Makefile:191: recipe for target 'abitest-tcc' failed make[1]: *** [abitest-tcc] Error 1 ../tcc -B.. -I../include -I.. -I.. -o vla_test vla_test.c /usr/lib/crt1.o: error: invalid object file tcc: error: file 'crt1.o' not found /usr/lib/crti.o: error: invalid object file tcc: error: file 'crti.o' not found /lib/libc.so.6: error: bad architecture /usr/lib/libc.so:2: error: unrecognized file type |
[Prev in Thread] | Current Thread | [Next in Thread] |