diff options
author | Marek Kasiewicz <marek.kasiewicz@3mdeb.com> | 2020-10-20 13:06:37 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-11-22 15:01:30 +0000 |
commit | f1e401c6cb7058487eac791da0fc5b40678cb274 (patch) | |
tree | 2eabf7d6c585bbc1168cf68835f8062668d48952 /util/ifdtool/Makefile.inc | |
parent | a5cbe27148506ed851034673469d404407f902d7 (diff) | |
download | coreboot-f1e401c6cb7058487eac791da0fc5b40678cb274.tar.gz coreboot-f1e401c6cb7058487eac791da0fc5b40678cb274.tar.bz2 coreboot-f1e401c6cb7058487eac791da0fc5b40678cb274.zip |
util/cbfstool/flashmap/fmap.c: fix fmaptool endianness bugs on BE
This patch makes all accesses to the FMAP fields explicitly little endian.
It fixes issue where build on BE host produced different binary image than
on LE.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Change-Id: Ia88c0625cefa1e594ac1849271a71c3aacc8ce78
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55039
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'util/ifdtool/Makefile.inc')
-rw-r--r-- | util/ifdtool/Makefile.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/ifdtool/Makefile.inc b/util/ifdtool/Makefile.inc index b2d8f878041c..eb3a700d438e 100644 --- a/util/ifdtool/Makefile.inc +++ b/util/ifdtool/Makefile.inc @@ -6,6 +6,7 @@ IFDTOOLCFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -Werror IFDTOOLCFLAGS += -I$(top)/src/commonlib/include -I$(top)/src/commonlib/bsd/include IFDTOOLCFLAGS += -I$(top)/util/cbfstool/flashmap IFDTOOLCFLAGS += -include $(top)/src/commonlib/bsd/include/commonlib/bsd/compiler.h +IFDTOOLCFLAGS += -D_DEFAULT_SOURCE # for endianness converting functions $(objutil)/ifdtool/%.o: $(top)/util/ifdtool/%.c $(HOSTCC) $(IFDTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< |