Skip to content

Commit e53191c

Browse files
committed
external_deps: use the same STRIP everytime we need to strip something
1 parent 424b884 commit e53191c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

external_deps/build.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ build_glew() {
507507
# manually re-add the required flags there.
508508
case "${PLATFORM}" in
509509
windows-*-*)
510-
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${HOST}-strip" LD="${LD}"
511-
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make install SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${HOST}-strip" LD="${LD}"
510+
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${STRIP}" LD="${LD}"
511+
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make install SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${STRIP}" LD="${LD}"
512512
mv "${PREFIX}/lib/glew32.dll" "${PREFIX}/bin/"
513513
rm "${PREFIX}/lib/libglew32.a"
514514
cp lib/libglew32.dll.a "${PREFIX}/lib/"
@@ -519,8 +519,7 @@ build_glew() {
519519
install_name_tool -id "@rpath/libGLEW.${GLEW_VERSION}.dylib" "${PREFIX}/lib/libGLEW.${GLEW_VERSION}.dylib"
520520
;;
521521
linux-*-*)
522-
local strip="${HOST/-unknown-/-}-strip"
523-
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" STRIP="${strip}"
522+
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" STRIP="${STRIP}"
524523
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make install GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" LIBDIR="${PREFIX}/lib"
525524
;;
526525
*)
@@ -867,9 +866,8 @@ build_ncurses() {
867866
# Brutally disable writing to database
868867
cp /dev/null misc/run_tic.in
869868
# Configure terminfo search dirs based on the ones used in Debian. By default it will only look in (only) the install directory.
870-
local strip="${HOST/-unknown-/-}-strip"
871869
configure_build \
872-
--with-strip-program="${strip}" \
870+
--with-strip-program="${STRIP}" \
873871
--without-progs \
874872
--enable-widec \
875873
--with-terminfo-dirs=/etc/terminfo:/lib/terminfo \
@@ -1187,11 +1185,11 @@ build_install() {
11871185
# Strip libraries
11881186
case "${PLATFORM}" in
11891187
windows-*-mingw)
1190-
find "${PKG_PREFIX}/bin" -name '*.dll' -execdir "${HOST}-strip" --strip-unneeded -- {} \;
1191-
find "${PKG_PREFIX}/lib" -name '*.a' -execdir "${HOST}-strip" --strip-unneeded -- {} \;
1188+
find "${PKG_PREFIX}/bin" -name '*.dll' -execdir "${STRIP}" --strip-unneeded -- {} \;
1189+
find "${PKG_PREFIX}/lib" -name '*.a' -execdir "${STRIP}" --strip-unneeded -- {} \;
11921190
;;
11931191
windows-*-msvc)
1194-
find "${PKG_PREFIX}/bin" -name '*.dll' -execdir "${HOST}-strip" --strip-unneeded -- {} \;
1192+
find "${PKG_PREFIX}/bin" -name '*.dll' -execdir "${STRIP}" --strip-unneeded -- {} \;
11951193
find "${PKG_PREFIX}/lib" -name '*.a' -execdir rm -f -- {} \;
11961194
find "${PKG_PREFIX}/lib" -name '*.exp' -execdir rm -f -- {} \;
11971195

@@ -1203,11 +1201,10 @@ build_install() {
12031201
find "${PKG_PREFIX}/lib" -name '*.so.*' -execdir rm -f -- {} \;
12041202
find "${PKG_PREFIX}/lib" -name '*_g.a' -execdir rm -f -- {} \;
12051203

1206-
local strip="${HOST/-unknown-/-}-strip"
1207-
find "${PKG_PREFIX}/lib" -name '*.a' -execdir "${strip}" --strip-unneeded -- {} \;
1204+
find "${PKG_PREFIX}/lib" -name '*.a' -execdir "${STRIP}" --strip-unneeded -- {} \;
12081205
;;
12091206
macos-*-*)
1210-
find "${PKG_PREFIX}/lib" -name '*.a' -execdir strip -u {} \;
1207+
find "${PKG_PREFIX}/lib" -name '*.a' -execdir "${STRIP}" -u {} \;
12111208
esac
12121209

12131210
case "${PLATFORM}" in
@@ -1263,7 +1260,7 @@ common_setup() {
12631260
mkdir -p "${PREFIX}/include"
12641261
mkdir -p "${PREFIX}/lib"
12651262

1266-
export CC CXX LD AR RANLIB PKG_CONFIG PKG_CONFIG_PATH PATH CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
1263+
export CC CXX LD AR RANLIB STRIP PKG_CONFIG PKG_CONFIG_PATH PATH CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
12671264
}
12681265

12691266
common_setup_arch() {
@@ -1299,6 +1296,7 @@ common_setup_arch() {
12991296
# the Windows build of Lua is only used in developer gamelogic builds, and Microsoft
13001297
# supports %lld since Visual Studio 2013. Also we don't build Lua anymore.
13011298
common_setup_windows() {
1299+
STRIP="${HOST}-strip"
13021300
LD="${HOST}-ld"
13031301
AR="${HOST}-ar"
13041302
RANLIB="${HOST}-ranlib"
@@ -1324,6 +1322,7 @@ common_setup_mingw() {
13241322
common_setup_macos() {
13251323
CC='clang'
13261324
CXX='clang++'
1325+
STRIP='strip'
13271326
CFLAGS+=" -arch ${MACOS_ARCH}"
13281327
CXXFLAGS+=" -arch ${MACOS_ARCH}"
13291328
LDFLAGS+=" -arch ${MACOS_ARCH}"
@@ -1333,6 +1332,7 @@ common_setup_macos() {
13331332
common_setup_linux() {
13341333
CC="${HOST/-unknown-/-}-gcc"
13351334
CXX="${HOST/-unknown-/-}-g++"
1335+
STRIP="${HOST/-unknown-/-}-strip"
13361336
CFLAGS+=' -fPIC'
13371337
CXXFLAGS+=' -fPIC'
13381338
}

0 commit comments

Comments
 (0)