diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2022-04-28 23:41:30 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2022-04-28 23:52:10 +0200 |
commit | ec60b44012999ff95f6d3a98c8bedba145b49f21 (patch) | |
tree | 1fcc06d2a1e8d6ce947f4a43c4b900f2ac51640b /recipes-bsp | |
parent | 82a05904e4763efc1d10c8fe6fe26e0ea62dbd1a (diff) | |
download | meta-freescale-ec60b44012999ff95f6d3a98c8bedba145b49f21.tar.gz |
imx-mkimage: fix patch
imx-mkimage is compiled with the host gcc, thus if one needs to add
explicit linker flags one should use BULD_LDFLAGS, not the ones
forseen for the cross compiler.
Prevents, on distros with an older gcc (e.g. OpenSuse 15.3 with gcc 7.5.0),
the following error.
| Compiling mkimage_imx8
| gcc -O2 -Wall -std=c99 -I .../imx-boot/1.0-r0/recipe-sysroot-native/usr/include -L .../imx-boot/1.0-r0/recipe-sysroot-native/usr/lib
mkimage_imx8.c -o mkimage_imx8 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=.../imx-boot/1.0-r0=/usr/src/debug/imx-boot/1.0-r0
-fdebug-prefix-map=.../imx-boot/1.0-r0=/usr/src/debug/imx-boot/1.0-r0 -fdebug-prefix-map=.../imx-boot/1.0-r0/recipe-sysroot=
-fdebug-prefix-map=.../imx-boot/1.0-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -lz
| gcc: error: unrecognized command line option ‘-fmacro-prefix-map=.../imx-boot/1.0-r0=/usr/src/debug/imx-boot/1.0-r0’
| make[1]: *** [soc.mak:87: mkimage_imx8] Error 1
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch b/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch index 4de0155d..f8c68d45 100644 --- a/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch +++ b/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch | |||
@@ -19,7 +19,7 @@ index 03b05f7aafeb..4d5df0777704 100644 | |||
19 | @echo "PLAT="$(PLAT) "HDMI="$(HDMI) | 19 | @echo "PLAT="$(PLAT) "HDMI="$(HDMI) |
20 | @echo "Compiling mkimage_imx8" | 20 | @echo "Compiling mkimage_imx8" |
21 | - $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz | 21 | - $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz |
22 | + $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(LDFLAGS) -lz | 22 | + $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(BUILD_LDFLAGS) -lz |
23 | 23 | ||
24 | lpddr4_imem_1d = lpddr4_pmu_train_1d_imem$(LPDDR_FW_VERSION).bin | 24 | lpddr4_imem_1d = lpddr4_pmu_train_1d_imem$(LPDDR_FW_VERSION).bin |
25 | lpddr4_dmem_1d = lpddr4_pmu_train_1d_dmem$(LPDDR_FW_VERSION).bin | 25 | lpddr4_dmem_1d = lpddr4_pmu_train_1d_dmem$(LPDDR_FW_VERSION).bin |