Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2025 06:08:09 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e0c79f13d755 - stable/13 - Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):"
Message-ID:  <69269949.f4f9.7140792c@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=e0c79f13d755c480ff6c3ca1f5c78ed1c04db400

commit e0c79f13d755c480ff6c3ca1f5c78ed1c04db400
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-11-23 15:52:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2025-11-26 06:06:40 +0000

    Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):"
    
        [Driver] Enable outline atomics for FreeBSD/aarch64 (#156089)
    
    The compiler_rt helper functions have been built since 12.4, 13.1, 14
    and anything newer.
    
    This reverts commit bd27bd1f51d049538cc7a0053be9d99110a53ae1.
    
    Only some people (including the release manager, unfortunately) ran into
    build issues with the previous iteration of this commit, because they
    were bootstrapping the compiler, either via the WITHOUT_SYSTEM_COMPILER
    src.conf(5) setting, or because the build system determined that their
    base system compiler was out of date.
    
    The bootstrapped compiler would then enable outline atomics and compile
    libgcc_s with these, but because libgcc_s is linked with -nodefaultlibs,
    it could not find the helper routines in libcompiler_rt.a.
    
    In contrast, people who did not bootstrap the compiler never saw any
    issues, because libgcc_s was built using their 'old' base system
    compiler, and so libgcc_s would not contain any calls to those helper
    routines.
    
    Fix this by ensuring that libgcc_s is linked against libcompiler_rt.a
    explicitly, similar to some other binaries and libraries that are built
    with -nodefaultlibs.
    
    Also, bump FREEBSD_CC_VERSION to ensure that everybody gets the updated
    compiler with outline atomics enabled. (This should have been done in
    the first iteration of this commit, because the error would have shown
    up right away then.)
    
    MFC after:      3 days
    
    (cherry picked from commit 3289bace53f31545976fec310b41fa784de75e64)
---
 contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h | 5 +++++
 lib/clang/freebsd_cc_version.h                             | 2 +-
 lib/libgcc_s/Makefile                                      | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h
index 7ab63905ed4f..7d090ba682b3 100644
--- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h
+++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h
@@ -78,6 +78,11 @@ public:
   void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs,
                          llvm::opt::ArgStringList &CC1Args) const override;
 
+  bool IsAArch64OutlineAtomicsDefault(
+      const llvm::opt::ArgList &Args) const override {
+    return true;
+  }
+
   UnwindTableLevel
   getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override;
   bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
diff --git a/lib/clang/freebsd_cc_version.h b/lib/clang/freebsd_cc_version.h
index 758b8295d012..33f11e855524 100644
--- a/lib/clang/freebsd_cc_version.h
+++ b/lib/clang/freebsd_cc_version.h
@@ -1 +1 @@
-#define	FREEBSD_CC_VERSION		1300013
+#define	FREEBSD_CC_VERSION		1300014
diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile
index 62c69cec4901..ecd9c4511247 100644
--- a/lib/libgcc_s/Makefile
+++ b/lib/libgcc_s/Makefile
@@ -9,7 +9,9 @@ MK_SSP=		no
 WARNS?=	2
 
 LDFLAGS+=	-nodefaultlibs
+LDFLAGS+=	-Wl,-Bsymbolic
 LIBADD+=	c
+LIBADD+=	compiler_rt
 
 VERSION_DEF=	${.CURDIR}/Versions.def
 SYMBOL_MAPS=	${.CURDIR}/Symbol.map


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69269949.f4f9.7140792c>