-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --no-as-needed, --export-dynamic
This makes dynamic libraries work on Linux arm64! Thanks to Lukáš Zaoral at Red Hat for finding the key to the fix, which is passing --no-as-needed to the linker on Linux to avoid glibc interfering with libast in identically named functions like AST regcomp(3). Linux systems vary as to whether --as-needed is on by default. src/cmd/INIT/make.probe: - Add probe for the --as-needed and --no-as-needed linker options. Thanks to Johnothan King. **/Mamfile: - Use the --no-as-needed probe result (either -Wl,-no-as-needed or empty) from ${mam_cc_LD_NOASNEEDED} whenever linking anything; add it to LDFLAGS before invoking dylink. - ksh and shcomp also need the results of the existing --export-dynamic probe; this option is needed on Linux as without it ksh fails to export symbols to loadable builtins. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821806 Thanks to Johnothan King, again. src/cmd/INIT/mamprobe.sh: - Update version number. This change causes mamake to redo the probe (it checks for a change in mamprobe but not in make.probe; I should probably fix that at some point). We need mamake to redo the probe for the --no-as-needed addition to take effect. src/lib/libast/comp/errno.c: - Make one trivial change (copyright year) to force libast to relink -- which then triggers a relink of everything else. src/cmd/INIT/dylink.sh: - Remove crash warning for Linux arm. :-) Co-authored-by: Johnothan King <johnothanking@protonmail.com> Co-authored-by: Lukáš Zaoral <lzaoral@redhat.com>
- Loading branch information
1 parent
af10d5a
commit 0fdbcdc
Showing
10 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters