History

win64: add x64 target to build-tcc.bat

grischka committed 17 years ago

Commit c0fc0fa1 parent dc251a71 file · +47 −19Browse files

Unified · Split

win32/build-tcc.bat+47−19
@@ -1,28 +1,56 @@
1@rem ----------------------------------------------------1@rem ----------------------------------------------------
2@rem batch file to build tcc using gcc and ar from mingw2@rem batch file to build tcc using gcc and ar from mingw
3@rem ----------------------------------------------------3@rem ----------------------------------------------------
4:4@set PROMPT=$G$S
5@echo>..\config.h #define TCC_VERSION "0.9.25"5
6@echo>>..\config.h #define TCC_TARGET_PE 16copy ..\include\*.h include
7@echo>>..\config.h #define CONFIG_TCCDIR "."7
8@echo>>..\config.h #define CONFIG_SYSROOT ""8echo>..\config.h #define TCC_VERSION "0.9.25"
9:9echo>>..\config.h #define TCC_TARGET_PE 1
10gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s10echo>>..\config.h #define CONFIG_TCCDIR "."
11gcc -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o11echo>>..\config.h #define CONFIG_SYSROOT ""
12gcc -Os tools/tiny_impdef.c -o tiny_impdef.exe -s12
13gcc -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s13@if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_64
14mkdir libtcc14@if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64
15ar rcs libtcc/libtcc.a libtcc.o15
16del libtcc.o16:i386
17copy ..\libtcc.h libtcc17@set AS=.\tcc -c
18:18@goto tools
19
20:x86_64
21@set P=x86_64-pc-mingw32-
22@set X64=-x64
23@rem !!! currently TinyCC doesn't 64bit asm. Need 'yasm' !!!
24@set AS=yasm -p gnu -f elf64
25echo>>..\config.h #define TCC_TARGET_X86_64 1
26@goto tools
27
28:tools
29%P%gcc -Os tools/tiny_impdef.c -o tiny_impdef.exe -s
30%P%gcc -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s
31
32:libtcc
33if not exist libtcc\nul mkdir libtcc
34copy ..\libtcc.h libtcc\libtcc.h
35
36%P%gcc -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
37%P%ar rcs libtcc/libtcc.a libtcc.o
38
39:tcc
40%P%gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
41
42:libtcc1.a
19.\tcc -c lib/crt1.c43.\tcc -c lib/crt1.c
20.\tcc -c lib/wincrt1.c44.\tcc -c lib/wincrt1.c
21.\tcc -c lib/dllcrt1.c45.\tcc -c lib/dllcrt1.c
22.\tcc -c lib/dllmain.c46.\tcc -c lib/dllmain.c
23.\tcc -c lib/chkstk.S
24.\tcc -c ../lib/libtcc1.c47.\tcc -c ../lib/libtcc1.c
25.\tcc -c ../lib/alloca86.S48.\tcc -o tmp.s -E lib/chkstk.S
26.\tcc -c ../lib/alloca86-bt.S49%AS% -o chkstk.o tmp.s
27ar rcs lib/libtcc1.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86.o alloca86-bt.o50.\tcc -o tmp.s -E ../lib/alloca86.S
51%AS% -o alloca86.o tmp.s
52del tmp.s
53tiny_libmaker lib/libtcc1%X64%.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86.o
54
55:cleanup
28del *.o56del *.o

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t