From ec60b44012999ff95f6d3a98c8bedba145b49f21 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 28 Apr 2022 23:41:30 +0200 Subject: imx-mkimage: fix patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @echo "PLAT="$(PLAT) "HDMI="$(HDMI) @echo "Compiling mkimage_imx8" - $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz -+ $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(LDFLAGS) -lz ++ $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(BUILD_LDFLAGS) -lz lpddr4_imem_1d = lpddr4_pmu_train_1d_imem$(LPDDR_FW_VERSION).bin lpddr4_dmem_1d = lpddr4_pmu_train_1d_dmem$(LPDDR_FW_VERSION).bin -- cgit v1.2.3-54-g00ecf