Skip to content

Commit c3cabf4

Browse files
committed
bare-arm, stmhal, teensy: Duplicate -nostdlib to CFLAGS
As we are building with -nostdlib gcc features like the stack protector will fail linking, because the failure handlers are in gcc's internal libs. Such features are implicitly disabled during compilation when -nostdlib is used in CFLAGS too. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
1 parent afc67c6 commit c3cabf4

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

bare-arm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ INC += -I$(PY_SRC)
1313
INC += -I$(BUILD)
1414

1515
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
16-
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
16+
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
1717

1818
#Debugging/Optimization
1919
ifeq ($(DEBUG), 1)

stmhal/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ INC += -I$(FATFS_DIR)/src
4141
INC += -I$(CC3K_DIR)
4242

4343
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
44-
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
44+
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
4545

4646
CFLAGS += -Iboards/$(BOARD)
4747

teensy/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ INC += -I$(PY_SRC)
2323
INC += -I$(BUILD)
2424
INC += -I$(CORE_PATH)
2525

26-
CFLAGS = $(INC) -Wall -ansi -std=gnu99 $(CFLAGS_CORTEX_M4)
26+
CFLAGS = $(INC) -Wall -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
2727
LDFLAGS = -nostdlib -T mk20dx256.ld
2828
LIBS = -L $(COMPILER_PATH)/../lib/gcc/arm-none-eabi/4.7.2/thumb2 -lgcc
2929

0 commit comments

Comments
 (0)