With gcc 13.2.1 arm-v7a-linux-gnueabihf, the LTO wrapper sometimes
throws internal compiler errors when calling PTXdist without -j:

    [ 96%] Linking C shared library bin/libopen62541.so
    lto1: internal compiler error: in get_token, at opts-common.cc:2123
    0x7f683dce6249 __libc_start_call_main
            ../sysdeps/nptl/libc_start_call_main.h:58
    0x7f683dce6304 __libc_start_main_impl
            ../csu/libc-start.c:360
    Please submit a full bug report, with preprocessed source (by using 
-freport-bug).
    Please include the complete backtrace with any bug report.
    See <https://gcc.gnu.org/bugs/> for instructions.
    lto-wrapper: fatal error: 
/opt/OSELAS.Toolchain-2023.07.1/arm-v7a-linux-gnueabihf/gcc-13.2.1-clang-16.0.6-glibc-2.37-binutils-2.40-kernel-6.3.6-sanitized/bin/arm-v7a-linux-gnueabihf-gcc
 returned 1 exit status
    compilation terminated.

Disable LTO (CMake calls it Interprocedural Optimization) for now.

Signed-off-by: Roland Hieber <[email protected]>
---
 rules/open62541.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/open62541.make b/rules/open62541.make
index a44bc189a816..ed2354f643d0 100644
--- a/rules/open62541.make
+++ b/rules/open62541.make
@@ -52,6 +52,7 @@ OPEN62541_CONF_OPT    := \
        $(CROSS_CMAKE_USR) \
        -DBUILD_SHARED_LIBS=ON \
        -DCLANG_FORMAT_EXE=$(PTXDIST_WORKSPACE)/selected_toolchain/clang-format 
\
+       -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \
        -DMDNSD_LOGLEVEL=$(OPEN62541_LOGLEVEL) \
        -DOPEN62541_VERSION="v$(OPEN62541_VERSION)" \
        -DUA_ARCHITECTURE=posix \
-- 
2.39.2


Reply via email to