Skip to contentSkip to conversation

arm/edk2-firmware: fix passing of linker flags

PATCH In review Khasim Mohammed 3 participants 3 messages Jun 16, 2020 – Jun 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/edk2-firmware: fix passing of linker flags

The build initially worked because host machine had util-linux-dev installed, the build failed otherwise. This patch will fix the passing of linker flags.

Change-Id If2f31e8e31109b9c8fd62b32d2f80902a1dd3cfd
---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 3 +++
 1 file changed, 3 insertions(+)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +3 -0
index 7b9327c..6696768 100644
@@ -48,6 +48,9 @@ python __anonymous() {
 }
 
 do_compile() {
+    sed -i -e 's:-I \.\.:-I \.\. ${BUILD_CFLAGS} :' ${EDK_TOOLS_PATH}/Source/C/Makefiles/header.makefile
+    sed -i -e 's: -luuid: -luuid ${BUILD_LDFLAGS}:g' ${EDK_TOOLS_PATH}/Source/C/*/GNUmakefile
+
     # Copy the templates as we don't run envsetup
     cp ${EDK_TOOLS_PATH}/Conf/build_rule.template ${WORKSPACE}/Conf/build_rule.txt
     cp ${EDK_TOOLS_PATH}/Conf/tools_def.template ${WORKSPACE}/Conf/tools_def.txt
Signature · 1 line
2.17.1
#1 lore raw

Looks good +1

Quoted 30 lines · Khasim Mohammed

The build initially worked because host machine had util-linux-dev installed, the build failed otherwise. This patch will fix the passing of linker flags.

Change-Id If2f31e8e31109b9c8fd62b32d2f80902a1dd3cfd
---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 3 +++
 1 file changed, 3 insertions(+)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +3 -1
index 7b9327c..6696768 100644
@@ -48,6 +48,9 @@ python __anonymous() {
 }
 
 do_compile() {
+    sed -i -e 's:-I \.\.:-I \.\. ${BUILD_CFLAGS} :' ${EDK_TOOLS_PATH}/Source/C/Makefiles/header.makefile
+    sed -i -e 's: -luuid: -luuid ${BUILD_LDFLAGS}:g' ${EDK_TOOLS_PATH}/Source/C/*/GNUmakefile
+
     # Copy the templates as we don't run envsetup
     cp ${EDK_TOOLS_PATH}/Conf/build_rule.template ${WORKSPACE}/Conf/build_rule.txt
     cp ${EDK_TOOLS_PATH}/Conf/tools_def.template ${WORKSPACE}/Conf/tools_def.txt
--

2.17.1

#2 lore raw
In reply to Khasim Mohammed
Quoted 7 lines · Khasim Mohammed

The build initially worked because host machine had util-linux-dev installed, the build failed otherwise. This patch will fix the passing of linker flags.

Change-Id If2f31e8e31109b9c8fd62b32d2f80902a1dd3cfd

Pulled into master.

Thanks,
Jon

Quoted 23 lines
---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 3 +++
 1 file changed, 3 insertions(+)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +3 -0
index 7b9327c..6696768 100644
@@ -48,6 +48,9 @@ python __anonymous() {
 }
 
 do_compile() {
+    sed -i -e 's:-I \.\.:-I \.\. ${BUILD_CFLAGS} :' ${EDK_TOOLS_PATH}/Source/C/Makefiles/header.makefile
+    sed -i -e 's: -luuid: -luuid ${BUILD_LDFLAGS}:g' ${EDK_TOOLS_PATH}/Source/C/*/GNUmakefile
+
     # Copy the templates as we don't run envsetup
     cp ${EDK_TOOLS_PATH}/Conf/build_rule.template ${WORKSPACE}/Conf/build_rule.txt
     cp ${EDK_TOOLS_PATH}/Conf/tools_def.template ${WORKSPACE}/Conf/tools_def.txt
Signature · 1 line
2.17.1