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 @@
1/* ---------------------------------------------- */1/* ---------------------------------------------- */
2/* alloca86-bt.S */2/* alloca86-bt.S */
3 3
4#include "../config.h"
5
6.globl __bound_alloca4.globl __bound_alloca
7 5
8__bound_alloca:6__bound_alloca:
lib/alloca86.S+0−2
@@ -1,8 +1,6 @@
1/* ---------------------------------------------- */1/* ---------------------------------------------- */
2/* alloca86.S */2/* alloca86.S */
3 3
4#include "../config.h"
5
6.globl alloca4.globl alloca
7 5
8alloca:6alloca:
lib/alloca86_64.S+0−2
@@ -1,8 +1,6 @@
1/* ---------------------------------------------- */1/* ---------------------------------------------- */
2/* alloca86_64.S */2/* alloca86_64.S */
3 3
4#include "../config.h"
5
6.globl alloca4.globl alloca
7 5
8alloca:6alloca:
win32/build-tcc.bat+20−17
@@ -4,50 +4,53 @@ · 3 unmodified lines
4@set PROMPT=$G$S4@set PROMPT=$G$S
5 5
6echo>..\config.h #define TCC_VERSION "0.9.25"6echo>..\config.h #define TCC_VERSION "0.9.25"
7echo>>..\config.h #define TCC_TARGET_PE 1
8echo>>..\config.h #define CONFIG_TCCDIR "."7echo>>..\config.h #define CONFIG_TCCDIR "."
9echo>>..\config.h #define CONFIG_SYSROOT ""8echo>>..\config.h #define CONFIG_SYSROOT ""
9@set target=-DTCC_TARGET_PE -DTCC_TARGET_I386
10@set CC=gcc
11@set AR=ar
10 12
11@if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_6413@if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_64
12@if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_6414@if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64
13@goto tools15@goto tools
14 16
15:x86_6417:x86_64
16echo>>..\config.h #define TCC_TARGET_X86_64 118@set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
17@set P=x86_64-pc-mingw32-19@set CC=x86_64-pc-mingw32-gCC
20@set AR=x86_64-pc-mingw32-ar
18@set S=_6421@set S=_64
19@goto tools22@goto tools
20 23
21:tools24:tools
22%P%gcc -Os tools/tiny_impdef.c -o tiny_impdef.exe -s25%CC% %target% -Os tools/tiny_impdef.c -o tiny_impdef.exe -s
23%P%gcc -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s26%CC% %target% -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s
24 27
25:libtcc28:libtcc
26if not exist libtcc\nul mkdir libtcc29if not exist libtcc\nul mkdir libtcc
27copy ..\libtcc.h libtcc\libtcc.h30copy ..\libtcc.h libtcc\libtcc.h
28%P%gcc -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o31%CC% %target% -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
29%P%ar rcs libtcc/libtcc.a libtcc.o32%AR% rcs libtcc/libtcc.a libtcc.o
30 33
31:tcc34:tcc
32%P%gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc35%CC% %target% -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
33 36
34:copy_std_includes37:copy_std_includes
35copy ..\include\*.h include38copy ..\include\*.h include
36 39
37:libtcc1.a40:libtcc1.a
38.\tcc -c lib/crt1.c41.\tcc %target% -c lib/crt1.c
39.\tcc -c lib/wincrt1.c42.\tcc %target% -c lib/wincrt1.c
40.\tcc -c lib/dllcrt1.c43.\tcc %target% -c lib/dllcrt1.c
41.\tcc -c lib/dllmain.c44.\tcc %target% -c lib/dllmain.c
42.\tcc -c ../lib/libtcc1.c45.\tcc %target% -c ../lib/libtcc1.c
43.\tcc -c lib/chkstk.S46.\tcc %target% -c lib/chkstk.S
44.\tcc -c ../lib/alloca86%S%.S47.\tcc %target% -c ../lib/alloca86%S%.S
45 48
46@set LIBFILES=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86%S%.o49@set LIBFILES=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86%S%.o
47 50
48@if not _%P%==_ goto makelib51@if not _%P%==_ goto makelib
49.\tcc -c ../lib/alloca86-bt%S%.S52.\tcc %target% -c ../lib/alloca86-bt%S%.S
50.\tcc -c ../lib/bcheck.c53.\tcc %target% -c ../lib/bcheck.c
51 54
52@set LIBFILES=%LIBFILES% alloca86-bt%S%.o bcheck.o55@set LIBFILES=%LIBFILES% alloca86-bt%S%.o bcheck.o
53 56
win32/lib/chkstk.S+0−2
@@ -1,8 +1,6 @@
1/* ---------------------------------------------- */1/* ---------------------------------------------- */
2/* chkstk86.s */2/* chkstk86.s */
3 3
4#include "../../config.h"
5
6/* ---------------------------------------------- */4/* ---------------------------------------------- */
7#ifndef TCC_TARGET_X86_645#ifndef TCC_TARGET_X86_64
8/* ---------------------------------------------- */6/* ---------------------------------------------- */
win32/tools/tiny_impdef.c+0−1
@@ -26,7 +26,6 @@ · 25 unmodified lines
26#include <windows.h>26#include <windows.h>
27#include <stdio.h>27#include <stdio.h>
28#include <malloc.h>28#include <malloc.h>
29#include "../../config.h"
30 29
31char *get_export_names(FILE *fp);30char *get_export_names(FILE *fp);
32#define tcc_free free31#define tcc_free free
win32/tools/tiny_libmaker.c+0−1
@@ -25,7 +25,6 @@ · 24 unmodified lines
25#include <io.h> /* for mktemp */25#include <io.h> /* for mktemp */
26#endif26#endif
27 27
28#include "../../config.h"
29#include "../../elf.h"28#include "../../elf.h"
30 29
31#define ARMAG "!<arch>\n"30#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