mirror of
https://github.com/frida/tinycc
synced 2024-11-28 02:29:38 +03:00
make --enable-cross work properly on x86_64
merge more changes from Fedora spec file into Makefile I did a lot of reading on Makefiles. It should be a lot less hacked now that I got rid of my temporary cross-build script. I had to build i386-win32-tcc as 32 bit in order to use it to build the windows version of libtcc1.a and move that into lib directory. Still testing, but it does build windows fib.exe smoothly now and generates shard lib, libtcc.so.1.0 and test links against it.
This commit is contained in:
parent
1a8e7d9fbb
commit
07eb850608
11
Makefile
11
Makefile
@ -183,15 +183,20 @@ libtcc_test$(EXESUF): tests/libtcc_test.c $(LIBTCCB)
|
||||
$(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS) $(LIBTCCL)
|
||||
ifdef CONFIG_CROSS
|
||||
ifndef CONFIG_WIN32
|
||||
cp config.mak config.mak.bak
|
||||
cp config.h config.h.bak
|
||||
echo "ARCH=i386" >> config.mak
|
||||
make i386-win32-tcc
|
||||
echo "#undef HOST_X86_64" >> config.h
|
||||
echo "#define HOST_I386 1" >> config.h
|
||||
echo "CFLAGS=-O2 -g -pipe -Wall -m32" >> config.mak
|
||||
make i386-win32-tcc
|
||||
cp i386-win32-tcc tcc.exe
|
||||
mv libtcc1.a libtcc1.bak
|
||||
make CONFIG_WIN32=1 libtcc1.a
|
||||
mv libtcc1.a lib
|
||||
mv libtcc1.bak libtcc1.a
|
||||
head -n -1 config.mak > config.bak
|
||||
mv config.bak config.mak
|
||||
mv config.mak.bak config.mak
|
||||
mv config.h.bak config.h
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user