aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2020-08-11 16:46:27 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2020-08-11 16:46:27 +0000
commit1a18ab420b6098b92f3a16db68e482682a506688 (patch)
treec76172f197eafd91fd6de98f425c8431b1550fcb /Makefile.inc1
parentaa5dbc89530716be934372503a7132ef1c9962e2 (diff)
downloadsrc-1a18ab420b6098b92f3a16db68e482682a506688.tar.gz
src-1a18ab420b6098b92f3a16db68e482682a506688.zip
Allow overriding the tool used for stripping binaries
Since the make variable STRIP is already used for other purposes, this uses STRIPBIN (which is also used for the same purpose by install(1). This allows using LLVM objcopy to strip binaries instead of the in-tree elftoolchain objcopy. We make use of this in CheriBSD since passing binaries generated by our toolchain to elftoolchain strip sometimes results in assertion failures. This allows working around https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248516 by specifying STRIPBIN=/path/to/llvm-strip Obtained from: CheriBSD Reviewed By: emaste, brooks Differential Revision: https://reviews.freebsd.org/D25988
Notes
Notes: svn path=/head/; revision=364119
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc14
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 313adf85cb92..f85f0326da25 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -180,7 +180,7 @@ MK_SYSTEM_LINKER= no
.if defined(CROSS_TOOLCHAIN_PREFIX)
CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX}
.endif
-XBINUTILS= AS AR LD NM OBJCOPY RANLIB SIZE STRINGS
+XBINUTILS= AS AR LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN
.for BINUTIL in ${XBINUTILS}
.if defined(CROSS_BINUTILS_PREFIX) && \
exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}})
@@ -755,7 +755,7 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCXXFLAGS} ${XCFLAGS}" \
AS="${XAS}" AR="${XAR}" LD="${XLD}" LLVM_LINK="${XLLVM_LINK}" \
NM=${XNM} OBJCOPY="${XOBJCOPY}" \
RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \
- SIZE="${XSIZE}"
+ SIZE="${XSIZE}" STRIPBIN="${XSTRIPBIN}"
.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX})
# In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a