Yeah, I thought we can avoid this. Nevertheless it works fine with this:
./configure --triplet=arm-linux-gnueabihf --prefix=/usr --crtprefix=/usr/lib
So yes, I need to fix some paths around to match the system's.
On 12/23/18 4:53 PM, Christian Jullien wrote:
Ok what bout
./configure
Ok what bout
./configure –triplet=arm-linux-gnueabihf
If it works, you can try to detect arch linux ./configure and find a way to
force triplet in this case.
Maybe test with "/usr/lib/$tt/crti.o" or “/usr/lib/crti.o” in this test
if test -n "$tt" -a -f
It is here it should be :)
/usr/lib/crti.o
$ gcc -Wl,-t hello1.c
/usr/bin/ld: mode armelf_linux_eabi
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/8.2.0/../../../Scrt1.o
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/8.2.0/../../../crti.o
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/8.2.0/crtbeginS.o
On RPi, crti.o is located on /usr/lib/arm-linux-gnueabihf/crti.o.
Where is it located on your board?
You should adapt the different tcc scripts and Makefile so that it finds what
it needs to work on your board.
From: Tinycc-devel
I compile tcc natively. I have an Orange Pi Zero running Arch Linux ARM.
I don't have to cross compile.
I don't think they move to github. Btw, I prefer svn over whole git thing.
On 12/23/18 4:09 PM, Pursuer wrote:
I found out that I need to specify the CROSS_TARGET in config.mak
manually to
I found out that I need to specify the CROSS_TARGET in config.mak manually to
cross-compile tcc.
And the Makefile may miss something.
arm-eabihf_FILES=$(arm_FILES)
should be inserted into line 169 (I think. )
Now we can cross-compile to target arm-eabihf .
If CROSS_TARGET is empty,
Hmm, well the problem is we talking about /usr/lib/crt1.o, and I want to
compile a hosted program. In freestanding case, it would not complain.
But tcc supposed to load glibc's CRT, but if tcc cannot load it, then
you are unable to link a hosted program.
The problematic stuff is the 7th section
I hava read this mail. On my computer, tcc usually can't load the object file
which compiled by other compiler. I guess It's due to the variety of elf file
format(I know very little about elf file format). So I only plan to use tcc as
a jit library of c, and only load the object file compiled