Unified · Split
| @@ -12,17 +12,11 @@ echo>>..\config.h #define CONFIG_SYSROOT "" · 11 unmodified lines | ||
| 12 | 12 | |
| 13 | 13 | @if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_64 |
| 14 | 14 | @if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64 |
| 15 | − | |
| 16 | −:i386 | |
| 17 | −@set AS=.\tcc -c | |
| 18 | 15 | @goto tools |
| 19 | 16 | |
| 20 | 17 | :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 | |
| 25 | 18 | echo>>..\config.h #define TCC_TARGET_X86_64 1 |
| 19 | +@set P=x86_64-pc-mingw32- | |
| 26 | 20 | @goto tools |
| 27 | 21 | |
| 28 | 22 | :tools |
| @@ -45,12 +39,20 @@ copy ..\libtcc.h libtcc\libtcc.h · 16 unmodified lines | ||
| 45 | 39 | .\tcc -c lib/dllcrt1.c |
| 46 | 40 | .\tcc -c lib/dllmain.c |
| 47 | 41 | .\tcc -c ../lib/libtcc1.c |
| 42 | +@if not x%P%==x goto asm64 | |
| 43 | +.\tcc -c lib/chkstk.S | |
| 44 | +.\tcc -c ../lib/alloca86.S | |
| 45 | +tiny_libmaker lib/libtcc1.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86.o | |
| 46 | +@goto cleanup | |
| 47 | + | |
| 48 | +:asm64 | |
| 49 | +@rem !!! currently TinyCC doesn't 64bit asm. Need 'yasm' !!! | |
| 48 | 50 | .\tcc -o tmp.s -E lib/chkstk.S |
| 49 | −%AS% -o chkstk.o tmp.s | |
| 50 | −.\tcc -o tmp.s -E ../lib/alloca86.S | |
| 51 | −%AS% -o alloca86.o tmp.s | |
| 51 | +yasm -p gnu -f elf64 -o chkstk.o tmp.s | |
| 52 | +.\tcc -o tmp.s -E ../lib/alloca86_64.S | |
| 53 | +yasm -p gnu -f elf64 -o alloca86_64.o tmp.s | |
| 52 | 54 | del tmp.s |
| 53 | −tiny_libmaker lib/libtcc1%X64%.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86.o | |
| 55 | +tiny_libmaker lib/libtcc1.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86_64.o | |
| 54 | 56 | |
| 55 | 57 | :cleanup |
| 56 | 58 | del *.o |