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

Commit 11d6d89

Browse files
authored
Merge pull request #87 from seiko2plus/fix_strip
Fix stripping binaries from debugging symbols
2 parents 1c7c0dd + 1547c0d commit 11d6d89

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
@@ -1,5 +1,15 @@
1+
#!/usr/bin/env bash
12
# Environment variables for build
23
OPENBLAS_VERSION="v0.3.7"
34
MACOSX_DEPLOYMENT_TARGET=10.9
45
CFLAGS="-std=c99 -fno-strict-aliasing"
5-
LDFLAGS="-Wl,--strip-debug"
6+
# Macos's linker doesn't support stripping symbols
7+
if [ "$(uname)" != "Darwin" ]; then
8+
LDFLAGS="-Wl,--strip-debug"
9+
# make sure that LDFLAGS is exposed to child processes,
10+
# since current version of manybuild only export CFLAGS, CPPFLAGS and FFLAGS
11+
export LDFLAGS="$LDFLAGS"
12+
# override the default stripping flags, since we only override CFLAGS and
13+
# the current version of manybuild pass "-strip-all" to CPPFLAGS and FFLAGS
14+
STRIP_FLAGS=""
15+
fi

env_vars_32.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env bash
12
# Environment variables for 32-bit build.
23
# The important difference from the 64-bit build is `-msse2` to
34
# compile sse loops for ufuncs.
@@ -7,4 +8,13 @@ MACOSX_DEPLOYMENT_TARGET=10.9
78
# Causes failure for pre-1.19 in np.reciprocal
89
# CFLAGS="-msse2 -std=c99 -fno-strict-aliasing"
910
CFLAGS="-std=c99 -fno-strict-aliasing"
10-
LDFLAGS="-Wl,--strip-debug"
11+
# Macos's linker doesn't support stripping symbols
12+
if [ "$(uname)" != "Darwin" ]; then
13+
LDFLAGS="-Wl,--strip-debug"
14+
# make sure that LDFLAGS is exposed to child processes,
15+
# since current version of manybuild only export CFLAGS, CPPFLAGS and FFLAGS
16+
export LDFLAGS="$LDFLAGS"
17+
# override the default stripping flags, since we only override CFLAGS and
18+
# the current version of manybuild pass "-strip-all" to CPPFLAGS and FFLAGS
19+
STRIP_FLAGS=""
20+
fi

0 commit comments

Comments
 (0)