Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2020 15:54:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 230888] Missing 64 bit atomic functions for i386 (libatomic)
Message-ID:  <bug-230888-29464-UX1PtvX3qk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-230888-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-230888-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230888

Mikhail Teterin <mi@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mi@FreeBSD.org

--- Comment #21 from Mikhail Teterin <mi@FreeBSD.org> ---
(In reply to David Chisnall from comment #3)
> Is there a reason, given that LLVM's atomic.c is in contrib,
> that we don't just connect it to the libgcc_s build?

Based on David's suggestion, I did this:

--- lib/libcompiler_rt/Makefile.inc     (revision 359474)
+++ lib/libcompiler_rt/Makefile.inc     (working copy)
@@ -18,6 +18,7 @@
 SRCF+=3D         ashlti3
 SRCF+=3D         ashrdi3
 SRCF+=3D         ashrti3
+SRCF+=3D         atomic
 SRCF+=3D         clear_cache
 SRCF+=3D         clzdi2
 SRCF+=3D         clzsi2


rebuilt the world, and was then able to build lang/spidermonkey60 using the
base cc -- instead of dragging-in the gcc-suit:

--- Makefile    (revision 529979)
+++ Makefile    (working copy)
@@ -53,11 +53,6 @@
 CONFIGURE_TARGET=3Dx86_64-portbld-freebsd${OSREL}
 .endif

-.if ${ARCH} =3D=3D i386
-# ld: error: undefined symbol: __atomic_load
-USE_GCC=3D       9+
-.endif
-
 post-install:
        ${RM} ${STAGEDIR}${PREFIX}/lib/libjs_static.ajs
        ${LN} -fs libmozjs-${SP_VER}.so
${STAGEDIR}${PREFIX}/lib/libmozjs-${SP_VER}.so.1

Maybe, this should be done until an alternative is found?

The ticket is 1.5 years old and the "just build using gcc" is not a good
solution -- especially for those older (and slower) i386-systems we're
concerned about.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230888-29464-UX1PtvX3qk>