Skip to content

Commit 9afc465

Browse files
committed
Enable multiple definitions
1 parent 5bb367c commit 9afc465

File tree

1 file changed

+9
-14
lines changed
  • recipes/recipes_emscripten/octave

1 file changed

+9
-14
lines changed

recipes/recipes_emscripten/octave/build.sh

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
export FLIBS="-lFortranRuntime"
2-
export FFLAGS="${FFLAGS} --target=wasm32-unknown-emscripten"
3-
export CFLAGS="${CFLAGS} --target=wasm32-unknown-emscripten"
4-
export CXXFLAGS="${CXXFLAGS} --target=wasm32-unknown-emscripten"
5-
6-
# Octave overrides xerbla
7-
llvm-objcopy --strip-symbol=xerbla_ "${PREFIX}/lib/liblapack.a"
8-
# Blas should not define the following symbols
9-
llvm-objcopy \
10-
--strip-symbol=lsame_ \
11-
--strip-symbol=xerbla_ \
12-
--strip-symbol=xerbla_array_ \
13-
"${PREFIX}/lib/libblas.a"
14-
151
# flang-new does not support emscripten flags.
162
#
173
# Future solution when flang is more mature:
@@ -34,6 +20,15 @@ export F77="${PWD}/flang-new-wrap"
3420
# Remove spaces in `-s OPTION` from emscripten to avoid confusion in flang
3521
export LDFLAGS="$(echo "${LDFLAGS}" | sed -E 's/-s +/-s/g')"
3622

23+
export FLIBS="-lFortranRuntime"
24+
export FFLAGS="${FFLAGS} --target=wasm32-unknown-emscripten"
25+
export CFLAGS="${CFLAGS} --target=wasm32-unknown-emscripten"
26+
export CXXFLAGS="${CXXFLAGS} --target=wasm32-unknown-emscripten"
27+
28+
# Octave overrides xerbla from Lapack.
29+
# Both Blas and Lapack define xerbla zerbla_array lsame.
30+
export LDFLAGS="${LDFLAGS} -Wl,--allow-multiple-definition"
31+
3732
# Force disable pthread
3833
sed -i 's/ax_pthread_ok=yes/ax_pthread_ok=no/' configure
3934
export ac_cv_header_pthread_h=no

0 commit comments

Comments
 (0)