From 38c549d748e72ecba0dac3215b7a82596229a42f Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 3 May 2009 21:10:15 +0000 Subject: Prepare for gcc-4.4: - add 'companion_libs/' to hold all libraries needed to build gcc-4.3+ and gcc-4.4+ - move GMP & MPFR to 'companion_libs/' -------- diffstat follows -------- /trunk/scripts/build/gmp.sh | 85 0 85 0 ---------------------------- /trunk/scripts/build/mpfr.sh | 139 0 139 0 --------------------------------------------- /trunk/scripts/addToolVersion.sh | 4 2 2 0 /trunk/scripts/crosstool-NG.sh.in | 4 2 2 0 /trunk/config/companion_libs.in | 17 10 7 0 +++--- /trunk/config/gmp_mpfr/gmp.in | 32 0 32 0 ---------- /trunk/config/gmp_mpfr/mpfr.in | 42 0 42 0 -------------- /trunk/config/config.in | 2 1 1 0 /trunk/config/gmp_mpfr.in | 35 0 35 0 ----------- 9 files changed, 15 insertions(+), 345 deletions(-) diff --git a/config/companion_libs.in b/config/companion_libs.in new file mode 100644 index 0000000..49dc662 --- /dev/null +++ b/config/companion_libs.in @@ -0,0 +1,38 @@ +# Companion libraries config options +# Those libraries are required for different versions of gcc, +# and can be used by binutils and gdb (maybe others as well). + +menu "Companion libraries" + +config GMP_MPFR + bool + prompt "GMP and MPFR" + help + gcc 4.3.0 and above requires both GMP and MPFR to build some frontends, + and some other components can use them as well (eg. binutils and gdb). + + Say 'Y' here if you want to build those two libraries specifically + for crosstool-NG. + + The packages that can use GMP and MPFR are: + - binutils + - gcc + - gdb + +config GMP_MPFR_TARGET + bool + prompt "Build libraries for the target" + depends on GMP_MPFR + depends on ! BARE_METAL + default n + help + Also build libraries for the target. This can be usefull if you want + to later build a compiler that will run on the target, or if you want + to run gdb natively on the target. + +if GMP_MPFR +source config/companion_libs/gmp.in +source config/companion_libs/mpfr.in +endif + +endmenu diff --git a/config/companion_libs/gmp.in b/config/companion_libs/gmp.in new file mode 100644 index 0000000..0ac2b2c --- /dev/null +++ b/config/companion_libs/gmp.in @@ -0,0 +1,32 @@ +# GMP options + +choice + bool + prompt "GMP version" + +config GMP_V_4_2_2 + bool + prompt "4.2.2" + +config GMP_V_4_2_4 + bool + prompt "4.2.4" + +# CT_INSERT_VERSION_ABOVE +# Don't remove above line! +endchoice + +config GMP_VERSION + string + default "4.2.2" if GMP_V_4_2_2 + default "4.2.4" if GMP_V_4_2_4 +# CT_INSERT_VERSION_STRING_ABOVE +# Don't remove above line! + +config GMP_CHECK + bool + prompt "Check GMP" + default y + help + It is highly recommended that 'make check' is run against the newly built + GMP library. See http://gmplib.org/ diff --git a/config/companion_libs/mpfr.in b/config/companion_libs/mpfr.in new file mode 100644 index 0000000..dcea326 --- /dev/null +++ b/config/companion_libs/mpfr.in @@ -0,0 +1,42 @@ +# GMP options + +choice + bool + prompt "MPFR version" + +config MPFR_V_2_3_1 + bool + prompt "2.3.1" + +config MPFR_V_2_3_2 + bool + prompt "2.3.2" + +config MPFR_V_2_4_0 + bool + prompt "2.4.0" + +config MPFR_V_2_4_1 + bool + prompt "2.4.1" + +# CT_INSERT_VERSION_ABOVE +# Don't remove above line! +endchoice + +config MPFR_VERSION + string + default "2.3.1" if MPFR_V_2_3_1 + default "2.3.2" if MPFR_V_2_3_2 + default "2.4.0" if MPFR_V_2_4_0 + default "2.4.1" if MPFR_V_2_4_1 +# CT_INSERT_VERSION_STRING_ABOVE +# Don't remove above line! + +config MPFR_CHECK + bool + prompt "Check MPFR" + default y + help + It is highly recommended that 'make check' is run against the newly built + MPFR library. See http://gmplib.org/ diff --git a/config/config.in b/config/config.in index 16a62f2..14e1a41 100644 --- a/config/config.in +++ b/config/config.in @@ -2,7 +2,7 @@ source config/global.in source config/target.in source config/toolchain.in source config/kernel.in -source config/gmp_mpfr.in +source config/companion_libs.in source config/binutils.in source config/cc.in source config/libc.in diff --git a/config/gmp_mpfr.in b/config/gmp_mpfr.in deleted file mode 100644 index 02afb76..0000000 --- a/config/gmp_mpfr.in +++ /dev/null @@ -1,35 +0,0 @@ -# GMP and MPFR libraries config options - -menu "GMP and MPFR" - -config GMP_MPFR - bool - prompt "GMP and MPFR" - help - Recent gcc needs both GMP and MPFR to build some frontends. - - Say 'Y' here if you want to build those two libraries specifically - for crosstool-NG. - - The packages that can use GMP and MPFR are: - - binutils - - gcc - - gdb - -config GMP_MPFR_TARGET - bool - prompt "Build libraries for the target" - depends on GMP_MPFR - depends on ! BARE_METAL - default n - help - Also build libraries for the target. This can be usefull if you want - to later build a compiler that will run on the target, or if you want - to run gdb natively on the target. - -if GMP_MPFR -source config/gmp_mpfr/gmp.in -source config/gmp_mpfr/mpfr.in -endif - -endmenu diff --git a/config/gmp_mpfr/gmp.in b/config/gmp_mpfr/gmp.in deleted file mode 100644 index 0ac2b2c..0000000 --- a/config/gmp_mpfr/gmp.in +++ /dev/null @@ -1,32 +0,0 @@ -# GMP options - -choice - bool - prompt "GMP version" - -config GMP_V_4_2_2 - bool - prompt "4.2.2" - -config GMP_V_4_2_4 - bool - prompt "4.2.4" - -# CT_INSERT_VERSION_ABOVE -# Don't remove above line! -endchoice - -config GMP_VERSION - string - default "4.2.2" if GMP_V_4_2_2 - default "4.2.4" if GMP_V_4_2_4 -# CT_INSERT_VERSION_STRING_ABOVE -# Don't remove above line! - -config GMP_CHECK - bool - prompt "Check GMP" - default y - help - It is highly recommended that 'make check' is run against the newly built - GMP library. See http://gmplib.org/ diff --git a/config/gmp_mpfr/mpfr.in b/config/gmp_mpfr/mpfr.in deleted file mode 100644 index dcea326..0000000 --- a/config/gmp_mpfr/mpfr.in +++ /dev/null @@ -1,42 +0,0 @@ -# GMP options - -choice - bool - prompt "MPFR version" - -config MPFR_V_2_3_1 - bool - prompt "2.3.1" - -config MPFR_V_2_3_2 - bool - prompt "2.3.2" - -config MPFR_V_2_4_0 - bool - prompt "2.4.0" - -config MPFR_V_2_4_1 - bool - prompt "2.4.1" - -# CT_INSERT_VERSION_ABOVE -# Don't remove above line! -endchoice - -config MPFR_VERSION - string - default "2.3.1" if MPFR_V_2_3_1 - default "2.3.2" if MPFR_V_2_3_2 - default "2.4.0" if MPFR_V_2_4_0 - default "2.4.1" if MPFR_V_2_4_1 -# CT_INSERT_VERSION_STRING_ABOVE -# Don't remove above line! - -config MPFR_CHECK - bool - prompt "Check MPFR" - default y - help - It is highly recommended that 'make check' is run against the newly built - MPFR library. See http://gmplib.org/ diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh index 0f6bf03..21f4e9e 100755 --- a/scripts/addToolVersion.sh +++ b/scripts/addToolVersion.sh @@ -131,8 +131,8 @@ while [ $# -gt 0 ]; do --strace) EXP=; OBS=; cat=STRACE; tool=strace; tool_prefix=debug;; --ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug;; --libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=tools;; - --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=gmp_mpfr;; - --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=gmp_mpfr;; + --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs;; + --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs;; # Tools options: -x|--experimental|+s) EXP=1;; diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh new file mode 100644 index 0000000..51134da --- /dev/null +++ b/scripts/build/companion_libs/gmp.sh @@ -0,0 +1,85 @@ +# This file adds the functions to build the GMP library +# Copyright 2008 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_gmp_get() { :; } +do_gmp_extract() { :; } +do_gmp() { :; } +do_gmp_target() { :; } + +# Overide functions depending on configuration +if [ "${CT_GMP_MPFR}" = "y" ]; then + +# Download GMP +do_gmp_get() { + CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp +} + +# Extract GMP +do_gmp_extract() { + CT_Extract "gmp-${CT_GMP_VERSION}" + CT_Patch "gmp-${CT_GMP_VERSION}" +} + +do_gmp() { + mkdir -p "${CT_BUILD_DIR}/build-gmp" + cd "${CT_BUILD_DIR}/build-gmp" + + CT_DoStep INFO "Installing GMP" + + CT_DoLog EXTRA "Configuring GMP" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --disable-shared --enable-static \ + --enable-fft --enable-mpbsd + + CT_DoLog EXTRA "Building GMP" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_GMP_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking GMP" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing GMP" + CT_DoExecLog ALL make install + + CT_EndStep +} + +if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then + +do_gmp_target() { + mkdir -p "${CT_BUILD_DIR}/build-gmp-target" + cd "${CT_BUILD_DIR}/build-gmp-target" + + CT_DoStep INFO "Installing GMP for the target" + + CT_DoLog EXTRA "Configuring GMP" + CFLAGS="${CT_CFLAGS_FOR_TARGET}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=/usr \ + --disable-shared --enable-static \ + --enable-fft --enable-mpbsd + + CT_DoLog EXTRA "Building GMP" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + # Not possible to check MPFR while X-compiling + + CT_DoLog EXTRA "Installing GMP" + CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install + + CT_EndStep +} + +fi # CT_GMP_MPFR_TARGET == y + +fi # CT_GMP_MPFR == y diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh new file mode 100644 index 0000000..e302ff7 --- /dev/null +++ b/scripts/build/companion_libs/mpfr.sh @@ -0,0 +1,139 @@ +# This file adds the functions to build the MPFR library +# Copyright 2008 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_mpfr_get() { :; } +do_mpfr_extract() { :; } +do_mpfr() { :; } +do_mpfr_target() { :; } + +# Overide function depending on configuration +if [ "${CT_GMP_MPFR}" = "y" ]; then + +# Download MPFR +do_mpfr_get() { + CT_GetFile "mpfr-${CT_MPFR_VERSION}" http://www.mpfr.org/mpfr-current/ \ + http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/ +} + +# Extract MPFR +do_mpfr_extract() { + CT_Extract "mpfr-${CT_MPFR_VERSION}" + CT_Patch "mpfr-${CT_MPFR_VERSION}" + + # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the + # same version number. Unfortunately, some tarballs of MPFR are not + # built sanely, and thus ./configure fails on Gentoo. + # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html + # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html + # This hack is not bad per se, but the MPFR guys would be better not to + # do that in the future... + # It seems that MPFR >= 2.4.0 do not need this... + case "${CT_MPFR_VERSION}" in + 1.*|2.0.*|2.1.*|2.2.*|2.3.*) + CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}" + if [ ! -f .autotools.ct-ng ]; then + CT_DoLog DEBUG "Re-building autotools files" + CT_DoExecLog ALL autoreconf -fi + # Starting with libtool-1.9f, config.{guess,sub} are no longer + # installed without -i, but starting with libtool-2.2.6, they + # are no longer removed without -i. Sight... Just use -i with + # libtool >=2 + # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html + # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html + libtoolize_opt= + case "$(libtoolize --version |head -n 1 |awk '{ print $(NF); }')" in + 0.*) ;; + 1.*) ;; + *) libtoolize_opt=-i;; + esac + CT_DoExecLog ALL libtoolize -f ${libtoolize_opt} + touch .autotools.ct-ng + fi + CT_Popd + ;; + esac +} + +do_mpfr() { + mkdir -p "${CT_BUILD_DIR}/build-mpfr" + cd "${CT_BUILD_DIR}/build-mpfr" + + CT_DoStep INFO "Installing MPFR" + + mpfr_opt= + # Under Cygwin, we can't build a thread-safe library + case "${CT_HOST}" in + *-cygwin) mpfr_opt="--disable-thread-safe";; + *) mpfr_opt="--enable-thread-safe";; + esac + + CT_DoLog EXTRA "Configuring MPFR" + CC="${CT_HOST}-gcc" \ + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + ${mpfr_opt} \ + --disable-shared \ + --enable-static \ + --with-gmp="${CT_PREFIX_DIR}" + + CT_DoLog EXTRA "Building MPFR" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_MPFR_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking MPFR" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing MPFR" + CT_DoExecLog ALL make install + + CT_EndStep +} + +if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then + +do_mpfr_target() { + mkdir -p "${CT_BUILD_DIR}/build-mpfr-target" + cd "${CT_BUILD_DIR}/build-mpfr-target" + + CT_DoStep INFO "Installing MPFR for the target" + + mpfr_opt= + # Under Cygwin, we can't build a thread-safe library + case "${CT_TARGET}" in + *-cygwin) mpfr_opt="--disable-thread-safe";; + *) mpfr_opt="--enable-thread-safe";; + esac + + CT_DoLog EXTRA "Configuring MPFR" + CC="${CT_TARGET}-gcc" \ + CFLAGS="${CT_CFLAGS_FOR_TARGET}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=/usr \ + ${mpfr_opt} \ + --disable-shared \ + --enable-static \ + --with-gmp="${CT_SYSROOT_DIR}/usr" + + CT_DoLog EXTRA "Building MPFR" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + # Not possible to check MPFR while X-compiling + + CT_DoLog EXTRA "Installing MPFR" + CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install + + CT_EndStep +} + +fi # CT_GMP_MPFR_TARGET == y + +fi # CT_GMP_MPFR == y diff --git a/scripts/build/gmp.sh b/scripts/build/gmp.sh deleted file mode 100644 index 51134da..0000000 --- a/scripts/build/gmp.sh +++ /dev/null @@ -1,85 +0,0 @@ -# This file adds the functions to build the GMP library -# Copyright 2008 Yann E. MORIN -# Licensed under the GPL v2. See COPYING in the root of this package - -do_gmp_get() { :; } -do_gmp_extract() { :; } -do_gmp() { :; } -do_gmp_target() { :; } - -# Overide functions depending on configuration -if [ "${CT_GMP_MPFR}" = "y" ]; then - -# Download GMP -do_gmp_get() { - CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp -} - -# Extract GMP -do_gmp_extract() { - CT_Extract "gmp-${CT_GMP_VERSION}" - CT_Patch "gmp-${CT_GMP_VERSION}" -} - -do_gmp() { - mkdir -p "${CT_BUILD_DIR}/build-gmp" - cd "${CT_BUILD_DIR}/build-gmp" - - CT_DoStep INFO "Installing GMP" - - CT_DoLog EXTRA "Configuring GMP" - CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ - "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_HOST} \ - --prefix="${CT_PREFIX_DIR}" \ - --disable-shared --enable-static \ - --enable-fft --enable-mpbsd - - CT_DoLog EXTRA "Building GMP" - CT_DoExecLog ALL make ${PARALLELMFLAGS} - - if [ "${CT_GMP_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking GMP" - CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check - fi - - CT_DoLog EXTRA "Installing GMP" - CT_DoExecLog ALL make install - - CT_EndStep -} - -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then - -do_gmp_target() { - mkdir -p "${CT_BUILD_DIR}/build-gmp-target" - cd "${CT_BUILD_DIR}/build-gmp-target" - - CT_DoStep INFO "Installing GMP for the target" - - CT_DoLog EXTRA "Configuring GMP" - CFLAGS="${CT_CFLAGS_FOR_TARGET}" \ - CT_DoExecLog ALL \ - "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=/usr \ - --disable-shared --enable-static \ - --enable-fft --enable-mpbsd - - CT_DoLog EXTRA "Building GMP" - CT_DoExecLog ALL make ${PARALLELMFLAGS} - - # Not possible to check MPFR while X-compiling - - CT_DoLog EXTRA "Installing GMP" - CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install - - CT_EndStep -} - -fi # CT_GMP_MPFR_TARGET == y - -fi # CT_GMP_MPFR == y diff --git a/scripts/build/mpfr.sh b/scripts/build/mpfr.sh deleted file mode 100644 index e302ff7..0000000 --- a/scripts/build/mpfr.sh +++ /dev/null @@ -1,139 +0,0 @@ -# This file adds the functions to build the MPFR library -# Copyright 2008 Yann E. MORIN -# Licensed under the GPL v2. See COPYING in the root of this package - -do_mpfr_get() { :; } -do_mpfr_extract() { :; } -do_mpfr() { :; } -do_mpfr_target() { :; } - -# Overide function depending on configuration -if [ "${CT_GMP_MPFR}" = "y" ]; then - -# Download MPFR -do_mpfr_get() { - CT_GetFile "mpfr-${CT_MPFR_VERSION}" http://www.mpfr.org/mpfr-current/ \ - http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/ -} - -# Extract MPFR -do_mpfr_extract() { - CT_Extract "mpfr-${CT_MPFR_VERSION}" - CT_Patch "mpfr-${CT_MPFR_VERSION}" - - # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the - # same version number. Unfortunately, some tarballs of MPFR are not - # built sanely, and thus ./configure fails on Gentoo. - # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html - # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html - # This hack is not bad per se, but the MPFR guys would be better not to - # do that in the future... - # It seems that MPFR >= 2.4.0 do not need this... - case "${CT_MPFR_VERSION}" in - 1.*|2.0.*|2.1.*|2.2.*|2.3.*) - CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}" - if [ ! -f .autotools.ct-ng ]; then - CT_DoLog DEBUG "Re-building autotools files" - CT_DoExecLog ALL autoreconf -fi - # Starting with libtool-1.9f, config.{guess,sub} are no longer - # installed without -i, but starting with libtool-2.2.6, they - # are no longer removed without -i. Sight... Just use -i with - # libtool >=2 - # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html - # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html - libtoolize_opt= - case "$(libtoolize --version |head -n 1 |awk '{ print $(NF); }')" in - 0.*) ;; - 1.*) ;; - *) libtoolize_opt=-i;; - esac - CT_DoExecLog ALL libtoolize -f ${libtoolize_opt} - touch .autotools.ct-ng - fi - CT_Popd - ;; - esac -} - -do_mpfr() { - mkdir -p "${CT_BUILD_DIR}/build-mpfr" - cd "${CT_BUILD_DIR}/build-mpfr" - - CT_DoStep INFO "Installing MPFR" - - mpfr_opt= - # Under Cygwin, we can't build a thread-safe library - case "${CT_HOST}" in - *-cygwin) mpfr_opt="--disable-thread-safe";; - *) mpfr_opt="--enable-thread-safe";; - esac - - CT_DoLog EXTRA "Configuring MPFR" - CC="${CT_HOST}-gcc" \ - CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ - "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_HOST} \ - --prefix="${CT_PREFIX_DIR}" \ - ${mpfr_opt} \ - --disable-shared \ - --enable-static \ - --with-gmp="${CT_PREFIX_DIR}" - - CT_DoLog EXTRA "Building MPFR" - CT_DoExecLog ALL make ${PARALLELMFLAGS} - - if [ "${CT_MPFR_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking MPFR" - CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check - fi - - CT_DoLog EXTRA "Installing MPFR" - CT_DoExecLog ALL make install - - CT_EndStep -} - -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then - -do_mpfr_target() { - mkdir -p "${CT_BUILD_DIR}/build-mpfr-target" - cd "${CT_BUILD_DIR}/build-mpfr-target" - - CT_DoStep INFO "Installing MPFR for the target" - - mpfr_opt= - # Under Cygwin, we can't build a thread-safe library - case "${CT_TARGET}" in - *-cygwin) mpfr_opt="--disable-thread-safe";; - *) mpfr_opt="--enable-thread-safe";; - esac - - CT_DoLog EXTRA "Configuring MPFR" - CC="${CT_TARGET}-gcc" \ - CFLAGS="${CT_CFLAGS_FOR_TARGET}" \ - CT_DoExecLog ALL \ - "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=/usr \ - ${mpfr_opt} \ - --disable-shared \ - --enable-static \ - --with-gmp="${CT_SYSROOT_DIR}/usr" - - CT_DoLog EXTRA "Building MPFR" - CT_DoExecLog ALL make ${PARALLELMFLAGS} - - # Not possible to check MPFR while X-compiling - - CT_DoLog EXTRA "Installing MPFR" - CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install - - CT_EndStep -} - -fi # CT_GMP_MPFR_TARGET == y - -fi # CT_GMP_MPFR == y diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 04b3976..8b8ac4b 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -88,8 +88,8 @@ CT_DoLog INFO "Building environment variables" . "${CT_LIB_DIR}/scripts/build/internals.sh" . "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh" . "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh" -. "${CT_LIB_DIR}/scripts/build/gmp.sh" -. "${CT_LIB_DIR}/scripts/build/mpfr.sh" +. "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh" +. "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh" . "${CT_LIB_DIR}/scripts/build/binutils.sh" . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" . "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh" -- cgit v0.10.2-6-g49f6