Skip to content

Commit 1a9aa8d

Browse files
committed
build: better scope usage of -Wl,-headerpad_max_install_names
If we aren't using install_name_tool when cross-compiling, we don't need to test for / add it to LDFLAGS when that is the case.
1 parent 3bee514 commit 1a9aa8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,9 @@ case $host in
696696
TARGET_OS=darwin
697697
if test $cross_compiling != "yes"; then
698698
BUILD_OS=darwin
699+
700+
AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [$LDFLAG_WERROR])
701+
699702
AC_CHECK_PROG([BREW], [brew], [brew])
700703
if test "$BREW" = "brew"; then
701704
dnl These Homebrew packages may be keg-only, meaning that they won't be found
@@ -771,7 +774,6 @@ case $host in
771774
esac
772775
fi
773776

774-
AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [$LDFLAG_WERROR])
775777
CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
776778

777779
dnl ignore deprecated-declarations warnings coming from objcxx code

0 commit comments

Comments
 (0)