clang errors out linking lto objects
riscv64-yoe-linux-musl-ld: /tmp/lto-llvm-d497c5.o: can't link soft-float 
modules with double-float modules

This is something needs to be addressed in clang for riscv
as of now disable lto for rv32/rv64 when using clang

Signed-off-by: Khem Raj <[email protected]>
---
 .../recipes-protocols/opcua/open62541_1.3.3.bb           | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb 
b/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb
index 317697262c..5af856ad34 100644
--- a/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb
+++ b/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb
@@ -36,3 +36,12 @@ PACKAGECONFIG[amalgamation] = "-DUA_ENABLE_AMALGAMATION=ON, 
-DUA_ENABLE_AMALGAMA
 PACKAGECONFIG[encryption] = "-DUA_ENABLE_ENCRYPTION=ON, 
-DUA_ENABLE_ENCRYPTION=OFF, mbedtls"
 PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF"
 PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, 
-DUA_ENABLE_PUBSUB_ETH_UADP=OFF"
+
+do_configure:prepend:toolchain-clang:riscv64() {
+    sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION 
ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt
+}
+
+do_configure:prepend:toolchain-clang:riscv32() {
+    sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION 
ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt
+}
+
-- 
2.37.3

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

Reply via email to