Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit a765156

Browse files
author
Matthias Koeppe
committed
build/pkgs/openssl/spkg-install.in: If target of configured compiler is 32bit, build for 32bit
1 parent 5cb72aa commit a765156

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

build/pkgs/openssl/spkg-install.in

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
if [ -z "$SAGE_LOCAL" ]; then
2-
echo >&2 "SAGE_LOCAL undefined ... exiting"
3-
echo >&2 "Maybe run 'sage --sh'?"
4-
exit 1
5-
fi
6-
1+
# -*- shell-script -*-
72
cd src
83

94
# ./config picks up these environment variables if they are set, instead of using uname components
@@ -12,26 +7,24 @@ unset RELEASE
127
unset SYSTEM
138
unset BUILD
149

15-
# Building on OS X Lion 64-bit seems to fail unless we build a 64-bit library.
10+
extra_config_args=
11+
target=$($CC -dumpmachine 2> /dev/null)
1612
echo
17-
echo "Configuring openssl..."
18-
./config --prefix="$SAGE_LOCAL" --openssldir="$SAGE_LOCAL"/openssl shared
13+
echo "Configuring openssl for target reported by $CC -dumpmachine: $target"
14+
case "$target" in
15+
# Trac #31538: On 64 bit kernels running a 32 bit system, use the target of
16+
# the configured compiler
17+
i?86-linux-gnu)
18+
extra_config_args="linux-x86"
19+
;;
20+
esac
1921

20-
echo "Building openssl..."
21-
$MAKE
22-
23-
if [ $? -ne 0 ]; then
24-
echo >&2 "Error building openssl."
25-
exit 1
26-
fi
27-
echo
22+
./config --prefix="$SAGE_LOCAL" --openssldir="$SAGE_LOCAL"/openssl shared $extra_config_args
2823

2924

25+
echo "Building openssl..."
26+
$MAKE || sdh_die "Error building openssl."
3027

3128
echo "Installing openssl..."
3229
# installing the docs fails often, skip
33-
$MAKE install_sw
34-
if [ $? -ne 0 ]; then
35-
echo >&2 "Error installing openssl."
36-
exit 1
37-
fi
30+
$MAKE install_sw || sdh_die "Error installing openssl."

0 commit comments

Comments
 (0)