Add -O2 when compiling tcc on Windows. Not sure this flag is really used by tcc.

master
Christian Jullien 2017-06-10 06:35:11 +02:00
parent 3e028af453
commit 6d559d651f
1 changed files with 24 additions and 24 deletions

View File

@ -68,31 +68,31 @@ PHONY += bootstrap
lib/libtcc1-32.a:
@echo Building $*.a with tcc -m32
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/libtcc1.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86.S
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86-bt.S
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1w.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1w.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllcrt1.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllmain.c
@./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/chkstk.S
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/libtcc1.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86.S
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86-bt.S
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1w.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1w.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllcrt1.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllmain.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/chkstk.S
@./tcc -m32 -ar lib/libtcc1-32.a libtcc1.o alloca86.o alloca86-bt.o crt1.o wincrt1.o crt1w.o wincrt1w.o dllcrt1.o dllmain.o chkstk.o
@rm *.o
lib/libtcc1-64.a:
@echo Building $*.a with tcc -m64
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/libtcc1.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64.S
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64-bt.S
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1w.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1w.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllcrt1.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllmain.c
@./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/chkstk.S
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/libtcc1.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64.S
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64-bt.S
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1w.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1w.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllcrt1.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllmain.c
@./tcc -O2 -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/chkstk.S
@./tcc -m64 -ar lib/libtcc1-64.a libtcc1.o alloca86_64.o alloca86_64-bt.o crt1.o wincrt1.o crt1w.o wincrt1w.o dllcrt1.o dllmain.o chkstk.o
@rm *.o
@ -102,10 +102,10 @@ PHONY += libs
rebuild:
@echo Rebuild using tcc itself - default $(TARGET)bits
@./$(TARCH)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c
@./tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c
@./tcc -m32 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe i386-win32-tcc.exe
@./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe x86_64-win32-tcc.exe
@./$(TARCH)-win32-tcc -O2 $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c
@./tcc -O2 $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c
@./tcc -O2 -m32 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe i386-win32-tcc.exe
@./tcc -O2 -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe x86_64-win32-tcc.exe
PHONY += rebuild