On 2020/08/06 03:22, Jonathan Gray wrote:
> On Tue, Aug 04, 2020 at 07:40:45PM -0400, George Koehler wrote:
> > On Tue, 4 Aug 2020 23:22:14 +0100
> > Stuart Henderson <[email protected]> wrote:
> > 
> > > ld.lld: error: undefined symbol: __atomic_is_lock_free
> > 
> > kettenis wrote an __atomic_is_lock_free for macppc when it switched to
> > base-clang: /usr/src/lib/libcompiler_rt/ppc/atomic_lock_free.c
> > 
> > Do we now need to write __atomic_is_lock_free for i386?
> > 
> > This commit might be the cause:
> >   [X86] Correct the value of MaxAtomicInlineWidth for pre-586 cpus
> >   https://github.com/llvm/llvm-project/commit/7339e61
> >   https://reviews.llvm.org/D59566
> > 
> > clang might call __atomic_is_lock_free to check whether the cpu can
> > cmpxchg8b.
> > 
> > 
> 
> or we make the baseline i586?

I'm OK with doing this.

databases/mariadb still fails though:

FAILED: unittest/strings/json-t 
: && /pobj/mariadb-10.5.4/bin/c++  -O2 -pipe  -I/usr/local/include 
-Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG 
-D_FORTIFY_SOURCE=2 -DDBUG_OFF  -L/usr/local/lib 
unittest/strings/CMakeFiles/json-t.dir/json-t.c.o
  -o unittest/strings/json-t -L/usr/lib   -L/usr/local/lib -lpthread  
unittest/mytap/libmytap.a  strings/libstrings.a  mysys/libmysys.a  
dbug/libdbug.a  strings/libstrings.a  mysys/libmysys.a  dbug/libdbug.a  -lz  
-lm  -lpthread  -Wl,-rpa
th-link,/usr/X11R6/lib && :
ld: error: undefined symbol: my_atomic_add32

devel/llvm has passed configure but to nobody's surprise is still building,
I'll send an update later.


> Index: gnu/llvm/clang/lib/Driver/ToolChains/Arch/X86.cpp
> ===================================================================
> RCS file: /cvs/src/gnu/llvm/clang/lib/Driver/ToolChains/Arch/X86.cpp,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 X86.cpp
> --- gnu/llvm/clang/lib/Driver/ToolChains/Arch/X86.cpp 3 Aug 2020 14:31:33 
> -0000       1.1.1.1
> +++ gnu/llvm/clang/lib/Driver/ToolChains/Arch/X86.cpp 5 Aug 2020 17:15:56 
> -0000
> @@ -95,9 +95,9 @@ const char *x86::getX86TargetCPU(const A
>    switch (Triple.getOS()) {
>    case llvm::Triple::FreeBSD:
>    case llvm::Triple::NetBSD:
> -  case llvm::Triple::OpenBSD:
>      return "i486";
>    case llvm::Triple::Haiku:
> +  case llvm::Triple::OpenBSD:
>      return "i586";
>    default:
>      // Fallback to p4.
> 

Reply via email to