mirror of
https://github.com/mirror/tinycc.git
synced 2025-04-03 12:40:08 +08:00
arm: libtcc1.a needs gcc with -fPIC
This commit is contained in:
parent
910a6bc859
commit
362cafb471
10
lib/Makefile
10
lib/Makefile
@ -22,6 +22,7 @@ ifndef TARGET
|
|||||||
TARGET = arm
|
TARGET = arm
|
||||||
# using gcc, need asm
|
# using gcc, need asm
|
||||||
XCC = $(CC)
|
XCC = $(CC)
|
||||||
|
XFLAGS = $(CFLAGS) -fPIC
|
||||||
else ifeq ($(ARCH),arm64)
|
else ifeq ($(ARCH),arm64)
|
||||||
TARGET = arm64
|
TARGET = arm64
|
||||||
endif
|
endif
|
||||||
@ -72,11 +73,6 @@ else
|
|||||||
$(error libtcc1.a not supported on target '$(TARGET)')
|
$(error libtcc1.a not supported on target '$(TARGET)')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
XFLAGS = $(TGT)
|
|
||||||
ifeq "$(XCC)" "$(CC)"
|
|
||||||
XFLAGS += $(CFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TARGETOS),Darwin)
|
ifeq ($(TARGETOS),Darwin)
|
||||||
XAR = $(DIR)/tiny_libmaker$(EXESUF)
|
XAR = $(DIR)/tiny_libmaker$(EXESUF)
|
||||||
XFLAGS += -D_ANSI_SOURCE
|
XFLAGS += -D_ANSI_SOURCE
|
||||||
@ -90,9 +86,9 @@ endif
|
|||||||
$(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR)
|
$(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR)
|
||||||
$(AR) rcs $@ $(OBJ)
|
$(AR) rcs $@ $(OBJ)
|
||||||
$(DIR)/%.o : %.c
|
$(DIR)/%.o : %.c
|
||||||
$(XCC) -c $< -o $@ $(XFLAGS)
|
$(XCC) -c $< -o $@ $(TGT) $(XFLAGS)
|
||||||
$(DIR)/%.o : %.S
|
$(DIR)/%.o : %.S
|
||||||
$(XCC) -c $< -o $@ $(XFLAGS)
|
$(XCC) -c $< -o $@ $(TGT) $(XFLAGS)
|
||||||
# windows : utilities
|
# windows : utilities
|
||||||
$(DIR)/tiny_%$(EXESUF) : $(TOPSRC)/win32/tools/tiny_%.c
|
$(DIR)/tiny_%$(EXESUF) : $(TOPSRC)/win32/tools/tiny_%.c
|
||||||
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(TGT)
|
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(TGT)
|
||||||
|
Loading…
Reference in New Issue
Block a user