diff options
author | Marc Jones <marc.jones@se-eng.com> | 2015-02-10 14:15:45 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-02-15 09:21:02 +0100 |
commit | e77e37b957daac1a5d3cf53cce5dd50a8dd863d4 (patch) | |
tree | e5ce2d18f60bcb86866df0c3dc254affd703c71f /util/nvidia | |
parent | bde6d309dfafe58732ec46314a2d4c08974b62d4 (diff) |
cbootimage: Add HOSTCC and flags
Add the flags used by the Nvidia makefile and use HOSTCC
to build cbootimage. Note that adding -g makes the BCT
very large, so leave that flag out.
Change-Id: I4431efffdfdcbd030665b26f5b799352e38d1f95
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: http://review.coreboot.org/8411
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/nvidia')
-rw-r--r-- | util/nvidia/Makefile.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/util/nvidia/Makefile.inc b/util/nvidia/Makefile.inc index c8be3bbab2..91c8a94a9b 100644 --- a/util/nvidia/Makefile.inc +++ b/util/nvidia/Makefile.inc @@ -37,12 +37,15 @@ CBOOTIMAGE_RAW_SRCS:= \ CBOOTIMAGE_SRCS:=$(addprefix util/nvidia/cbootimage/src/,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS))) CBOOTIMAGE_OBJS:=$(addprefix $(objutil)/nvidia/cbootimage/,$(patsubst %.c,%.o,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS)))) +CBOOTIMAGE_FLAGS:=-Wall -std=c99 -O2 additional-dirs += $(sort $(dir $(CBOOTIMAGE_OBJS))) $(objutil)/nvidia/cbootimage/%.o: util/nvidia/cbootimage/src/%.c - gcc -c -o $@ $< + printf " HOSTCC $(subst $(objutil)/,,$(@))\n" + $(HOSTCC) $(CBOOTIMAGE_FLAGS) -c -o $@ $< $(CBOOTIMAGE): $(CBOOTIMAGE_OBJS) - gcc -o $@.tmp $^ -lm + printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n" + $(HOSTCC) $(CBOOTIMAGE_FLAGS) -o $@.tmp $^ -lm mv $@.tmp $@ |