History

build: remove #include "config.h" from target dependent files

This is to make cross build of libtcc1.a easier.

grischka committed 15 years ago

Commit 9bd69bf1 parent c4eef487 files · +20 −27Browse files

Unified · Split

7 files
  1. lib/alloca86-bt.S +0 −2
  2. lib/alloca86.S +0 −2
  3. lib/alloca86_64.S +0 −2
  4. win32/build-tcc.bat +20 −17
  5. win32/lib/chkstk.S +0 −2
  6. win32/tools/tiny_impdef.c +0 −1
  7. win32/tools/tiny_libmaker.c +0 −1
lib/alloca86-bt.S+0−2
@@ -1,8 +1,6 @@
11 /* ---------------------------------------------- */
22 /* alloca86-bt.S */
33
4−#include "../config.h"
5−
64 .globl __bound_alloca
75
86 __bound_alloca:
lib/alloca86.S+0−2
@@ -1,8 +1,6 @@
11 /* ---------------------------------------------- */
22 /* alloca86.S */
33
4−#include "../config.h"
5−
64 .globl alloca
75
86 alloca:
lib/alloca86_64.S+0−2
@@ -1,8 +1,6 @@
11 /* ---------------------------------------------- */
22 /* alloca86_64.S */
33
4−#include "../config.h"
5−
64 .globl alloca
75
86 alloca:
win32/build-tcc.bat+20−17
@@ -4,50 +4,53 @@ · 3 unmodified lines
44 @set PROMPT=$G$S
55
66 echo>..\config.h #define TCC_VERSION "0.9.25"
7−echo>>..\config.h #define TCC_TARGET_PE 1
87 echo>>..\config.h #define CONFIG_TCCDIR "."
98 echo>>..\config.h #define CONFIG_SYSROOT ""
9+@set target=-DTCC_TARGET_PE -DTCC_TARGET_I386
10+@set CC=gcc
11+@set AR=ar
1012
1113 @if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_64
1214 @if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64
1315 @goto tools
1416
1517 :x86_64
16−echo>>..\config.h #define TCC_TARGET_X86_64 1
17−@set P=x86_64-pc-mingw32-
18+@set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
19+@set CC=x86_64-pc-mingw32-gCC
20+@set AR=x86_64-pc-mingw32-ar
1821 @set S=_64
1922 @goto tools
2023
2124 :tools
22−%P%gcc -Os tools/tiny_impdef.c -o tiny_impdef.exe -s
23−%P%gcc -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s
25+%CC% %target% -Os tools/tiny_impdef.c -o tiny_impdef.exe -s
26+%CC% %target% -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s
2427
2528 :libtcc
2629 if not exist libtcc\nul mkdir libtcc
2730 copy ..\libtcc.h libtcc\libtcc.h
28−%P%gcc -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
29−%P%ar rcs libtcc/libtcc.a libtcc.o
31+%CC% %target% -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
32+%AR% rcs libtcc/libtcc.a libtcc.o
3033
3134 :tcc
32−%P%gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
35+%CC% %target% -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
3336
3437 :copy_std_includes
3538 copy ..\include\*.h include
3639
3740 :libtcc1.a
38−.\tcc -c lib/crt1.c
39−.\tcc -c lib/wincrt1.c
40−.\tcc -c lib/dllcrt1.c
41−.\tcc -c lib/dllmain.c
42−.\tcc -c ../lib/libtcc1.c
43−.\tcc -c lib/chkstk.S
44−.\tcc -c ../lib/alloca86%S%.S
41+.\tcc %target% -c lib/crt1.c
42+.\tcc %target% -c lib/wincrt1.c
43+.\tcc %target% -c lib/dllcrt1.c
44+.\tcc %target% -c lib/dllmain.c
45+.\tcc %target% -c ../lib/libtcc1.c
46+.\tcc %target% -c lib/chkstk.S
47+.\tcc %target% -c ../lib/alloca86%S%.S
4548
4649 @set LIBFILES=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86%S%.o
4750
4851 @if not _%P%==_ goto makelib
49−.\tcc -c ../lib/alloca86-bt%S%.S
50−.\tcc -c ../lib/bcheck.c
52+.\tcc %target% -c ../lib/alloca86-bt%S%.S
53+.\tcc %target% -c ../lib/bcheck.c
5154
5255 @set LIBFILES=%LIBFILES% alloca86-bt%S%.o bcheck.o
5356
win32/lib/chkstk.S+0−2
@@ -1,8 +1,6 @@
11 /* ---------------------------------------------- */
22 /* chkstk86.s */
33
4−#include "../../config.h"
5−
64 /* ---------------------------------------------- */
75 #ifndef TCC_TARGET_X86_64
86 /* ---------------------------------------------- */
win32/tools/tiny_impdef.c+0−1
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626 #include <windows.h>
2727 #include <stdio.h>
2828 #include <malloc.h>
29−#include "../../config.h"
3029
3130 char *get_export_names(FILE *fp);
3231 #define tcc_free free
win32/tools/tiny_libmaker.c+0−1
@@ -25,7 +25,6 @@ · 24 unmodified lines
2525 #include <io.h> /* for mktemp */
2626 #endif
2727
28−#include "../../config.h"
2928 #include "../../elf.h"
3029
3130 #define ARMAG "!<arch>\n"

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