Skip to content

Commit

Permalink
sagemathgh-36915: configure.ac: Remove tests for outdated platforms
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Likewise for some configuration tests in some `spkg-configure.m4` and
`spkg-install` scripts.

Cygwin, AIX, Solaris, ancient OS X, etc.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36915
Reported by: Matthias Köppe
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Matthias Köppe
  • Loading branch information
Release Manager committed Feb 7, 2024
2 parents b671b28 + e0548a0 commit 8000a33
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 648 deletions.
136 changes: 0 additions & 136 deletions build/bin/testcc.sh

This file was deleted.

129 changes: 0 additions & 129 deletions build/bin/testcxx.sh

This file was deleted.

6 changes: 0 additions & 6 deletions build/pkgs/gfortran/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,4 @@ SAGE_SPKG_CONFIGURE([gfortran], [
])
])
fi
AS_CASE([$host],
[*-*-cygwin*], [AS_VAR_IF([sage_spkg_install_gfortran], [yes], [
AS_VAR_APPEND([SAGE_SPKG_ERRORS], ["
On Cygwin, gfortran must be installed as a system package. This is an error."])
])
])
])
49 changes: 0 additions & 49 deletions build/pkgs/gmp/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,6 @@ fi


case "$UNAME" in
SunOS)
true;; # Auto-detect ABI
Darwin)
# In some cases (see SAGE_ROOT/spkg/bin/sage-env), on Darwin,
# CC might be set to clang, but GMP doesn't seem to build
# with clang.
CLANG=`command -v clang`
GCC=`command -v gcc`
if [ -n "$CC" ] && [ "$CC" = "$CLANG" ] && [ -n "$GCC" ] ; then
export CC="$GCC"
fi
# Do not set ABI=32 on MacOS X 10.6 (Darwin 10) and later, since
# there everything defaults to 64-bit:
if [ "`uname -r | sed 's/\..*//'`" -lt 10 ]; then
# Assume MacOS X 10.4 or 10.5 (Darwin 8 or 9); also, PPC CPUs
# are only supported by these, not later versions.
echo "Building a 32-bit version of GMP, which is the only supported option."
ABI=32
case "`uname -m`" in
ppc|ppc64|[Pp]ower*) # Apple's 'uname' returns strange strings
# The Darwin assembler rejects code using an
# extended instruction set by default (cf. #8664):
required_cflags="$required_cflags -Wa,-force_cpusubtype_ALL"
;;
esac
else
# Darwin 10 (MacOS X 10.6) or later.
# We don't have to set ABI here.
echo "Building a 64-bit version of GMP, which is the default."
fi
;; # Darwin
Linux)
# GMP fails to build on 32-bit operating systems running on
# 64-bit CPUs if CFLAGS happen to contain '-m32' and ABI is
Expand Down Expand Up @@ -92,26 +61,8 @@ case "$UNAME" in
rm -f foo foo.c
fi
;; # Linux
*) # e.g. AIX or HP-UX
echo >&2 "Warning: Your platform ($UNAME) isn't yet explicitly supported" \
"by this GMP spkg, i.e., by Sage's part of it."
esac

# Work around a bug in GCC 4.7.0 which breaks the build on Itanium CPUs.
# See #12765, #12751, and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496
if [ "`uname -m`" = ia64 ] && [ "`testcc.sh $CC`" = GCC ] ; then
gcc_version=`$CC -dumpversion`
case "$gcc_version" in
4.7.0)
required_cflags="$required_cflags -O0 -finline-functions -fschedule-insns"
echo >&2 "Warning: Disabling almost all optimization due to a bug in GCC 4.7.0"
echo >&2 " on Itanium, which otherwise would break the build."
echo >&2 " See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496"
echo >&2 " for current status and further details."
;;
esac
fi

export ABI CFLAGS CXXFLAGS LDFLAGS # Partially redundant, but safe(r).
# We don't export CPPFLAGS here, since we don't (have to) modify them.

Expand Down
3 changes: 0 additions & 3 deletions build/pkgs/lie/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ die () {
cd src

chmod -R a+rX .
if [ $UNAME = "SunOS" ]; then
sage-apply-patches -d solaris || die "Error patching LiE."
fi

# Building LiE in parallel is broken
export MAKE="$MAKE -j1"
Expand Down
11 changes: 1 addition & 10 deletions build/pkgs/m4ri/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
CFLAGS="$CFLAGS -I$SAGE_LOCAL/include -g"

COMPILER=`testcc.sh $CC`

if [ "$COMPILER" = "GCC" ] ; then
CFLAGS="$CFLAGS -fPIC -Wall -pedantic"
elif [ "$COMPILER" = "Sun_Studio" ] ; then
CFLAGS="$CFLAGS -Kpic"
elif [ "$COMPILER" = "HP_on_HP-UX" ] ; then
CFLAGS="$CFLAGS + z"
fi
CFLAGS="$CFLAGS -fPIC -Wall -pedantic"

if [ "x$SAGE_DEBUG" = "xyes" ]; then
ENABLE_DEBUG="--enable-debug"
Expand Down
9 changes: 1 addition & 8 deletions build/pkgs/m4rie/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ ROOT_DIR="`pwd`"
INCLUDES="-I$SAGE_LOCAL/include"
LIBDIRS="-L$SAGE_LOCAL/lib"

CFLAGS="`testcflags.sh -fPIC -Wall -pedantic -g` $CFLAGS $INCLUDES"
CFLAGS="-fPIC -Wall -pedantic -g $CFLAGS $INCLUDES"
LDFLAGS="$LIBDIRS $LDFLAGS"

COMPILER=`testcc.sh $CC`
if [ "$COMPILER" = "Sun_Studio" ] ; then
CFLAGS="$CFLAGS -Kpic"
elif [ "$COMPILER" = "HP_on_HP-UX" ] ; then
CFLAGS="$CFLAGS + z"
fi

CPPFLAGS="$INCLUDES"

if [ "x$SAGE_DEBUG" = "xyes" ]; then
Expand Down
Loading

0 comments on commit 8000a33

Please sign in to comment.