Changes in tools/toolchain.sh [3f7efa79:71e3289] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
r3f7efa79 r71e3289 28 28 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 # 30 31 GMP_MAIN=<<EOF32 #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 me40 #endif41 EOF42 43 MPFR_MAIN=<<EOF44 #if MPFR_VERSION < MPFR_VERSION_NUM(2, 4, 2)45 choke me46 #endif47 EOF48 49 MPC_MAIN=<<EOF50 #if MPC_VERSION < MPC_VERSION_NUM(0, 8, 1)51 choke me52 #endif53 EOF54 55 #56 # Check if the library described in the argument57 # 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" ] ; then78 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 echo83 echo " ===== Compiler output ====="84 cat "${FNAME}.log"85 echo " ==========================="86 echo87 else88 echo " ${DEPENDENCY} found"89 rm -f "${FNAME}.log" "${FNAME}.o" "${FNAME}.c"90 fi91 }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 echo99 }100 30 101 31 check_error() { … … 139 69 echo " sparc64 SPARC V9" 140 70 echo " all build all targets" 141 echo142 echo "The toolchain will be installed to the directory specified by"143 echo "the CROSS_PREFIX environment variable. If the variable is not"144 echo "defined, /usr/local will be used by default."145 71 echo 146 72 … … 192 118 echo " - native C library with headers" 193 119 echo 120 121 show_countdown 10 194 122 } 195 123 … … 353 281 354 282 show_dependencies 355 check_dependecies356 show_countdown 10357 283 358 284 case "$1" in
Note:
See TracChangeset
for help on using the changeset viewer.