History

arm: libtcc1.a needs gcc with -fPIC

grischka committed 9 years ago

Commit 362cafb1 parent 910a6bc1 file · +3 −7Browse files

Unified · Split

lib/Makefile+3−7
@@ -22,6 +22,7 @@ ifndef TARGET · 21 unmodified lines
2222 TARGET = arm
2323 # using gcc, need asm
2424 XCC = $(CC)
25+ XFLAGS = $(CFLAGS) -fPIC
2526 else ifeq ($(ARCH),arm64)
2627 TARGET = arm64
2728 endif
@@ -72,11 +73,6 @@ else · 44 unmodified lines
7273 $(error libtcc1.a not supported on target '$(TARGET)')
7374 endif
7475
75−XFLAGS = $(TGT)
76−ifeq "$(XCC)" "$(CC)"
77− XFLAGS += $(CFLAGS)
78−endif
79−
8076 ifeq ($(TARGETOS),Darwin)
8177 XAR = $(DIR)/tiny_libmaker$(EXESUF)
8278 XFLAGS += -D_ANSI_SOURCE
@@ -90,9 +86,9 @@ endif · 7 unmodified lines
9086 $(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR)
9187 $(AR) rcs $@ $(OBJ)
9288 $(DIR)/%.o : %.c
93− $(XCC) -c $< -o $@ $(XFLAGS)
89+ $(XCC) -c $< -o $@ $(TGT) $(XFLAGS)
9490 $(DIR)/%.o : %.S
95− $(XCC) -c $< -o $@ $(XFLAGS)
91+ $(XCC) -c $< -o $@ $(TGT) $(XFLAGS)
9692 # windows : utilities
9793 $(DIR)/tiny_%$(EXESUF) : $(TOPSRC)/win32/tools/tiny_%.c
9894 $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(TGT)

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