This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '3bb309944b7e8542b2ac88ed3c9d9a60e68644d7' of git://trac…
….sagemath.org/sage into t/29124/script-packages-prereq-toolchain-bootstrap
- Loading branch information
Showing
42 changed files
with
233 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# -*- shell-script -*- | ||
|
||
########################################################################### | ||
# | ||
# Determine environment variables according to configuration. | ||
# | ||
# NOTES: | ||
# - You must *source* this script instead of executing. | ||
# - Use "return" instead of "exit" to signal a failure. Since this | ||
# file is sourced, an "exit" here will actually exit src/bin/sage, | ||
# which is probably not intended. | ||
# - All environment variables set here should be *exported*, otherwise | ||
# they won't be available in child programs. | ||
# | ||
# If you want to set all environment variables for your shell like | ||
# they are during the build of Sage packages, type | ||
# | ||
# sage --buildsh | ||
# | ||
########################################################################## | ||
|
||
# Optimization flags. | ||
# | ||
# The compiler flags are set in order of priority by | ||
# 1) environment variables | ||
# 2) flags set at configuration time | ||
if [ "x$CFLAGS" == "x" ]; then | ||
export ORIGINAL_CFLAGS="$CONFIGURED_CFLAGS" | ||
else | ||
export ORIGINAL_CFLAGS="$CFLAGS" | ||
fi | ||
if [ "x$CXXFLAGS" == "x" ]; then | ||
export ORIGINAL_CXXFLAGS="$CONFIGURED_CXXFLAGS" | ||
else | ||
export ORIGINAL_CXXFLAGS="$CXXFLAGS" | ||
fi | ||
if [ "x$FCFLAGS" == "x" ]; then | ||
export ORIGINAL_FCFLAGS="$CONFIGURED_FCFLAGS" | ||
else | ||
export ORIGINAL_FCFLAGS="$FCFLAGS" | ||
fi | ||
if [ "x$F77FLAGS" == "x" ]; then | ||
export ORIGINAL_F77FLAGS="$CONFIGURED_F77FLAGS" | ||
else | ||
export ORIGINAL_F77FLAGS="$F77FLAGS" | ||
fi | ||
|
||
# We optimize according to $SAGE_DEBUG. | ||
if [ "x$ORIGINAL_CFLAGS" == "x" ]; then | ||
# Evaluate SAGE_DEBUG: | ||
if [ "x$SAGE_DEBUG" == "xyes" ]; then | ||
export CFLAGS="-Og -g" | ||
export CFLAGS_O3="-Og -g" | ||
elif [ "x$SAGE_DEBUG" == "xno" ]; then | ||
export CFLAGS="-O2" | ||
export CFLAGS_O3="-O3" | ||
else | ||
export CFLAGS="-O2 -g" | ||
export CFLAGS_O3="-O3 -g" | ||
fi | ||
else | ||
# Respect user environment variable. | ||
export CFLAGS="$ORIGINAL_CFLAGS" | ||
export CFLAGS_O3="$ORIGINAL_CFLAGS" | ||
fi | ||
|
||
# Copy to CXXFLAGS if this is not set. | ||
if [ "x$ORIGINAL_CXXFLAGS" == "x" ]; then | ||
export CXXFLAGS="$CFLAGS" | ||
export CXXFLAGS_O3="$CFLAGS_O3" | ||
else | ||
export CXXFLAGS="$ORIGINAL_CXXFLAGS" | ||
export CXXFLAGS_O3="$ORIGINAL_CXXFLAGS" | ||
fi | ||
|
||
# Copy CFLAGS to FCFLAGS if this is not set. | ||
if [ "x$ORIGINAL_FCFLAGS" == "x" ]; then | ||
export FCFLAGS="$CFLAGS" | ||
export FCFLAGS_O3="$CFLAGS_O3" | ||
else | ||
export FCFLAGS="$ORIGINAL_FCFLAGS" | ||
export FCFLAGS_O3="$ORIGINAL_FCFLAGS" | ||
fi | ||
|
||
# Copy FCFLAGS to F77FLAGS if this is not set. | ||
if [ "x$ORIGINAL_F77FLAGS" == "x" ]; then | ||
export F77FLAGS="$FCFLAGS" | ||
export F77FLAGS_O3="$FCFLAGS_O3" | ||
else | ||
export F77FLAGS="$ORIGINAL_F77FLAGS" | ||
export F77FLAGS_O3="$ORIGINAL_F77FLAGS" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
cd src | ||
|
||
if [ "$SAGE_DEBUG" = "yes" ]; then | ||
export CFLAGS="-O0 -g $CFLAGS" | ||
else | ||
export CFLAGS="-O2 -g $CFLAGS" | ||
fi | ||
|
||
$MAKE check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.