summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2008-04-10 00:05:41 +0000
committerJordan Crouse <jordan.crouse@amd.com>2008-04-10 00:05:41 +0000
commit1cb92bc77f7be88b267be180a767b333a9d34a00 (patch)
tree6ec8b34ec1a9d7f6cce2ac0c8f1daaa4f22bce30 /payloads
parent804f4df5bdbe5244c8f4f15c5d50d223f8a11c34 (diff)
downloadcoreboot-1cb92bc77f7be88b267be180a767b333a9d34a00.tar.xz
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> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3228 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads')
-rw-r--r--payloads/coreinfo/Makefile23
1 files changed, 9 insertions, 14 deletions
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