From 1cb92bc77f7be88b267be180a767b333a9d34a00 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 10 Apr 2008 00:05:41 +0000 Subject: coreinfo: Make coreinfo use the gcc-wrappers from libpayload Signed-off-by: Jordan Crouse Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3228 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/coreinfo/Makefile | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'payloads/coreinfo') diff --git a/payloads/coreinfo/Makefile b/payloads/coreinfo/Makefile index e3d4b6ed1b..ac36fd9173 100644 --- a/payloads/coreinfo/Makefile +++ b/payloads/coreinfo/Makefile @@ -44,14 +44,12 @@ HOSTCXX = g++ HOSTCFLAGS := -I$(srck) -I$(objk) HOSTCXXFLAGS := -I$(srck) -I$(objk) -CC = gcc -CROSS_CFLAGS = -m32 -INCLUDES = -I../libpayload/include -Ibuild \ - -I$(shell $(CC) $(CROSS_CFLAGS) -print-search-dirs | \ - head -n 1 | cut -d' ' -f2)include -LIBPAYLOAD = ../libpayload/libpayload.a -LIBGCC := $(shell $(CC) $(CROSS_CFLAGS) -print-libgcc-file-name) -CFLAGS := -Wall -Werror -Os -fno-stack-protector -nostdinc $(INCLUDES) +LIBPAYLOAD_DIR := ../libpayload +CC = $(LIBPAYLOAD_DIR)/bin/lpgcc +AS = $(LIBPAYLOAD_DIR)/bin/lpas + +INCLUDES = -Ibuild +CFLAGS := -Wall -Werror -Os $(INCLUDES) OBJECTS = cpuinfo_module.o cpuid.S.o pci_module.o coreboot_module.o \ nvram_module.o coreinfo.o OBJS = $(patsubst %,$(obj)/%,$(OBJECTS)) @@ -69,20 +67,17 @@ all: prepare $(TARGET) $(TARGET): $(OBJS) $(Q)printf " LD $(subst $(shell pwd)/,,$(@))\n" - $(Q)#ld --verbose -T ../libpayload/libpayload.ldscript -o $@ $(OBJS) \ - #--whole-archive $(LIBPAYLOAD) --no-whole-archive $(LIBGCC) - $(Q)ld -T ../libpayload/libpayload.ldscript -o $@ $(OBJS) \ - ../libpayload/i386/head.o $(LIBPAYLOAD) $(LIBGCC) + $(Q)$(CC) -o $@ $(OBJS) $(Q)printf " STRIP $(subst $(shell pwd)/,,$(@))\n" $(Q)strip -s $@ $(obj)/%.S.o: $(src)/%.S $(Q)printf " AS $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(AS) --32 -o $@ $< + $(Q)$(AS) -o $@ $< $(obj)/%.o: $(src)/%.c $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(CC) $(CROSS_CFLAGS) $(CFLAGS) -c -o $@ $< + $(Q)$(CC) $(CFLAGS) -c -o $@ $< endif -- cgit v1.2.3