]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove unnecessary flag in macOS build 1233/head
authorNikhil Benesch <nikhil.benesch@gmail.com>
Wed, 22 Dec 2021 23:58:17 +0000 (18:58 -0500)
committerGreg Hudson <ghudson@mit.edu>
Wed, 29 Dec 2021 22:24:53 +0000 (17:24 -0500)
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]

src/aclocal.m4

index 0ea4d189305218d156e6c26bdb896958ca776d94..9920476f919671fb910f735a88b42b0b8e09ea2c 100644 (file)
@@ -595,10 +595,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