|
From: | Christian Jullien |
Subject: | Re: [Tinycc-devel] core dump on FreeBSD with last commit "configure: --triplet= option, Makefile: cleanup" |
Date: | Wed, 19 Oct 2016 07:03:33 +0200 |
Let me summarize where we are on FreeBSD i386 and x86_64 with mod: x86_64: $ uname -m amd64 $ gcc --print-file-name=crt1.o /usr/lib/crt1.o $ find /usr -name crt1.o /usr/lib32/crt1.o /usr/lib/crt1.o $ ./configure 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 /usr/home/jullien/tinycc C compiler gcc Target OS FreeBSD CPU x86-64 Big Endian no Profiling no Cross compilers no Use libgcc no Triplet - Compiles but test produces: gmake -C tests gmake[1]: Entering directory '/usr/home/jullien/tinycc/tests' ------------ hello-exe ------------ ../tcc -B.. -I../include -I.. -I.. ../examples/ex1.c -o hello || (../tcc -vv; exit 1) && ./hello Segmentation fault (core dumped) i386: $ uname -m i386 $ gcc --print-file-name=crt1.o /usr/lib/crt1.o $ find /usr -name crt1.o /usr/lib/crt1.o $ ./configure 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 FreeBSD CPU x86 Big Endian no Profiling no Cross compilers no Use libgcc no Triplet - Compiles but test produces: gmake -C tests gmake[1]: Entering directory '/usr/home/jullien/tinycc/tests' ------------ hello-exe ------------ ../tcc -B.. -I../include -I.. -I.. ../examples/ex1.c -o hello || (../tcc -vv; exit 1) && ./hello Hello World ------------ hello-run ------------ ../tcc -B.. -I../include -I.. -I.. -run ../examples/ex1.c Hello World gcc -o libtcc_test libtcc_test.c ../libtcc.a -I.. -I.. -lm ------------ libtest ------------ ./libtcc_test -B.. -I../include -I.. -I.. Hello World! fib(32) = 2178309 add(32, 64) = 96 gcc -o tcctest.gcc tcctest.c -DTCC_TARGET_I386 -I.. -I.. -w -O0 -std=gnu99 -fno-omit-frame-pointer ./tcctest.gcc > test.ref ------------ test3 ------------ ../tcc -B.. -I../include -I.. -I.. -DTCC_TARGET_I386 -DONE_SOURCE -run ../tcc.c -B.. -I../include -I.. -I.. -DTCC_TARGET_I386 -DONE_SOURCE -run ../tcc.c -B.. -I../include -I.. -I.. -DTCC_TARGET_I386 -DONE_SOURCE -run ../tcc.c -B.. -I../include -I.. -I.. -run tcctest.c > test.out3 tcc: error: undefined symbol 'memcpy' tcc: error: undefined symbol 'strlen' tcc: error: undefined symbol 'memmove' tcc: error: undefined symbol 'memset' tcc: error: undefined symbol 'memcmp' -----Original Message----- Michael Matz wrote: > Hmm and now I see that this hunk also generally breaks building the > target compilers like x86_64-tcc, because they don't get > NATIVE_DEFINES from config.mak, and hence no -DCONFIG_LDDIR even if > configure would have found the correct one, so it now defaults to /lib, and boom. Hi Michael, Honestly, in my book the cross compilers are just to test compilation, they are not assumed to work out of the box. (Except the windows compiles where everything you need comes with the source and therefor is well known where it is). There is no support whatsoever from our configure either. People tried to "fix" that but I was not able to detect any underlying concept. As I see it, if you want cross-compilers that really work you need to edit/add the CONFIG_TCC_XXXX paths for that target manually in the Makefile (which is not difficult at all) or pass via environment or something. (We could maybe add a "cross-config-include.mak.template" as an example). As to the lib/lib64 issue, whatever you can figure out I'm fine. Except I'd prefer to have the logic in only one location, that is NOT in both the Makefile AND configure, because that is just confusing. FYI: on my (old 8.10 from 2008) ubuntu 64, there is /usr/lib64, but it is a link to /usr/lib. There is also /usr/lib/x86_64-linux-gnu, but it is empty. I was under the impression that lib64 was an old misguided concept from the early 64 bit days. Maybe I was wrong. Thanks, -- grischka _______________________________________________ Tinycc-devel mailing list |
[Prev in Thread] | Current Thread | [Next in Thread] |