[coreboot] New patch to review for coreboot: 922b3c6 leave frame pointers

Rudolf Marek (r.marek@assembler.cz) gerrit at coreboot.org
Tue Jun 5 01:02:26 CEST 2012


Rudolf Marek (r.marek at assembler.cz) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1092

-gerrit

commit 922b3c627bd573513b26fcb47197b01e77bfee0b
Author: Rudolf Marek <r.marek at assembler.cz>
Date:   Tue Jun 5 00:22:39 2012 +0200

    leave frame pointers
    
    Do not strip out frame pointer, handy for debugging (this needs to be somehow more polished
    but one gets the idea).
    
    Change-Id: I4f96ca321a175c941c55846fd2471ef5cc4897af
    Signed-off-by: Rudolf Marek <r.marek at assembler.cz>
---
 Makefile.inc              |   16 +++++++++++++++-
 src/arch/x86/Makefile.inc |    5 +++++
 2 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 176ff67..f3e87cc 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -61,8 +61,15 @@ subdirs-y += site-local
 # Add source classes and their build options
 classes-y := ramstage romstage driver smm
 
-romstage-c-ccopts:=-D__PRE_RAM__
+
+ifeq ($(CONFIG_ULINUX),y)
+stack_opt := -fomit-frame-pointer
+ramstage-c-ccopts:= -fstack-protector-all
+endif
+
+romstage-c-ccopts:=-D__PRE_RAM__ $(stack_opt)
 romstage-S-ccopts:=-D__PRE_RAM__
+
 ifeq ($(CONFIG_TRACE),y)
 ramstage-c-ccopts:= -finstrument-functions
 endif
@@ -163,7 +170,14 @@ CFLAGS += -Wstrict-aliasing -Wshadow
 ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y)
 CFLAGS += -Werror
 endif
+
+ifeq ($(CONFIG_ULINUX),n)
 CFLAGS += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
+endif
+
+ifeq ($(CONFIG_ULINUX),y)
+CFLAGS += -fno-common -ffreestanding -fno-builtin
+endif
 
 additional-dirs := $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options
 
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 9739555..dc7a7a0 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -208,7 +208,12 @@ else
 
 $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h $(obj)/config.h
 	@printf "    CC         romstage.inc\n"
+ifeq ($(CONFIG_ULINUX),y)
+	$(CC) -MMD $(CFLAGS) -D__PRE_RAM__ -fomit-frame-pointer -I$(src) -I. -I$(obj) -c -S $< -o $@
+endif
+ifeq ($(CONFIG_ULINUX),n)
 	$(CC) -MMD $(CFLAGS) -D__PRE_RAM__ -I$(src) -I. -I$(obj) -c -S $< -o $@
+endif
 
 $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc
 	@printf "    POST       romstage.inc\n"




More information about the coreboot mailing list