mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
Rationalize the makeGcc scripts
Now the gcc-VERSION option is required
This commit is contained in:
31
makeGcc
31
makeGcc
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -26,19 +26,16 @@
|
||||
# makeGcc
|
||||
#
|
||||
# Description
|
||||
# Build script for gmp, mpfr and gcc
|
||||
#
|
||||
# Note
|
||||
# gcc 4.3.2 is known to miscompile GMP 4.3.x on 64-bit machines
|
||||
# Build script for gmp, mpfr and gcc-[4-9].?.?
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
gmpPACKAGE=gmp-5.0.4
|
||||
mpfrPACKAGE=mpfr-3.1.0
|
||||
mpcPACKAGE=mpc-0.9
|
||||
gccPACKAGE=gcc-4.6.2
|
||||
gmpPACKAGE=gmp-5.1.2
|
||||
mpfrPACKAGE=mpfr-3.1.2
|
||||
mpcPACKAGE=mpc-1.0.1
|
||||
gccPACKAGE=
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# run from third-party directory only
|
||||
# Run from third-party directory only
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
@ -53,7 +50,7 @@ usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] [gcc-VERSION]
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] <gcc-VERSION>
|
||||
|
||||
* build combinations of gmp, mpfr, mpc and gcc
|
||||
$gmpPACKAGE
|
||||
@ -66,7 +63,7 @@ USAGE
|
||||
}
|
||||
|
||||
|
||||
# parse options
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
@ -95,8 +92,14 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$gccPACKAGE" ]
|
||||
then
|
||||
usage "Please specify gcc-VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set 32 or 64 bit ABI
|
||||
|
||||
# Set 32 or 64 bit ABI
|
||||
case "$WM_ARCH_OPTION" in
|
||||
32 | 64)
|
||||
ABI=$WM_ARCH_OPTION
|
||||
@ -108,7 +111,7 @@ esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build/install without compiler name
|
||||
# Build/install without compiler name
|
||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
|
||||
288
makeGcc45
288
makeGcc45
@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeGcc45
|
||||
#
|
||||
# Description
|
||||
# Build script for gmp, mpfr and gcc-4.5.?
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
gmpPACKAGE=gmp-5.1.2
|
||||
mpfrPACKAGE=mpfr-3.1.2
|
||||
mpcPACKAGE=mpc-1.0.1
|
||||
gccPACKAGE=gcc-4.5.4
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# run from third-party directory only
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] [gcc-VERSION]
|
||||
|
||||
* build combinations of gmp, mpfr, mpc and gcc
|
||||
$gmpPACKAGE
|
||||
$mpfrPACKAGE
|
||||
$mpcPACKAGE
|
||||
$gccPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
gmp-[4-9]*)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpfr-[2-9]*)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpc-[0-9]*)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
gcc-[4-9]*)
|
||||
gccPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# set 32 or 64 bit ABI
|
||||
case "$WM_ARCH_OPTION" in
|
||||
32 | 64)
|
||||
ABI=$WM_ARCH_OPTION
|
||||
;;
|
||||
*)
|
||||
usage "Please set WM_ARCH_OPTION to either 32 or 64'$*'"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build/install without compiler name
|
||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
GCC_ARCH_PATH=$installBASE/$gccPACKAGE
|
||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
||||
|
||||
# mpc is not needed for gcc older than 4.5
|
||||
case "$gccPACKAGE" in
|
||||
gcc-4.[0-4].*)
|
||||
mpcPACKAGE=false
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Build GMP
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GMP_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gmpPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gmpPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE
|
||||
buildDIR=$buildBASE/$gmpPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$GMP_ARCH_PATH \
|
||||
--enable-cxx \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gmpPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gmpPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build MPFR
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPFR_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpfrPACKAGE"
|
||||
else
|
||||
echo "Starting build: $mpfrPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE
|
||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPFR_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpfrPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpfrPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build mpc
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpcPACKAGE"
|
||||
elif [ "$mpcPACKAGE" = false ]
|
||||
then
|
||||
echo "Skip building mpc - not needed for older gcc versions"
|
||||
else
|
||||
echo "Starting build: $mpcPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE
|
||||
buildDIR=$buildBASE/$mpcPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpcPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpcPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$MPC_ARCH_PATH" ]
|
||||
then
|
||||
export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Build GCC
|
||||
# might need 32-bit glibc-devel headers to compile
|
||||
# E.g. on ubuntu install g++-multilib
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GCC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gccPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gccPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE
|
||||
buildDIR=$buildBASE/$gccPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
unset withMpc
|
||||
[ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH"
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure \
|
||||
--prefix=$GCC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
$withMpc \
|
||||
--with-pkgversion=OpenFOAM \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-libstdcxx-allocator=new \
|
||||
--with-system-zlib \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gccPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gccPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
288
makeGcc46
288
makeGcc46
@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeGcc46
|
||||
#
|
||||
# Description
|
||||
# Build script for gmp, mpfr and gcc-4.6.?
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
gmpPACKAGE=gmp-5.1.2
|
||||
mpfrPACKAGE=mpfr-3.1.2
|
||||
mpcPACKAGE=mpc-1.0.1
|
||||
gccPACKAGE=gcc-4.6.4
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# run from third-party directory only
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] [gcc-VERSION]
|
||||
|
||||
* build combinations of gmp, mpfr, mpc and gcc
|
||||
$gmpPACKAGE
|
||||
$mpfrPACKAGE
|
||||
$mpcPACKAGE
|
||||
$gccPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
gmp-[4-9]*)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpfr-[2-9]*)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpc-[0-9]*)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
gcc-[4-9]*)
|
||||
gccPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# set 32 or 64 bit ABI
|
||||
case "$WM_ARCH_OPTION" in
|
||||
32 | 64)
|
||||
ABI=$WM_ARCH_OPTION
|
||||
;;
|
||||
*)
|
||||
usage "Please set WM_ARCH_OPTION to either 32 or 64'$*'"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build/install without compiler name
|
||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
GCC_ARCH_PATH=$installBASE/$gccPACKAGE
|
||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
||||
|
||||
# mpc is not needed for gcc older than 4.5
|
||||
case "$gccPACKAGE" in
|
||||
gcc-4.[0-4].*)
|
||||
mpcPACKAGE=false
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Build GMP
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GMP_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gmpPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gmpPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE
|
||||
buildDIR=$buildBASE/$gmpPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$GMP_ARCH_PATH \
|
||||
--enable-cxx \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gmpPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gmpPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build MPFR
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPFR_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpfrPACKAGE"
|
||||
else
|
||||
echo "Starting build: $mpfrPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE
|
||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPFR_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpfrPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpfrPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build mpc
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpcPACKAGE"
|
||||
elif [ "$mpcPACKAGE" = false ]
|
||||
then
|
||||
echo "Skip building mpc - not needed for older gcc versions"
|
||||
else
|
||||
echo "Starting build: $mpcPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE
|
||||
buildDIR=$buildBASE/$mpcPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpcPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpcPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$MPC_ARCH_PATH" ]
|
||||
then
|
||||
export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Build GCC
|
||||
# might need 32-bit glibc-devel headers to compile
|
||||
# E.g. on ubuntu install g++-multilib
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GCC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gccPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gccPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE
|
||||
buildDIR=$buildBASE/$gccPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
unset withMpc
|
||||
[ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH"
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure \
|
||||
--prefix=$GCC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
$withMpc \
|
||||
--with-pkgversion=OpenFOAM \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-libstdcxx-allocator=new \
|
||||
--with-system-zlib \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gccPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gccPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
288
makeGcc47
288
makeGcc47
@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeGcc45
|
||||
#
|
||||
# Description
|
||||
# Build script for gmp, mpfr and gcc-4.7.?
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
gmpPACKAGE=gmp-5.1.2
|
||||
mpfrPACKAGE=mpfr-3.1.2
|
||||
mpcPACKAGE=mpc-1.0.1
|
||||
gccPACKAGE=gcc-4.7.4
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# run from third-party directory only
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] [gcc-VERSION]
|
||||
|
||||
* build combinations of gmp, mpfr, mpc and gcc
|
||||
$gmpPACKAGE
|
||||
$mpfrPACKAGE
|
||||
$mpcPACKAGE
|
||||
$gccPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
gmp-[4-9]*)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpfr-[2-9]*)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpc-[0-9]*)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
gcc-[4-9]*)
|
||||
gccPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# set 32 or 64 bit ABI
|
||||
case "$WM_ARCH_OPTION" in
|
||||
32 | 64)
|
||||
ABI=$WM_ARCH_OPTION
|
||||
;;
|
||||
*)
|
||||
usage "Please set WM_ARCH_OPTION to either 32 or 64'$*'"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build/install without compiler name
|
||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
GCC_ARCH_PATH=$installBASE/$gccPACKAGE
|
||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
||||
|
||||
# mpc is not needed for gcc older than 4.5
|
||||
case "$gccPACKAGE" in
|
||||
gcc-4.[0-4].*)
|
||||
mpcPACKAGE=false
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Build GMP
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GMP_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gmpPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gmpPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE
|
||||
buildDIR=$buildBASE/$gmpPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$GMP_ARCH_PATH \
|
||||
--enable-cxx \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gmpPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gmpPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build MPFR
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPFR_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpfrPACKAGE"
|
||||
else
|
||||
echo "Starting build: $mpfrPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE
|
||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPFR_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpfrPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpfrPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build mpc
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpcPACKAGE"
|
||||
elif [ "$mpcPACKAGE" = false ]
|
||||
then
|
||||
echo "Skip building mpc - not needed for older gcc versions"
|
||||
else
|
||||
echo "Starting build: $mpcPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE
|
||||
buildDIR=$buildBASE/$mpcPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpcPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpcPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$MPC_ARCH_PATH" ]
|
||||
then
|
||||
export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Build GCC
|
||||
# might need 32-bit glibc-devel headers to compile
|
||||
# E.g. on ubuntu install g++-multilib
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GCC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gccPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gccPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE
|
||||
buildDIR=$buildBASE/$gccPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
unset withMpc
|
||||
[ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH"
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure \
|
||||
--prefix=$GCC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
$withMpc \
|
||||
--with-pkgversion=OpenFOAM \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-libstdcxx-allocator=new \
|
||||
--with-system-zlib \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gccPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gccPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
288
makeGcc48
288
makeGcc48
@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeGcc48
|
||||
#
|
||||
# Description
|
||||
# Build script for gmp, mpfr and gcc-4.8.?
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
gmpPACKAGE=gmp-5.1.2
|
||||
mpfrPACKAGE=mpfr-3.1.2
|
||||
mpcPACKAGE=mpc-1.0.1
|
||||
gccPACKAGE=gcc-4.8.4
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# run from third-party directory only
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] [gcc-VERSION]
|
||||
|
||||
* build combinations of gmp, mpfr, mpc and gcc
|
||||
$gmpPACKAGE
|
||||
$mpfrPACKAGE
|
||||
$mpcPACKAGE
|
||||
$gccPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
gmp-[4-9]*)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpfr-[2-9]*)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpc-[0-9]*)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
gcc-[4-9]*)
|
||||
gccPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# set 32 or 64 bit ABI
|
||||
case "$WM_ARCH_OPTION" in
|
||||
32 | 64)
|
||||
ABI=$WM_ARCH_OPTION
|
||||
;;
|
||||
*)
|
||||
usage "Please set WM_ARCH_OPTION to either 32 or 64'$*'"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build/install without compiler name
|
||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
GCC_ARCH_PATH=$installBASE/$gccPACKAGE
|
||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
||||
|
||||
# mpc is not needed for gcc older than 4.5
|
||||
case "$gccPACKAGE" in
|
||||
gcc-4.[0-4].*)
|
||||
mpcPACKAGE=false
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Build GMP
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GMP_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gmpPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gmpPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE
|
||||
buildDIR=$buildBASE/$gmpPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$GMP_ARCH_PATH \
|
||||
--enable-cxx \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gmpPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gmpPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build MPFR
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPFR_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpfrPACKAGE"
|
||||
else
|
||||
echo "Starting build: $mpfrPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE
|
||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPFR_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpfrPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpfrPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build mpc
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpcPACKAGE"
|
||||
elif [ "$mpcPACKAGE" = false ]
|
||||
then
|
||||
echo "Skip building mpc - not needed for older gcc versions"
|
||||
else
|
||||
echo "Starting build: $mpcPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE
|
||||
buildDIR=$buildBASE/$mpcPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpcPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpcPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$MPC_ARCH_PATH" ]
|
||||
then
|
||||
export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Build GCC
|
||||
# might need 32-bit glibc-devel headers to compile
|
||||
# E.g. on ubuntu install g++-multilib
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GCC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gccPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gccPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE
|
||||
buildDIR=$buildBASE/$gccPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
unset withMpc
|
||||
[ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH"
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure \
|
||||
--prefix=$GCC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
$withMpc \
|
||||
--with-pkgversion=OpenFOAM \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-libstdcxx-allocator=new \
|
||||
--with-system-zlib \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gccPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gccPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
288
makeGcc49
288
makeGcc49
@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeGcc49
|
||||
#
|
||||
# Description
|
||||
# Build script for gmp, mpfr and gcc-4.9.?
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
gmpPACKAGE=gmp-5.1.2
|
||||
mpfrPACKAGE=mpfr-3.1.2
|
||||
mpcPACKAGE=mpc-1.0.1
|
||||
gccPACKAGE=gcc-4.9.2
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# run from third-party directory only
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] [gcc-VERSION]
|
||||
|
||||
* build combinations of gmp, mpfr, mpc and gcc
|
||||
$gmpPACKAGE
|
||||
$mpfrPACKAGE
|
||||
$mpcPACKAGE
|
||||
$gccPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
gmp-[4-9]*)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpfr-[2-9]*)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
mpc-[0-9]*)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
gcc-[4-9]*)
|
||||
gccPACKAGE="${1%%/}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# set 32 or 64 bit ABI
|
||||
case "$WM_ARCH_OPTION" in
|
||||
32 | 64)
|
||||
ABI=$WM_ARCH_OPTION
|
||||
;;
|
||||
*)
|
||||
usage "Please set WM_ARCH_OPTION to either 32 or 64'$*'"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build/install without compiler name
|
||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
GCC_ARCH_PATH=$installBASE/$gccPACKAGE
|
||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
||||
|
||||
# mpc is not needed for gcc older than 4.5
|
||||
case "$gccPACKAGE" in
|
||||
gcc-4.[0-4].*)
|
||||
mpcPACKAGE=false
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Build GMP
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GMP_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gmpPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gmpPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE
|
||||
buildDIR=$buildBASE/$gmpPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$GMP_ARCH_PATH \
|
||||
--enable-cxx \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gmpPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gmpPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build MPFR
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPFR_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpfrPACKAGE"
|
||||
else
|
||||
echo "Starting build: $mpfrPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE
|
||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPFR_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpfrPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpfrPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
#
|
||||
# Build mpc
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $MPC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $mpcPACKAGE"
|
||||
elif [ "$mpcPACKAGE" = false ]
|
||||
then
|
||||
echo "Skip building mpc - not needed for older gcc versions"
|
||||
else
|
||||
echo "Starting build: $mpcPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE
|
||||
buildDIR=$buildBASE/$mpcPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure ABI=$ABI \
|
||||
--prefix=$MPC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpcPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpcPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$MPC_ARCH_PATH" ]
|
||||
then
|
||||
export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Build GCC
|
||||
# might need 32-bit glibc-devel headers to compile
|
||||
# E.g. on ubuntu install g++-multilib
|
||||
#
|
||||
echo "---------------"
|
||||
if [ -d $GCC_ARCH_PATH ]
|
||||
then
|
||||
echo "Already built: $gccPACKAGE"
|
||||
else
|
||||
echo "Starting build: $gccPACKAGE"
|
||||
echo
|
||||
(
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE
|
||||
buildDIR=$buildBASE/$gccPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
make distclean 2>/dev/null
|
||||
|
||||
unset withMpc
|
||||
[ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH"
|
||||
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure \
|
||||
--prefix=$GCC_ARCH_PATH \
|
||||
--with-gmp=$GMP_ARCH_PATH \
|
||||
--with-mpfr=$MPFR_ARCH_PATH \
|
||||
$withMpc \
|
||||
--with-pkgversion=OpenFOAM \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-libstdcxx-allocator=new \
|
||||
--with-system-zlib \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $gccPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $gccPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
Reference in New Issue
Block a user