openposix: lib: Use the configured compiler
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
@@ -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
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
Hi Anders,
Quoted 5 lines
The lib
Makefiledoes 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
Signed-off-by Anders Roxell <[email protected]>--- testcases/open_posix_testsuite/lib/Makefile | 2 ++ 1 file changed, 2 insertions(+)testcases/open_posix_testsuite/lib/Makefile +2
-0@@ -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