summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Config.in2
-rw-r--r--package/gcc/Config.in2
-rw-r--r--package/gcc/Makefile16
-rw-r--r--package/mpfr/patches/patch-mpfr-longlong_h48
4 files changed, 63 insertions, 5 deletions
diff --git a/package/Config.in b/package/Config.in
index 343386dd8..01188dde5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -352,7 +352,7 @@ endmenu
menu "Programming"
source "package/binutils/Config.in"
source "package/cxxtools/Config.in"
-#source "package/gcc/Config.in"
+source "package/gcc/Config.in"
source "package/haserl/Config.in"
source "package/jamvm/Config.in"
source "package/lua/Config.in"
diff --git a/package/gcc/Config.in b/package/gcc/Config.in
index 2d32d4491..be3446b96 100644
--- a/package/gcc/Config.in
+++ b/package/gcc/Config.in
@@ -1,5 +1,5 @@
config ADK_PACKAGE_GCC
- prompt "gcc.......................... GNU Compiler Collection"
+ prompt "gcc............................... GNU Compiler Collection"
tristate
default n
select ADK_PACKAGE_LIBGMP
diff --git a/package/gcc/Makefile b/package/gcc/Makefile
index 0f0407001..d2a05cbdb 100644
--- a/package/gcc/Makefile
+++ b/package/gcc/Makefile
@@ -9,22 +9,32 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE}))
+TCFLAGS:= ''
+TCPPFLAGS:= ''
CONFIGURE_STYLE= gnu
+ifeq ($(ADK_LINUX_MIPS64_LEMOTE),y)
+CONFIGURE_ARGS+= --with-abi=64
+endif
CONFIGURE_ARGS+= --enable-languages=c \
- --enable-shared \
+ --host=$(REAL_GNU_TARGET_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
--disable-__cxa_atexit \
+ --without-headers \
--with-gnu-ld \
--disable-libssp \
--disable-nls \
--disable-libmudflap \
--disable-libgomp \
--disable-multilib
-BUILD_STYLE= auto
-INSTALL_STYLE= auto
+BUILD_STYLE:= auto
+ALL_TARGET:= all-gcc all-target-libgcc
+INSTALL_STYLE:= auto
+INSTALL_TARGET:= install-gcc install-target-libgcc
post-install:
${INSTALL_DIR} ${IDIR_GCC}/usr/lib
${INSTALL_DIR} ${IDIR_GCC}/usr/bin
${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/ccp ${IDIR_GCC}/usr/bin/
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mpfr/patches/patch-mpfr-longlong_h b/package/mpfr/patches/patch-mpfr-longlong_h
new file mode 100644
index 000000000..7bf1567ee
--- /dev/null
+++ b/package/mpfr/patches/patch-mpfr-longlong_h
@@ -0,0 +1,48 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- mpfr-2.4.1.orig/mpfr-longlong.h 2009-02-20 10:43:17.000000000 +0100
++++ mpfr-2.4.1/mpfr-longlong.h 2009-05-29 15:11:21.000000000 +0200
+@@ -1011,10 +1011,19 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+ #endif /* __m88000__ */
+
+ #if defined (__mips) && W_TYPE_SIZE == 32
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
++#if __GMP_GNUC_PREREQ (4,4)
++#define umul_ppmm(w1, w0, u, v) \
++ do { \
++ UDItype __ll = (UDItype)(u) * (v); \
++ w1 = __ll >> 32; \
++ w0 = __ll; \
++ } while (0)
++#endif
++#if !defined (umul_ppmm) && __GMP_GNUC_PREREQ (2,7)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
++#endif
++#if !defined (umul_ppmm)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1" \
+ : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+@@ -1024,10 +1033,20 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+ #endif /* __mips */
+
+ #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
++#if __GMP_GNUC_PREREQ (4,4)
++#define umul_ppmm(w1, w0, u, v) \
++ do { \
++ typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
++ __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
++ w1 = __ll >> 64; \
++ w0 = __ll; \
++ } while (0)
++#endif
++#if !defined (umul_ppmm) && __GMP_GNUC_PREREQ (2,7)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
++#endif
++#if !defined (umul_ppmm)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \
+ : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))