Skip to content

Commit

Permalink
doc: Better explain GNU ld's dislike of ld64's options
Browse files Browse the repository at this point in the history
There's also now more than a single option being special cased for
darwin.
  • Loading branch information
fanquake committed Apr 27, 2020
1 parent eef90c1 commit cd24f37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,9 @@ if test x$use_hardening != xno; then
esac
fi

dnl this flag screws up non-darwin gcc even when the check fails. special-case it.
dnl These flags are specific to ld64, and may cause issues with other linkers.
dnl For example: GNU ld will intepret -dead_strip as -de and then try and use
dnl "ad_strip" as the symbol for the entry point.
if test x$TARGET_OS = xdarwin; then
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"])
Expand Down

0 comments on commit cd24f37

Please sign in to comment.