Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2024 14:48:44 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6edb14c006f6 - main - Make WITHOUT_UNDEFINED_VERSION the default
Message-ID:  <202405201448.44KEmio6066204@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

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

commit 6edb14c006f6eafe1f31f54ce7fe2158321fa18d
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-05-02 17:13:39 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-05-20 14:40:19 +0000

    Make WITHOUT_UNDEFINED_VERSION the default
    
    Link with --no-undefined-version by default.  Will detect and prevent
    the accidental removal of symbols from versioned libraries.
    
    (cherry picked from commit 4510f2ca9170927309a423274e03f1eb8e27da27)
    This reverts commit b25ceb97eddcd58cfb2b433fe301ab28c678c249.
    
    Reviewed by:    arichardson, kib, dim, emaste
    Differential Revision:  https://reviews.freebsd.org/D44216
---
 share/man/man5/src.conf.5                     | 8 +++++---
 share/mk/bsd.opts.mk                          | 4 ++--
 tools/build/options/WITHOUT_UNDEFINED_VERSION | 2 --
 tools/build/options/WITH_UNDEFINED_VERSION    | 4 ++++
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index f3e45ca8a661..12f78e20085a 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1719,9 +1719,11 @@ and that the runtime support library is available
 Do not build
 .Xr unbound 8
 and related programs.
-.It Va WITHOUT_UNDEFINED_VERSION
-Link libraries with --no-undefined-version to ensure all symbols are
-provided.
+.It Va WITH_UNDEFINED_VERSION
+Link libraries with --undefined-version which permits version maps to
+contain symbols that are not present in the library.
+If this is necessicary to build a particular configuration, a bug is
+present and the configuration should be reported.
 .It Va WITHOUT_UNIFIED_OBJDIR
 Use the historical object directory format for
 .Xr build 7
diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk
index 38d53cc6bf30..65ae4f4cfa7c 100644
--- a/share/mk/bsd.opts.mk
+++ b/share/mk/bsd.opts.mk
@@ -68,7 +68,6 @@ __DEFAULT_YES_OPTIONS = \
     SSP \
     TESTS \
     TOOLCHAIN \
-    UNDEFINED_VERSION \
     WARNS \
     WERROR
 
@@ -81,7 +80,8 @@ __DEFAULT_NO_OPTIONS = \
     PROFILE \
     RETPOLINE \
     STALE_STAGED \
-    UBSAN
+    UBSAN \
+    UNDEFINED_VERSION
 
 __DEFAULT_DEPENDENT_OPTIONS = \
     MAKE_CHECK_USE_SANDBOX/TESTS \
diff --git a/tools/build/options/WITHOUT_UNDEFINED_VERSION b/tools/build/options/WITHOUT_UNDEFINED_VERSION
deleted file mode 100644
index 0e58eb00f3c1..000000000000
--- a/tools/build/options/WITHOUT_UNDEFINED_VERSION
+++ /dev/null
@@ -1,2 +0,0 @@
-Link libraries with --no-undefined-version to ensure all symbols are
-provided.
diff --git a/tools/build/options/WITH_UNDEFINED_VERSION b/tools/build/options/WITH_UNDEFINED_VERSION
new file mode 100644
index 000000000000..71b048349a6f
--- /dev/null
+++ b/tools/build/options/WITH_UNDEFINED_VERSION
@@ -0,0 +1,4 @@
+Link libraries with --undefined-version which permits version maps to
+contain symbols that are not present in the library.
+If this is necessicary to build a particular configuration, a bug is
+present and the configuration should be reported.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405201448.44KEmio6066204>