This code fixes a number of build issues related to the AMD Agesa code. The particular issues are global variables existing in romstage and the use of GCC intrinsics in the build. The former issue will be addressed shortly, and the latter issue requires community assistance. This code is dependent on the AMD Family 14h mainboard code.

Signed-off-by: Frank Vibrans <frank.vibrans@amd.com>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Marc Jones <marcj303@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6348 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Frank Vibrans 2011-02-14 18:47:37 +00:00 committed by Marc Jones
parent 420faca0d0
commit 0822ad8b19
2 changed files with 6 additions and 2 deletions

View File

@ -300,13 +300,16 @@ INCLUDES += -Isrc/devices/oprom/include
# abspath is a workaround for romcc # abspath is a workaround for romcc
INCLUDES += -include $(abspath $(obj)/config.h) INCLUDES += -include $(abspath $(obj)/config.h)
CFLAGS = $(INCLUDES) -Os -nostdinc -pipe -g CFLAGS = $(INCLUDES) -Os -pipe -g
CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
CFLAGS += -Wstrict-aliasing -Wshadow CFLAGS += -Wstrict-aliasing -Wshadow
ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y) ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y)
CFLAGS += -Werror CFLAGS += -Werror
endif endif
ifneq ($(CONFIG_AMD_AGESA),y)
CFLAGS += -nostdinc
endif
CFLAGS += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer CFLAGS += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
CBFS_COMPRESS_FLAG:=l CBFS_COMPRESS_FLAG:=l

View File

@ -49,5 +49,6 @@ SECTIONS
*(.comment.*) *(.comment.*)
*(.note.*) *(.note.*)
} }
_bogus = ASSERT((SIZEOF(.bss) + SIZEOF(.data)) == 0, "Do not use global variables in romstage"); /* _bogus = ASSERT((SIZEOF(.bss) + SIZEOF(.data)) == 0, "Do not use global variables in romstage"); */
_bogus = ASSERT((SIZEOF(.bss)) == 0, "Do not use global variables in romstage");
} }