summaryrefslogtreecommitdiff
path: root/package/gcc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-03-06 13:18:46 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-03-06 13:18:46 +0100
commitea7f7a6dee13b456ce43ad0ec14dbbc6718e678f (patch)
treea6bb1d58be6b22c2374fb1da5b9215a6ed78ab6f /package/gcc
parent3f8a11b1340f98a378694f0fb68cbc339aab8223 (diff)
parent6b9a7f5d4916e516793cee08e71acc83cdc6bce1 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/gcc')
-rw-r--r--package/gcc/Makefile21
-rw-r--r--package/gcc/patches/mirbsd-compat.patch12
-rw-r--r--package/gcc/patches/no-lib64.patch47
3 files changed, 79 insertions, 1 deletions
diff --git a/package/gcc/Makefile b/package/gcc/Makefile
index 20e99fff8..3c6e0b701 100644
--- a/package/gcc/Makefile
+++ b/package/gcc/Makefile
@@ -10,14 +10,32 @@ PKG_OPTS:= noremove
PKG_DEPENDS:= libgmp mpfr
PKG_BUILDDEP+= gmp mpfr
+ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
+PKG_DEPENDS:= uclibc-dev
+PKG_BUILDDEP+= uclibc
+endif
+ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
+PKG_DEPENDS:= eglibc-dev
+PKG_BUILDDEP+= eglibc
+endif
+ifeq ($(ADK_TARGET_LIB_GLIBC),y)
+PKG_DEPENDS:= glibc-dev
+PKG_BUILDDEP+= glibc
+endif
+
PKG_HOST_DEPENDS:= !freebsd
include ${TOPDIR}/mk/package.mk
-$(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,GCC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
TCFLAGS:= ''
TCPPFLAGS:= ''
+
+ifeq ($(ADK_LINUX_64),y)
+CONFIGURE_ARGS+= --with-abi=64
+endif
+
CONFIGURE_ARGS+= --enable-languages=c,c++ \
--host=$(REAL_GNU_TARGET_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
@@ -40,6 +58,7 @@ post-install:
${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
+ cd ${IDIR_GCC}/usr/bin/ && ln -sf gcc cc
${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
${CP} ${WRKINST}/usr/lib/libstdc++*so* ${IDIR_GCC}/usr/lib/
${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
diff --git a/package/gcc/patches/mirbsd-compat.patch b/package/gcc/patches/mirbsd-compat.patch
new file mode 100644
index 000000000..2f3ea0c87
--- /dev/null
+++ b/package/gcc/patches/mirbsd-compat.patch
@@ -0,0 +1,12 @@
+diff -Nur gcc-4.4.2.orig/gcc/configure gcc-4.4.2/gcc/configure
+--- gcc-4.4.2.orig/gcc/configure Tue Mar 24 18:45:39 2009
++++ gcc-4.4.2/gcc/configure Sat Dec 19 21:07:07 2009
+@@ -19381,7 +19381,7 @@
+ dynamic_linker='ldqnx.so'
+ ;;
+
+-openbsd*)
++mirbsd*|openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
diff --git a/package/gcc/patches/no-lib64.patch b/package/gcc/patches/no-lib64.patch
new file mode 100644
index 000000000..add17ecb8
--- /dev/null
+++ b/package/gcc/patches/no-lib64.patch
@@ -0,0 +1,47 @@
+diff -Nur gcc-4.4.1.orig/gcc/config/i386/linux64.h gcc-4.4.1/gcc/config/i386/linux64.h
+--- gcc-4.4.1.orig/gcc/config/i386/linux64.h 2009-04-10 01:23:07.000000000 +0200
++++ gcc-4.4.1/gcc/config/i386/linux64.h 2009-08-21 18:34:13.000000000 +0200
+@@ -59,7 +59,7 @@
+ done. */
+
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+
+ #undef ASM_SPEC
+ #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
+diff -Nur gcc-4.4.1.orig/gcc/config/i386/t-linux64 gcc-4.4.1/gcc/config/i386/t-linux64
+--- gcc-4.4.1.orig/gcc/config/i386/t-linux64 2008-07-02 17:59:19.000000000 +0200
++++ gcc-4.4.1/gcc/config/i386/t-linux64 2009-08-21 18:34:13.000000000 +0200
+@@ -7,7 +7,7 @@
+
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
++MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+diff -Nur gcc-4.4.1.orig/gcc/config/mips/linux64.h gcc-4.4.1/gcc/config/mips/linux64.h
+--- gcc-4.4.1.orig/gcc/config/mips/linux64.h 2009-02-20 16:20:38.000000000 +0100
++++ gcc-4.4.1/gcc/config/mips/linux64.h 2009-08-21 18:37:19.000000000 +0200
+@@ -36,7 +36,7 @@
+ %{profile:-lc_p} %{!profile:-lc}}"
+
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
+ #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKERN32 \
+diff -Nur gcc-4.4.1.orig/gcc/config/mips/t-linux64 gcc-4.4.1/gcc/config/mips/t-linux64
+--- gcc-4.4.1.orig/gcc/config/mips/t-linux64 2006-06-06 14:51:24.000000000 +0200
++++ gcc-4.4.1/gcc/config/mips/t-linux64 2009-08-21 18:34:13.000000000 +0200
+@@ -1,6 +1,6 @@
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+ MULTILIB_DIRNAMES = n32 32 64
+-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
++MULTILIB_OSDIRNAMES = ../lib ../lib ../lib
+
+ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+