f1e401c6cb
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>
19 lines
826 B
Makefile
19 lines
826 B
Makefile
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
ifdtoolobj = ifdtool.o fmap.o kv_pair.o valstr.o
|
|
|
|
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 $@ $<
|
|
|
|
$(objutil)/ifdtool/%.o: $(top)/util/cbfstool/flashmap/%.c
|
|
$(HOSTCC) $(IFDTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/ifdtool/ifdtool: $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj))
|
|
printf " IFDTOOL\n"
|
|
$(HOSTCC) $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) -o $@
|