Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 833ab30

Browse files
committed
Fix stripping binaries from debugging symbols
1 parent 1c7c0dd commit 833ab30

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

env_vars.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@
22
OPENBLAS_VERSION="v0.3.7"
33
MACOSX_DEPLOYMENT_TARGET=10.9
44
CFLAGS="-std=c99 -fno-strict-aliasing"
5-
LDFLAGS="-Wl,--strip-debug"
5+
# Macos's linker doesn't support stripping symbols
6+
if [ [$(uname) != "Darwin"] ]; then
7+
LDFLAGS="-Wl,--strip-debug"
8+
# make sure that LDFLAGS is exposed to child processes,
9+
# since current version of manybuild only export CFLAGS, CPPFLAGS and FFLAGS
10+
export LDFLAGS="$LDFLAGS"
11+
# override the default stripping flags, since we only override CFLAGS and
12+
# the current version of manybuild pass "-strip-all" to CPPFLAGS and FFLAGS
13+
STRIP_FLAGS=""
14+
fi
15+

env_vars_32.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,14 @@ MACOSX_DEPLOYMENT_TARGET=10.9
77
# Causes failure for pre-1.19 in np.reciprocal
88
# CFLAGS="-msse2 -std=c99 -fno-strict-aliasing"
99
CFLAGS="-std=c99 -fno-strict-aliasing"
10-
LDFLAGS="-Wl,--strip-debug"
10+
# Macos's linker doesn't support stripping symbols
11+
if [ [$(uname) != "Darwin"] ]; then
12+
LDFLAGS="-Wl,--strip-debug"
13+
# make sure that LDFLAGS is exposed to child processes,
14+
# since current version of manybuild only export CFLAGS, CPPFLAGS and FFLAGS
15+
export LDFLAGS="$LDFLAGS"
16+
# override the default stripping flags, since we only override CFLAGS and
17+
# the current version of manybuild pass "-strip-all" to CPPFLAGS and FFLAGS
18+
STRIP_FLAGS=""
19+
fi
20+

0 commit comments

Comments
 (0)