Skip to content

Commit

Permalink
sagemathgh-38087: Still add rpath to our own libstdc++, in case we bu…
Browse files Browse the repository at this point in the history
…ilt our own toolchain

The GMP configure test should link against our own libstdc++ instead of
the (too old) system libstdc++

Fixes sagemath#38085

URL: sagemath#38087
Reported by: Volker Braun
Reviewer(s):
  • Loading branch information
Release Manager committed May 26, 2024
2 parents 646c25c + 2ba6a8d commit 90ecf37
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=605eb62e991cc1216d9590f2de779b00c4b7c98a
sha256=b1cc158f4a15f8d0aebf9253b706a1b0797561ed27f30cce725ec5e216dd004e
sha1=cd591331e799bec71cacd6130f8bbfbfe8bec061
sha256=7d915cc7ac39f43da4f2c9da68de0ccf29b0c142f4f6bba12529967e294f646c
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
266b7569daa9d9be93e06f83e5d1eda01536f0bd
a3e5895b20f7c558ae0deede673a72cf84c814d3
10 changes: 8 additions & 2 deletions build/pkgs/gmp/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,16 @@ if [ "$SAGE_FAT_BINARY" = "yes" ]; then
esac
fi

# Make configure tests use our own libstdc++ if it is available
# See https://github.com/sagemath/sage/issues/38085
CXXFLAGS_CONFIGURE="-Wl,-rpath -Wl,$SAGE_LOCAL/lib"

# Pre-configure GMP to get the settings it would use if CFLAGS were empty:
echo "Checking what CFLAGS GMP would use if they were empty..."
(unset CFLAGS CPPFLAGS CXXFLAGS && ./configure $GMP_CONFIGURE) &>configure-empty.log
(
unset CFLAGS CPPFLAGS CXXFLAGS &&
CXXFLAGS=$CXXFLAGS_CONFIGURE ./configure $GMP_CONFIGURE
) &>configure-empty.log
if [ $? -ne 0 ]; then
# Output the log of the failed configure run
cat configure-empty.log
Expand Down Expand Up @@ -163,7 +169,7 @@ echo "You can set GMP_CONFIGURE to pass additional parameters."
# Clear the cache of the previous configure run
find . -name config.cache -exec rm -f {} \;

./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" $GMP_CONFIGURE
CXXFLAGS=$CXXFLAGS_CONFIGURE ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" $GMP_CONFIGURE
if [ $? -ne 0 ]; then
echo >&2 "Error configuring GMP. (See above for the options passed to it.)"
exit 1
Expand Down

0 comments on commit 90ecf37

Please sign in to comment.