diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2015-11-11 15:39:59 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-16 13:00:28 +1100 |
commit | da73368a34700f9c33b764fce9d04ca19abb0200 (patch) | |
tree | ba93d5bd6d71eadee97ddb08aaf362b587009b6f /external | |
parent | 499ddebc724e40a2a77d80e66777ff857c836e42 (diff) | |
download | skiboot-da73368a34700f9c33b764fce9d04ca19abb0200.zip skiboot-da73368a34700f9c33b764fce9d04ca19abb0200.tar.gz skiboot-da73368a34700f9c33b764fce9d04ca19abb0200.tar.bz2 |
external/pflash: Fixup LDFLAGS
In order to be able to compile for something that isn't the default for the
compiler one should be able to use CFLAGS and LDFLAGS on commandline.
ie build a 64bit binary with a compiler which builds by default 32bit or
the opposite endian for which the compiler is configured.
Currently the common/rules.mk ignores LDFLAGS when it shouldn't and pflash
sets LDFLAGS for something which only applies to the final link.
This patch addresses both those issues.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/common/rules.mk | 2 | ||||
-rw-r--r-- | external/pflash/rules.mk | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/external/common/rules.mk b/external/common/rules.mk index bc565e8..79078e5 100644 --- a/external/common/rules.mk +++ b/external/common/rules.mk @@ -32,5 +32,5 @@ common/arch_flash_common.o: common/arch_flash_common.c .FORCE $(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@ common/arch_flash.o: $(ARCH_OBJS) - $(CROSS_COMPILE)ld -r $(ARCH_OBJS) -o $@ + $(CROSS_COMPILE)ld $(LDFLAGS) -r $(ARCH_OBJS) -o $@ diff --git a/external/pflash/rules.mk b/external/pflash/rules.mk index d60e276..003758a 100644 --- a/external/pflash/rules.mk +++ b/external/pflash/rules.mk @@ -1,7 +1,6 @@ .DEFAULT_GOAL := all -CFLAGS = -O2 -Wall -I. -LDFLAGS = -lrt +override CFLAGS += -O2 -Wall -I. OBJS = pflash.o progress.o version.o OBJS += libflash/libflash.o libflash/libffs.o libflash/ecc.o libflash/blocklevel.o libflash/file.o OBJS += common/arch_flash.o @@ -22,5 +21,5 @@ version.c: make_version.sh .version $(CC) $(CFLAGS) -c $< -o $@ $(EXE): $(OBJS) - $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + $(CC) $(CFLAGS) $^ -lrt -o $@ |