Differences From Artifact [7b1ee0452b]:
- File
aclocal/dc_versionscript.m4
— part of check-in
[521abe23e2]
at
2011-09-08 03:01:24
on branch trunk
— CACKey 0.6.4
Moved determining how to weaken and strip symbols into an autoconf macro
Added support for stripping symbols to Mac OS X builds (user: rkeene, size: 1146) [annotate] [blame] [check-ins using]
To Artifact [4ebe0b5820]:
- File aclocal/dc_versionscript.m4 — part of check-in [fa022cbc5d] at 2011-09-08 03:42:02 on branch trunk — More work towards getting Mac OS X to export only the symbols we care about (user: rkeene, size: 1434) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 | AC_DEFUN(DC_SETVERSIONSCRIPT, [ VERSIONSCRIPT="$1" SAVE_LDFLAGS="${LDFLAGS}" AC_MSG_CHECKING([for how to set version script]) | > > > > > > > > | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | AC_DEFUN(DC_SETVERSIONSCRIPT, [ VERSIONSCRIPT="$1" SYMFILE="$2" delete_symfile='0' if test ! -f "${SYMFILE}"; then delete_symfile='1' echo '' > "${SYMFILE}" fi SAVE_LDFLAGS="${LDFLAGS}" AC_MSG_CHECKING([for how to set version script]) for tryaddldflags in "-Wl,--version-script -Wl,${VERSIONSCRIPT}" "-Wl,-exported_symbols_list -Wl,${SYMFILE}"; do LDFLAGS="${SAVE_LDFLAGS} ${tryaddldflags}" AC_TRY_LINK([], [], [ addldflags="${tryaddldflags}" break ]) done if test "${delete_symfile}" = "1"; then rm -f "${SYMFILE}" fi if test -n "${addldflags}"; then LDFLAGS="${SAVE_LDFLAGS} ${addldflags}" AC_MSG_RESULT($addldflags) else LDFLAGS="${SAVE_LDFLAGS}" AC_MSG_RESULT([don't know]) |
︙ | ︙ | |||
32 33 34 35 36 37 38 39 40 41 | if test "x${STRIP}" = "xfalse"; then STRIP="${OBJCOPY}" fi WEAKENSYMS='true' REMOVESYMS='true' case $host_os in darwin*) | > | > > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | if test "x${STRIP}" = "xfalse"; then STRIP="${OBJCOPY}" fi WEAKENSYMS='true' REMOVESYMS='true' SYMPREFIX='' case $host_os in darwin*) REMOVESYMS="${STRIP} -i -u -s ${SYMFILE}" SYMPREFIX="_" ;; *) if test "x${OBJCOPY}" != "xfalse"; then WEAKENSYMS="${OBJCOPY} --keep-global-symbols=${SYMFILE}" REMOVESYMS="${OBJCOPY} --discard-all" elif test "x${STRIP}" != "xfalse"; then REMOVESYMS="${STRIP} -x" fi ;; esac AC_SUBST(WEAKENSYMS) AC_SUBST(REMOVESYMS) AC_SUBST(SYMPREFIX) ]) |