Control: forwarded -1 https://github.com/llvm/llvm-project/issues/56581

On Wed, Feb 16, 2022 at 02:22:34PM +0100, Timo Röhling wrote:
> Package: clang-13
> Version: 1:13.0.1-3
> Severity: important
> Tags: ftbfs
> Control: affects -1 src:filament
> 
> 
> Dear maintainer,
> 
> building filament on armel triggers the following compiler error:
> 
>     fatal error: error in backend: Cannot select: intrinsic %llvm.arm.hint
>     PLEASE submit a bug report to https://bugs.llvm.org/ and include the 
> crash backtrace, preprocessed source, and associated run script.
>     Stack dump:
>     0.      Program arguments: /usr/bin/clang++ -g -O2 
> -ffile-prefix-map=/build/filament-1.9.25+dfsg2=. -fstack-protector-strong 
> -Wformat -Werror=format-security -latomic -Wdate-time -std=c++17 
> -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -fPIC -fPIC 
> -std=gnu++17 -Wl,--no-as-needed -Wl,--as-needed -DFILAMENT_SUPPORTS_XCB 
> -DFILAMENT_SUPPORTS_XLIB -Dutils_EXPORTS 
> -I/build/filament-1.9.25+dfsg2/libs/utils/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -c -MD -MT 
> libs/utils/CMakeFiles/utils.dir/src/JobSystem.cpp.o -MF 
> CMakeFiles/utils.dir/src/JobSystem.cpp.o.d -fcolor-diagnostics -o 
> CMakeFiles/utils.dir/src/JobSystem.cpp.o 
> /build/filament-1.9.25+dfsg2/libs/utils/src/JobSystem.cpp
>     1.      <eof> parser at end of file
>     2.      Code generation
>     3.      Running pass 'Function Pass Manager' on module 
> '/build/filament-1.9.25+dfsg2/libs/utils/src/JobSystem.cpp'.
>     4.      Running pass 'ARM Instruction Selection' on function 
> '@_ZN5utils9JobSystem4loopEPNS0_11ThreadStateE'
>     clang: error: clang frontend command failed with exit code 70 (use -v to 
> see invocation)
>     Debian clang version 13.0.1-3
>     Target: arm-unknown-linux-gnueabi
>     Thread model: posix
>     InstalledDir: /usr/bin
>     clang: note: diagnostic msg:
>     ********************
>     PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
>     Preprocessed source(s) and associated run script(s) are located at:
>     clang: note: diagnostic msg: /tmp/JobSystem-c6a685.cpp
>     clang: note: diagnostic msg: /tmp/JobSystem-c6a685.sh
>     clang: note: diagnostic msg:
>     ********************

I've forwarded it upstream, a workaround patch for filament is attached.

> Cheers
> Timo

cu
Adrian
Description: Workaround for an LLVM bug on armel
 https://github.com/llvm/llvm-project/issues/56581
Author: Adrian Bunk <b...@debian.org>
Bug-Debian: https://bugs.debian.org/1005871

--- filament-1.9.25+dfsg2.orig/libs/utils/include/utils/compiler.h
+++ filament-1.9.25+dfsg2/libs/utils/include/utils/compiler.h
@@ -176,7 +176,7 @@
 #   define UTILS_HAS_RTTI 0
 #endif
 
-#ifdef __ARM_ACLE
+#if defined(__ARM_ACLE) && (__ARM_ARCH >= 7)
 #   include <arm_acle.h>
 #   define UTILS_WAIT_FOR_INTERRUPT()   __wfi()
 #   define UTILS_WAIT_FOR_EVENT()       __wfe()

Reply via email to