From: Sunil Dora <[email protected]>

configure probes for an Objective-C compiler and picks the bare
${HOST_PREFIX}clang, which has no default sysroot, so libtool's probes
search the build host's library paths and do_configure fails QA with

  ERROR: gettext-1.0-r0 do_configure: QA Issue: This autoconf log
  indicates errors, it looked at host include and/or library paths
  while determining system capabilities. [configure-unsafe]

Export OBJC as the fully-flagged C compiler so the probes use the right
sysroot, and drop OBJC/OBJCFLAGS from the ptest environment file like
the existing CC/CXX handling, to avoid recording build paths.

Signed-off-by: Sunil Dora <[email protected]>
---
 ...nit-env.in-do-not-add-C-CXX-parameters.patch | 17 ++++++++++++-----
 meta/recipes-core/gettext/gettext_1.0.bb        |  5 +++++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git 
a/meta/recipes-core/gettext/gettext/0001-init-env.in-do-not-add-C-CXX-parameters.patch
 
b/meta/recipes-core/gettext/gettext/0001-init-env.in-do-not-add-C-CXX-parameters.patch
index e59c73fb7d..67214be3e5 100644
--- 
a/meta/recipes-core/gettext/gettext/0001-init-env.in-do-not-add-C-CXX-parameters.patch
+++ 
b/meta/recipes-core/gettext/gettext/0001-init-env.in-do-not-add-C-CXX-parameters.patch
@@ -6,17 +6,22 @@ Subject: [PATCH] init-env.in: do not add C/CXX parameters
 These are taken from the cross environment and include
 sysroot paths, so are not reproducible.
 
+OBJC/OBJCFLAGS dropped as well: the recipe now exports a fully-flagged
+OBJC (same command as CC, sysroot included), which would otherwise be
+recorded here verbatim and trip the buildpaths QA check.
+
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <[email protected]>
+Signed-off-by: Sunil Dora <[email protected]>
 ---
- gettext-tools/tests/init-env.in | 4 ----
- 1 file changed, 4 deletions(-)
+ gettext-tools/tests/init-env.in | 6 ------
+ 1 file changed, 6 deletions(-)
 
 diff --git a/gettext-tools/tests/init-env.in b/gettext-tools/tests/init-env.in
 index 0968388..3d9a8a5 100644
 --- a/gettext-tools/tests/init-env.in
 +++ b/gettext-tools/tests/init-env.in
-@@ -3,10 +3,6 @@ top_builddir=../..
+@@ -3,12 +3,6 @@
  
  OBJEXT="@OBJEXT@"
  EXEEXT="@EXEEXT@"
@@ -24,6 +29,8 @@ index 0968388..3d9a8a5 100644
 -CFLAGS="@CFLAGS@"
 -CXX="@CXX@"
 -CXXFLAGS="@CXXFLAGS@"
- OBJC="@OBJC@"
- OBJCFLAGS="@OBJCFLAGS@"
+-OBJC="@OBJC@"
+-OBJCFLAGS="@OBJCFLAGS@"
  CPPFLAGS="@CPPFLAGS@"
+ LDFLAGS="@LDFLAGS@"
+ LTLIBINTL="@LTLIBINTL@"
diff --git a/meta/recipes-core/gettext/gettext_1.0.bb 
b/meta/recipes-core/gettext/gettext_1.0.bb
index 696fcc3bb7..ce1d698260 100644
--- a/meta/recipes-core/gettext/gettext_1.0.bb
+++ b/meta/recipes-core/gettext/gettext_1.0.bb
@@ -31,6 +31,11 @@ SRC_URI:append:libc-musl = " 
file://0001-Ignore-failing-tests-needing-BIG5-encod
 
 inherit autotools texinfo pkgconfig ptest
 
+# configure's Objective-C probe would pick the bare ${HOST_PREFIX}cc, which
+# has no default sysroot and trips the configure-unsafe QA check; give it
+# the fully-flagged C compiler instead.
+export OBJC = "${CC}"
+
 EXTRA_OECONF += "--without-lispdir \
                  --disable-csharp \
                  --disable-libasprintf \
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#244652): 
https://lists.openembedded.org/g/openembedded-core/message/244652
Mute This Topic: https://lists.openembedded.org/mt/120998134/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to