[Bug 277291] machine/atomic.h on x86_64 build issue on a Linux's cross compiling context

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 25 Feb 2024 11:56:50 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277291

--- Comment #3 from Dimitry Andric <dim@FreeBSD.org> ---
It appears to be running a /usr/local/bin/x86_64-unknown-freebsd13-clang++
binary:

2024-02-25T03:45:40.9530114Z sccache
/usr/local/bin/x86_64-unknown-freebsd13-clang++ -DHAVE_RPC_XDR_H=0
-I/checkout/src/llvm-project/compiler-rt/lib/sanitizer_common/..
-ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-freebsd -Wall
-Wno-unused-parameter -O3 -DNDEBUG -fPIC -fno-builtin -fno-exceptions
-fomit-frame-pointer -funwind-tables -fno-stack-protector
-fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety
-Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu
-Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti
-Wframe-larger-than=570 -Wglobal-constructors -std=c++17 -MD -MT
lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux.cpp.o
-MF
lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux.cpp.o.d
-o
lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux.cpp.o
-c
/checkout/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
2024-02-25T03:45:40.9538046Z In file included from
/checkout/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:85:
2024-02-25T03:45:40.9539349Z
/usr/local/x86_64-unknown-freebsd13/usr/include/machine/atomic.h:214:1: error:
invalid output constraint '=@cce' in asm
2024-02-25T03:45:40.9540101Z ATOMIC_CMPSET(char);
2024-02-25T03:45:40.9540385Z ^

which is initialized somewhere at the start of the build with:

2024-02-25T03:28:53.1887125Z ENV \
2024-02-25T03:28:53.1887562Z    
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd13-ar \
2024-02-25T03:28:53.1888187Z    
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd13-clang \
2024-02-25T03:28:53.1888807Z    
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd13-clang++

but the only version identifier I can find in there is from the CMake
configuration phase:

2024-02-25T03:45:36.3095785Z -- The C compiler identification is Clang 6.0.0
2024-02-25T03:45:36.3526050Z -- The CXX compiler identification is Clang 6.0.0

Is this really clang 6.0? That is extremely old by now, and should be upgraded
ASAP :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.