summaryrefslogtreecommitdiff
path: root/net/krb5
diff options
context:
space:
mode:
authorSergey V. Lobanov <sergey@lobanov.in>2022-01-06 18:07:01 +0300
committerRosen Penev <rosenp@gmail.com>2022-01-09 13:43:48 -0800
commite660ac3398ccd76300d14aee80f5da9766cc8a85 (patch)
tree35b41b97ef944a2ed71dcfc54f8827c518452b0e /net/krb5
parent019501fe44edd788985d3abae80629763699542d (diff)
krb5: fix build on macos
backport of upstream commit https://github.com/krb5/krb5/commit/3c66c1fec7ce4edeff284a5e4abe32d0b4398539 Original author: Nikhil Benesch <nikhil.benesch@gmail.com> Remove unnecessary flag in macOS build The configuration logic for adding the `-search_paths_first` linker flag on Darwin does not correctly handle cross compilation. It should check the value of $krb5_cv_host rather than `uname -s` to detect when the compilation target is Darwin, rather than the build machine. It turns out `-search_paths_first` has been the default behavior of ld on macOS since XCode 4. So just remove that bit of logic entirely. (The flag was added in commit acd27af0e845f8b93de2e226cc2ec9ac8af52077 in 2004; XCode 4 was released in 2010.) Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
Diffstat (limited to 'net/krb5')
-rw-r--r--net/krb5/patches/002_remove_unnecessary_flag_in_macos_build.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/net/krb5/patches/002_remove_unnecessary_flag_in_macos_build.patch b/net/krb5/patches/002_remove_unnecessary_flag_in_macos_build.patch
new file mode 100644
index 000000000..55aa7ac1c
--- /dev/null
+++ b/net/krb5/patches/002_remove_unnecessary_flag_in_macos_build.patch
@@ -0,0 +1,44 @@
+commit 3c66c1fec7ce4edeff284a5e4abe32d0b4398539
+Author: Nikhil Benesch <nikhil.benesch@gmail.com>
+Date: Wed Dec 22 18:58:17 2021 -0500
+
+ Remove unnecessary flag in macOS build
+
+ The configuration logic for adding the `-search_paths_first` linker
+ flag on Darwin does not correctly handle cross compilation. It should
+ check the value of $krb5_cv_host rather than `uname -s` to detect when
+ the compilation target is Darwin, rather than the build machine.
+
+ It turns out `-search_paths_first` has been the default behavior of ld
+ on macOS since XCode 4. So just remove that bit of logic entirely.
+ (The flag was added in commit acd27af0e845f8b93de2e226cc2ec9ac8af52077
+ in 2004; XCode 4 was released in 2010.)
+
+ [ghudson@mit.edu: edited commit message]
+
+--- a/src/aclocal.m4
++++ b/src/aclocal.m4
+@@ -585,10 +585,6 @@ if test "$GCC" = yes ; then
+ CFLAGS="$CFLAGS -fno-common"
+ ;;
+ esac
+- case "$LD $LDFLAGS" in
+- *-Wl,-search_paths_first*) ;;
+- *) LDFLAGS="${LDFLAGS} -Wl,-search_paths_first" ;;
+- esac
+ fi
+ else
+ if test "`uname -s`" = AIX ; then
+--- a/src/configure
++++ b/src/configure
+@@ -4978,10 +4978,6 @@ $as_echo "$as_me: disabling the use of c
+ CFLAGS="$CFLAGS -fno-common"
+ ;;
+ esac
+- case "$LD $LDFLAGS" in
+- *-Wl,-search_paths_first*) ;;
+- *) LDFLAGS="${LDFLAGS} -Wl,-search_paths_first" ;;
+- esac
+ fi
+ else
+ if test "`uname -s`" = AIX ; then