[coreboot-gerrit] Patch set updated for coreboot: coreinfo: fix compilation

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Jun 30 01:56:16 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10717

-gerrit

commit d5f3fbbe2a646f12996ae12a22dc7d9115968896
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Mon Jun 29 16:44:12 2015 -0700

    coreinfo: fix compilation
    
    - libpayload symbols are conflicting with gcc builtins (e.g. log2)
    - ALIGN() is already defined in libpayload these days
    
    Change-Id: I2aefdde26853253d58f6cf6e186e784871c1cb5b
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 payloads/coreinfo/Makefile      | 7 +++++--
 payloads/coreinfo/cbfs_module.c | 2 --
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/payloads/coreinfo/Makefile b/payloads/coreinfo/Makefile
index cb8d0ae..da50051 100644
--- a/payloads/coreinfo/Makefile
+++ b/payloads/coreinfo/Makefile
@@ -60,7 +60,7 @@ LIB_CONFIG ?= defconfig
 OBJCOPY ?= objcopy
 
 INCLUDES = -I$(obj) -include kconfig.h
-CFLAGS := -Wall -Werror -Os $(INCLUDES)
+CFLAGS := -Wall -Werror -Os -fno-builtin $(INCLUDES)
 OBJECTS = cpuinfo_module.o cpuid.S.o pci_module.o coreboot_module.o \
 	  nvram_module.o bootlog_module.o ramdump_module.o lar_module.o \
 	  multiboot_module.o cbfs_module.o coreinfo.o
@@ -71,7 +71,7 @@ ifneq ($(strip $(HAVE_DOTCONFIG)),)
 include $(src)/.config
 all: $(TARGET)
 
-$(TARGET): $(src)/.config $(OBJS) libpayload
+$(TARGET): $(src)/.config $(obj)/config.h $(OBJS) libpayload
 	$(Q)printf "  LPCC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(LPCC) -o $@ $(OBJS)
 	$(Q)$(OBJCOPY) --only-keep-debug $@ $(TARGET).debug
@@ -101,6 +101,9 @@ libpayload:
 	$(Q)make -C $(LIBCONFIG_PATH) DESTDIR=$(shell pwd)/$(LIBPAYLOAD_DIR) install
 endif
 
+$(obj)/config.h:
+	$(MAKE) oldconfig
+
 $(shell mkdir -p $(obj) $(objk)/lxdialog $(KCONFIG_SPLITCONFIG))
 
 clean:
diff --git a/payloads/coreinfo/cbfs_module.c b/payloads/coreinfo/cbfs_module.c
index 2e6db28..8cb76a4 100644
--- a/payloads/coreinfo/cbfs_module.c
+++ b/payloads/coreinfo/cbfs_module.c
@@ -22,8 +22,6 @@
 
 #if IS_ENABLED(CONFIG_MODULE_CBFS)
 
-#define ALIGN(_v, _a) (((_v) + ((_a) - 1)) & ~((_a) - 1))
-
 #define HEADER_MAGIC		0x4F524243
 #define HEADER_ADDR		0xfffffffc
 #define LARCHIVE_MAGIC		0x455649484352414cLL	/* "LARCHIVE" */



More information about the coreboot-gerrit mailing list