History

win32: libtcc1.a needs to be built with tcc

gcc/mingw produces msvc compatible pecoff objects, tcc only knows ELF.

grischka committed 12 years ago

Commit 76accfb1 parent f0137372 files · +8 −5Browse files

Showing the changes to lib (1 of 2 files). Show all

Unified · Split

lib/Makefile+5−2
@@ -6,7 +6,7 @@ TOP = .. · 5 unmodified lines
66 include $(TOP)/Makefile
77 VPATH = $(top_srcdir)/lib $(top_srcdir)/win32/lib
88
9−ifndef TARGET
9+ifndef TARGET # native library
1010 ifdef CONFIG_WIN64
1111 TARGET = x86_64-win32
1212 else
@@ -27,6 +27,7 @@ ifndef TARGET · 14 unmodified lines
2727 else
2828 ifeq ($(ARCH),arm)
2929 TARGET = arm
30+ XCC = $(CC)
3031 endif
3132 endif
3233 endif
@@ -58,12 +59,14 @@ ifeq "$(TARGET)" "i386-win32" · 25 unmodified lines
5859 TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
5960 XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
6061 XAR = $(DIR)/tiny_libmaker$(EXESUF)
62+ PICFLAGS =
6163 else
6264 ifeq "$(TARGET)" "x86_64-win32"
6365 OBJ = $(addprefix $(DIR)/,$(WIN64_O))
6466 TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE
6567 XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
6668 XAR = $(DIR)/tiny_libmaker$(EXESUF)
69+ PICFLAGS =
6770 else
6871 ifeq "$(TARGET)" "i386"
6972 OBJ = $(addprefix $(DIR)/,$(I386_O))
@@ -104,7 +107,7 @@ $(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR) · 34 unmodified lines
104107 $(DIR)/%.o : %.c
105108 $(XCC) -c $< -o $@ $(XFLAGS)
106109 $(DIR)/%.o : %.S
107− $(CC) -c $< -o $@ $(XFLAGS)
110+ $(XCC) -c $< -o $@ $(XFLAGS)
108111 $(DIR)/%$(EXESUF) : $(TOP)/win32/tools/%.c
109112 $(CC) -o $@ $< $(XFLAGS) $(LDFLAGS)
110113

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