Changeset 3f7efa79 in mainline
- Timestamp:
- 2011-02-28T14:24:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 37b1651d, c672195, dddb357
- Parents:
- e6cb880
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
re6cb880 r3f7efa79 28 28 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 # 30 31 GMP_MAIN=<<EOF 32 #define GCC_GMP_VERSION_NUM(a, b, c) \ 33 (((a) << 16L) | ((b) << 8) | (c)) 34 35 #define GCC_GMP_VERSION \ 36 GCC_GMP_VERSION_NUM(__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL) 37 38 #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2) 39 choke me 40 #endif 41 EOF 42 43 MPFR_MAIN=<<EOF 44 #if MPFR_VERSION < MPFR_VERSION_NUM(2, 4, 2) 45 choke me 46 #endif 47 EOF 48 49 MPC_MAIN=<<EOF 50 #if MPC_VERSION < MPC_VERSION_NUM(0, 8, 1) 51 choke me 52 #endif 53 EOF 54 55 # 56 # Check if the library described in the argument 57 # exists and has acceptable version. 58 # 59 check_dependency() { 60 DEPENDENCY="$1" 61 HEADER="$2" 62 BODY="$3" 63 64 FNAME="/tmp/conftest-$$" 65 66 echo "#include ${HEADER}" > "${FNAME}.c" 67 echo >> "${FNAME}.c" 68 echo "int main()" >> "${FNAME}.c" 69 echo "{" >> "${FNAME}.c" 70 echo "${BODY}" >> "${FNAME}.c" 71 echo " return 0;" >> "${FNAME}.c" 72 echo "}" >> "${FNAME}.c" 73 74 cc -c -o "${FNAME}.o" "${FNAME}.c" 2> "${FNAME}.log" 75 RC="$?" 76 77 if [ "$RC" -ne "0" ] ; then 78 echo " ${DEPENDENCY} not found, too old or compiler error." 79 echo " Please recheck manually the source file \"${FNAME}.c\"." 80 echo " The compilation of the toolchain is probably going to fail," 81 echo " you have been warned." 82 echo 83 echo " ===== Compiler output =====" 84 cat "${FNAME}.log" 85 echo " ===========================" 86 echo 87 else 88 echo " ${DEPENDENCY} found" 89 rm -f "${FNAME}.log" "${FNAME}.o" "${FNAME}.c" 90 fi 91 } 92 93 check_dependecies() { 94 echo ">>> Basic dependency check" 95 check_dependency "GMP" "<gmp.h>" "${GMP_MAIN}" 96 check_dependency "MPFR" "<mpfr.h>" "${MPFR_MAIN}" 97 check_dependency "MPC" "<mpc.h>" "${MPC_MAIN}" 98 echo 99 } 30 100 31 101 check_error() { … … 122 192 echo " - native C library with headers" 123 193 echo 124 125 show_countdown 10126 194 } 127 195 … … 285 353 286 354 show_dependencies 355 check_dependecies 356 show_countdown 10 287 357 288 358 case "$1" in
Note:
See TracChangeset
for help on using the changeset viewer.