Add a patch to gcc-4.3.2 to fix building shared core compiler for SuperH.
/trunk/patches/gcc/4.3.2/370-sh-no-libc.patch | 12 12 0 0 ++++++++++++
1 file changed, 12 insertions(+)
1 # This file adds the functions to build the MPFR library
2 # Copyright 2008 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 do_mpfr_extract() { :; }
8 do_mpfr_target() { :; }
10 # Overide function depending on configuration
11 if [ "${CT_GMP_MPFR}" = "y" ]; then
15 CT_GetFile "mpfr-${CT_MPFR_VERSION}" http://www.mpfr.org/mpfr-current/ \
16 http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
21 CT_Extract "mpfr-${CT_MPFR_VERSION}"
22 CT_Patch "mpfr-${CT_MPFR_VERSION}"
24 # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
25 # same version number. Unfortunately, some tarballs of MPFR are not
26 # built sanely, and thus ./configure fails on Gentoo.
27 # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
28 # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
29 # This hack is not bad per se, but the MPFR guys would be better not to
30 # do that in the future...
31 CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
32 if [ ! -f .autotools.ct-ng ]; then
33 CT_DoLog DEBUG "Re-building autotools files"
34 CT_DoExecLog ALL autoreconf -fi
35 # Starting with libtool-1.9f, config.{guess,sub} are no longer
36 # installed without -i, but starting with libtool-2.2.6, they
37 # are no longer removed without -i. Sight... Just use -i with
39 # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
40 # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
42 case "$(libtoolize --version |head -n 1 |gawk '{ print $(NF); }')" in
45 *) libtoolize_opt=-i;;
47 CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
48 touch .autotools.ct-ng
54 mkdir -p "${CT_BUILD_DIR}/build-mpfr"
55 cd "${CT_BUILD_DIR}/build-mpfr"
57 CT_DoStep INFO "Installing MPFR"
60 # Under Cygwin, wa can't bnuild a thread-safe library
62 *-cygwin) mpfr_opt="--disable-thread-safe";;
63 *) mpfr_opt="--enable-thread-safe";;
66 CT_DoLog EXTRA "Configuring MPFR"
67 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
69 "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
72 --prefix="${CT_PREFIX_DIR}" \
76 --with-gmp="${CT_PREFIX_DIR}"
78 CT_DoLog EXTRA "Building MPFR"
79 CT_DoExecLog ALL make ${PARALLELMFLAGS}
81 if [ "${CT_MPFR_CHECK}" = "y" ]; then
82 CT_DoLog EXTRA "Checking MPFR"
83 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
86 CT_DoLog EXTRA "Installing MPFR"
87 CT_DoExecLog ALL make install
92 if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
95 mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
96 cd "${CT_BUILD_DIR}/build-mpfr-target"
98 CT_DoStep INFO "Installing MPFR for the target"
101 # Under Cygwin, wa can't bnuild a thread-safe library
102 case "${CT_TARGET}" in
103 *-cygwin) mpfr_opt="--disable-thread-safe";;
104 *) mpfr_opt="--enable-thread-safe";;
107 CT_DoLog EXTRA "Configuring MPFR"
108 CFLAGS="${CT_CFLAGS_FOR_TARGET}" \
110 "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
111 --build=${CT_BUILD} \
112 --host=${CT_TARGET} \
117 --with-gmp="${CT_SYSROOT_DIR}/usr"
119 CT_DoLog EXTRA "Building MPFR"
120 CT_DoExecLog ALL make ${PARALLELMFLAGS}
122 # Not possible to check MPFR while X-compiling
124 CT_DoLog EXTRA "Installing MPFR"
125 CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
130 fi # CT_GMP_MPFR_TARGET == y
132 fi # CT_GMP_MPFR == y