Author: jcrouse Date: 2008-04-10 02:05:41 +0200 (Thu, 10 Apr 2008) New Revision: 3228
Modified: trunk/payloads/coreinfo/Makefile Log: coreinfo: Make coreinfo use the gcc-wrappers from libpayload
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Acked-by: Uwe Hermann uwe@hermann-uwe.de
Modified: trunk/payloads/coreinfo/Makefile =================================================================== --- trunk/payloads/coreinfo/Makefile 2008-04-09 23:48:48 UTC (rev 3227) +++ trunk/payloads/coreinfo/Makefile 2008-04-10 00:05:41 UTC (rev 3228) @@ -44,14 +44,12 @@ 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 @@
$(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