This is using LIB_INSTALL_DIR which is pointing to target libdir e.g.
/usr/lib which is essentially a path inside sysroot but when passing it
via --library-path, it ends up adding this to linker commandline via
LD_LIBRARY_PATH and -rpath options which is flagged by gcc correctly as

arm-yoe-linux-gnueabi/12.0.1/ld: warning: library search path "/usr/lib" is 
unsafe for cross-compilation
| /usr/lib/libgio-2.0.so: file not recognized: file format not recognized
| collect2: error: ld returned 1 exit status

Signed-off-by: Khem Raj <[email protected]>
Cc: Andreas Müller <[email protected]>
---
 ...-cmake-Do-not-export-CC-into-gir-compiler.patch | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server/0001-cmake-Do-not-export-CC-into-gir-compiler.patch
 
b/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server/0001-cmake-Do-not-export-CC-into-gir-compiler.patch
index 8fd077cedc..fda84acae7 100644
--- 
a/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server/0001-cmake-Do-not-export-CC-into-gir-compiler.patch
+++ 
b/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server/0001-cmake-Do-not-export-CC-into-gir-compiler.patch
@@ -1,6 +1,6 @@
---- a/cmake/modules/GObjectIntrospection.cmake 2022-03-06 18:10:47.724184883 
+0100
-+++ b/cmake/modules/GObjectIntrospection.cmake 2022-03-06 18:10:12.560450948 
+0100
-@@ -122,9 +122,7 @@
+--- a/cmake/modules/GObjectIntrospection.cmake
++++ b/cmake/modules/GObjectIntrospection.cmake
+@@ -122,9 +122,7 @@ macro(gir_add_introspection gir)
                file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_gir_name}_files 
"${_gir_files}")
  
                add_custom_command(
@@ -11,3 +11,11 @@
                                ${INTROSPECTION_SCANNER_ARGS}
                                --namespace=${_gir_namespace}
                                --nsversion=${_gir_version}
+@@ -240,7 +238,6 @@ macro(gir_add_introspection_simple gir_l
+               ${_gir_identifies_prefixes}
+               ${_gir_deps}
+               --add-include-path=${SHARE_INSTALL_PREFIX}/gir-1.0
+-              --library-path=${LIB_INSTALL_DIR}
+               ${_extra_library_path}
+               --pkg-export ${pkg_export_prefix}-${gir_library_version}
+               --c-include=${c_include}
-- 
2.36.0

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

Reply via email to