Skip to contentSkip to conversation

locktest: Makefile.am: Do not use build flags

PATCH New Khem Raj 1 participant 1 message Jul 25, 2023

Subsystems (2)
lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 locktest: Makefile.am: Do not use build flags

Using CFLAGS_FOR_BUILD etc. here means it is using wrong flags when thse flags are speficied different than target flags which is common when cross-building. It can pass wrong paths to linker and it would find incompatible libraries during link since they are from host system and target maybe not same as build host.

Fixes subtle errors like
| aarch64-yoe-linux-ld.lld: error: /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nfs-utils/2.6.3-r0/recipe-sysroot-native/usr/lib/libsqlite3.so is incompatible with elf64-littleaarch64

Upstream-Status: Pending

---
 tools/locktest/Makefile.am | 3 ---
 1 file changed, 3 deletions(-)
tools/locktest/Makefile.am +0 -3
index e8914655..2fd36971 100644
@@ -2,8 +2,5 @@
 
 noinst_PROGRAMS = testlk
 testlk_SOURCES = testlk.c
-testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 
 MAINTAINERCLEANFILES = Makefile.in
Signature · 1 line
2.41.0