Created
June 25, 2014 06:56
-
-
Save sjlongland/1a3876b6422b813a51de to your computer and use it in GitHub Desktop.
[PATCH] imx-bootlets: Add -fno-stack-protector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 395ac8e68801f22234269e301a716b3e67b4b5a2 Mon Sep 17 00:00:00 2001 | |
| From: Stuart Longland <[email protected]> | |
| Date: Wed, 25 Jun 2014 13:28:04 +1000 | |
| Subject: [PATCH] imx-bootlets: Add -fno-stack-protector | |
| Gentoo's toolchain uses the stack protector by default and needs to be | |
| told *not* to in order to successfully build the boot stream. | |
| --- | |
| imx-bootlets-src-10.12.01/boot_prep/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/linux_prep/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx23/drivers/power/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx23/hw/core/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx23/hw/digctl/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx23/hw/icoll/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx23/hw/lradc/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx23/hw/power/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx28/drivers/power/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx28/hw/core/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx28/hw/digctl/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx28/hw/icoll/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx28/hw/lradc/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/mach-mx28/hw/power/Makefile | 2 +- | |
| imx-bootlets-src-10.12.01/power_prep/Makefile | 2 +- | |
| 15 files changed, 15 insertions(+), 15 deletions(-) | |
| diff --git a/imx-bootlets-src-10.12.01/boot_prep/Makefile b/imx-bootlets-src-10.12.01/boot_prep/Makefile | |
| index 0267ede..3fb78f8 100644 | |
| --- a/imx-bootlets-src-10.12.01/boot_prep/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/boot_prep/Makefile | |
| @@ -20,7 +20,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump | |
| MEM_TYPE ?= MEM_DDR1 | |
| -CFLAGS = -g -Wall -I$(INCLUDEDIR) -I$(INCLUDEDIR)/mach -I./ -O -D$(MEM_TYPE) | |
| +CFLAGS = -g -Wall -I$(INCLUDEDIR) -I$(INCLUDEDIR)/mach -I./ -O -fno-stack-protector -D$(MEM_TYPE) | |
| LDFLAGS = -static -nostdlib -T $(BOOT_LAYOUT) | |
| # Generic code | |
| diff --git a/imx-bootlets-src-10.12.01/linux_prep/Makefile b/imx-bootlets-src-10.12.01/linux_prep/Makefile | |
| index 19b02a9..64465f5 100644 | |
| --- a/imx-bootlets-src-10.12.01/linux_prep/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/linux_prep/Makefile | |
| @@ -31,7 +31,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)objdump | |
| LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name)) | |
| -CFLAGS = -Wall -I$(INCLUDEDIR) -nostdinc -fno-builtin -O | |
| +CFLAGS = -Wall -I$(INCLUDEDIR) -nostdinc -fno-builtin -O -fno-stack-protector | |
| LDFLAGS = -static -nostdlib -T $(BOOT_LAYOUT_OUT) -L$(LIBGCCDIR) -lgcc | |
| BOARD ?= stmp378x_dev | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx23/drivers/power/Makefile b/imx-bootlets-src-10.12.01/mach-mx23/drivers/power/Makefile | |
| index 8ea4171..341f59a 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx23/drivers/power/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx23/drivers/power/Makefile | |
| @@ -19,7 +19,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/ddi_power_init.o src/ddi_power.o src/ddi_power_handoff.o \ | |
| src/ddi_power_battery.o src/ddi_power_5v_detect.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx23/hw/core/Makefile b/imx-bootlets-src-10.12.01/mach-mx23/hw/core/Makefile | |
| index e1fbc10..e5a6a32 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx23/hw/core/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx23/hw/core/Makefile | |
| @@ -19,7 +19,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| #lib_objs+=src/hw_core_c_interrupt.o | |
| #lib_objs+=src/hw_core_dbguart.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx23/hw/digctl/Makefile b/imx-bootlets-src-10.12.01/mach-mx23/hw/digctl/Makefile | |
| index f1f7a82..2ed4545 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx23/hw/digctl/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx23/hw/digctl/Makefile | |
| @@ -19,7 +19,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_digctl.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx23/hw/icoll/Makefile b/imx-bootlets-src-10.12.01/mach-mx23/hw/icoll/Makefile | |
| index c15af76..cff1616 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx23/hw/icoll/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx23/hw/icoll/Makefile | |
| @@ -18,7 +18,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_icoll_set.o src/hw_icoll_init.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx23/hw/lradc/Makefile b/imx-bootlets-src-10.12.01/mach-mx23/hw/lradc/Makefile | |
| index 00043d7..684332b 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx23/hw/lradc/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx23/hw/lradc/Makefile | |
| @@ -18,7 +18,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_lradc.o src/hw_lradc_setup.o src/hw_lradc_init.o \ | |
| src/hw_lradc_ladder.o src/hw_lradc_touch_screen.o \ | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx23/hw/power/Makefile b/imx-bootlets-src-10.12.01/mach-mx23/hw/power/Makefile | |
| index 8a5b86d..28e34e1 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx23/hw/power/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx23/hw/power/Makefile | |
| @@ -18,7 +18,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_power.o src/hw_power_battery.o src/hw_power_init.o \ | |
| src/hw_power_interrupts.o src/hw_power_registers.o \ | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx28/drivers/power/Makefile b/imx-bootlets-src-10.12.01/mach-mx28/drivers/power/Makefile | |
| index 8ea4171..341f59a 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx28/drivers/power/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx28/drivers/power/Makefile | |
| @@ -19,7 +19,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/ddi_power_init.o src/ddi_power.o src/ddi_power_handoff.o \ | |
| src/ddi_power_battery.o src/ddi_power_5v_detect.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx28/hw/core/Makefile b/imx-bootlets-src-10.12.01/mach-mx28/hw/core/Makefile | |
| index e1fbc10..e5a6a32 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx28/hw/core/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx28/hw/core/Makefile | |
| @@ -19,7 +19,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| #lib_objs+=src/hw_core_c_interrupt.o | |
| #lib_objs+=src/hw_core_dbguart.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx28/hw/digctl/Makefile b/imx-bootlets-src-10.12.01/mach-mx28/hw/digctl/Makefile | |
| index f1f7a82..2ed4545 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx28/hw/digctl/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx28/hw/digctl/Makefile | |
| @@ -19,7 +19,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_digctl.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx28/hw/icoll/Makefile b/imx-bootlets-src-10.12.01/mach-mx28/hw/icoll/Makefile | |
| index c15af76..cff1616 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx28/hw/icoll/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx28/hw/icoll/Makefile | |
| @@ -18,7 +18,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_icoll_set.o src/hw_icoll_init.o | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx28/hw/lradc/Makefile b/imx-bootlets-src-10.12.01/mach-mx28/hw/lradc/Makefile | |
| index 00043d7..684332b 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx28/hw/lradc/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx28/hw/lradc/Makefile | |
| @@ -18,7 +18,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_lradc.o src/hw_lradc_setup.o src/hw_lradc_init.o \ | |
| src/hw_lradc_ladder.o src/hw_lradc_touch_screen.o \ | |
| diff --git a/imx-bootlets-src-10.12.01/mach-mx28/hw/power/Makefile b/imx-bootlets-src-10.12.01/mach-mx28/hw/power/Makefile | |
| index 8a5b86d..28e34e1 100644 | |
| --- a/imx-bootlets-src-10.12.01/mach-mx28/hw/power/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/mach-mx28/hw/power/Makefile | |
| @@ -18,7 +18,7 @@ STRIP = $(CROSS_COMPILE)strip | |
| OBJCOPY = $(CROSS_COMPILE)objcopy | |
| OBJDUMP = $(CROSS_COMPILE)o | |
| -CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -DSTMP378x | |
| +CFLAGS = -Wall -ffunction-sections $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x | |
| lib_objs := src/hw_power.o src/hw_power_battery.o src/hw_power_init.o \ | |
| src/hw_power_interrupts.o src/hw_power_registers.o \ | |
| diff --git a/imx-bootlets-src-10.12.01/power_prep/Makefile b/imx-bootlets-src-10.12.01/power_prep/Makefile | |
| index 4094641..a870ca4 100644 | |
| --- a/imx-bootlets-src-10.12.01/power_prep/Makefile | |
| +++ b/imx-bootlets-src-10.12.01/power_prep/Makefile | |
| @@ -29,7 +29,7 @@ ifeq ($(POWERFLAG),MXS_VBUS_CURRENT_DRAW) | |
| CFLAGS += -DMXS_VBUS_CURRENT_DRAW | |
| endif | |
| -CFLAGS += -Wall $(INCLUDEDIRS) -I./ -O -DSTMP378x -D$(ARCH) | |
| +CFLAGS += -Wall $(INCLUDEDIRS) -I./ -O -fno-stack-protector -DSTMP378x -D$(ARCH) | |
| LDFLAGS = -static -gc-sections -nostdlib -T $(BOOT_LAYOUT) | |
| -- | |
| 1.8.5.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment