Skip to contentSkip to conversation

openposix: lib: Use the configured compiler

PATCH In review Anders Roxell 3 participants 3 messages Sep 28 – Sep 29

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openposix: lib: Use the configured compiler

The lib Makefile does not include env.mk, so it does not get CC from config.mk. When we cross compile, libcommon.a gets built with the host compiler. Then the linker skips it and most tests fail to build.

Include env.mk, like the other Makefiles do.

---
 testcases/open_posix_testsuite/lib/Makefile | 2 ++
 1 file changed, 2 insertions(+)
testcases/open_posix_testsuite/lib/Makefile +2 -0
index ad6a9d7e6a1b..e63ee42647ac 100644
@@ -1,6 +1,8 @@
 top_srcdir?=		..
 subdir=			lib
 
+include $(top_srcdir)/include/mk/env.mk
+
 AR?=			ar
 RANLIB?=		ranlib
 CFLAGS+=		-I$(top_srcdir)/include
Signature · 5 lines
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Anders,

Quoted 1 line · Anders Roxell

openposix: lib: Use the configured compiler

Verdict - Reviewed

---
Note:

The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
In reply to Anders Roxell

Hi Anders,

Quoted 5 lines

The lib Makefile does not include env.mk, so it does not get CC from config.mk. When we cross compile, libcommon.a gets built with the host compiler. Then the linker skips it and most tests fail to build.

Include env.mk, like the other Makefiles do.

Make sense, thanks!
Verified and merged even close before the release.

Kind regards,
Petr

Quoted 18 lines
---
 testcases/open_posix_testsuite/lib/Makefile | 2 ++
 1 file changed, 2 insertions(+)
testcases/open_posix_testsuite/lib/Makefile +2 -0
index ad6a9d7e6a1b..e63ee42647ac 100644
@@ -1,6 +1,8 @@
 top_srcdir?=		..
 subdir=			lib
 
+include $(top_srcdir)/include/mk/env.mk
+
 AR?=			ar
 RANLIB?=		ranlib
 CFLAGS+=		-I$(top_srcdir)/include
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp