[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Crosscompiling failed
From: |
Thomas Stalder |
Subject: |
[Tinycc-devel] Crosscompiling failed |
Date: |
Wed, 14 Apr 2021 07:56:49 +0200 |
Hello,
btc:~/vc/a/tinycc-035ae7d/a$ ../configure --cross-prefix=arm-cortexa8-linux-gnueabihf- --cpu=armv7l
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
Source path ..
C compiler arm-cortexa8-linux-gnueabihf-gcc (0.0)
Target OS Linux
CPU arm
Creating config.mak and config.h
btc:~/vc/a/tinycc-035ae7d/a$ make
arm-cortexa8-linux-gnueabihf-gcc -o tcc.o -c ./../tcc.c -DTCC_CPU_VERSION=7 -DTCC_TARGET_ARM -DONE_SOURCE=0 -DTCC_GIT_HASH="\"modified 997fdc0\"" -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -I.
arm-cortexa8-linux-gnueabihf-gcc -o libtcc.o -c ./../libtcc.c -DTCC_CPU_VERSION=7 -DTCC_TARGET_ARM -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -I.
arm-cortexa8-linux-gnueabihf-gcc -DC2STR ./../conftest.c -o c2str.exe && ./c2str.exe ./../include/tccdefs.h tccdefs_.h
/bin/sh: 1: ./c2str.exe: Exec format error
make: *** [Makefile:242: tccdefs_.h] Error 2
Because c2str is compiled with the target compiler and executed on the host.
To fix this problem I propose the attached patch.
If it's ok for you, I can commit. Or what if you have another idea?
Thank you in advance for your return.
Thomas
fixcross.patch
Description: Binary data
- [Tinycc-devel] Crosscompiling failed,
Thomas Stalder <=