diff options
Diffstat (limited to 'toolchain')
39 files changed, 587 insertions, 921 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile index 2c424ed7d..d2f59f8ba 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -7,7 +7,7 @@ # 3) build and install gcc c compiler # 4) install kernel-headers # 5) install libc headers -# 6) build and install full gcc +# 6) build and install full gcc # 7) build and install full libc # 8) build and install gdb debugger @@ -15,7 +15,7 @@ include $(TOPDIR)/rules.mk TARGETS:=binutils gmp mpfr gcc ifeq ($(ADK_TARGET_LIB_GLIBC),y) -TARGETS+=glibc +TARGETS+=glibc-ports glibc LIBC:=glibc endif ifeq ($(ADK_TARGET_LIB_EGLIBC),y) @@ -38,7 +38,11 @@ clean: $(TARGETS_CLEAN) download: $(DOWNLOAD) gcc-prepare: binutils-install gmp-install mpfr-install -$(LIBC)-prepare: gcc-prepare kernel-headers-prepare +ifeq ($(ADK_TARGET_LIB_GLIBC),y) +$(LIBC)-prepare: gcc-prepare kernel-headers-prepare glibc-ports-prepare +else +$(LIBC)-prepare: gcc-prepare kernel-headers-prepare +endif gcc-configure: $(LIBC)-prepare $(LIBC)-compile: gcc-configure gcc-compile: $(LIBC)-install diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index bb7797e92..d76d98125 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -2,22 +2,20 @@ # material, please see the LICENCE file in the top-level directory. include $(TOPDIR)/rules.mk -include ../rules.mk include Makefile.inc +include ../rules.mk include ${TOPDIR}/mk/buildhlp.mk -ifeq ($(ADK_SSP),y) -CONFOPTS+= --enable-libssp -else -CONFOPTS+= --disable-libssp -endif - ifeq ($(ADK_LINUX_64),y) CONFOPTS+= --enable-64-bit-bfd endif -$(WRKBUILD)/.headers: -$(WRKBUILD)/.configured: +ifeq (${ADK_MAKE_PARALLEL},y) +BINUTILS_MAKEOPTS+= -j${ADK_MAKE_JOBS} +endif + +$(WRKBUILD)/.headers: +$(WRKBUILD)/.configured: (cd $(WRKBUILD); \ $(WRKBUILD)/configure \ --prefix=$(STAGING_TOOLS) \ @@ -31,12 +29,13 @@ $(WRKBUILD)/.configured: --disable-dependency-tracking \ --disable-libtool-lock \ --disable-werror \ + --disable-libssp \ ${CONFOPTS} \ ); touch $@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured - $(MAKE) -C $(WRKBUILD) all + $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all touch $@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc index b5a9e3542..c38f81d7a 100644 --- a/toolchain/binutils/Makefile.inc +++ b/toolchain/binutils/Makefile.inc @@ -2,8 +2,8 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= binutils -PKG_VERSION:= 2.19.1 +PKG_VERSION:= 2.20.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= 09a8c5821a2dfdbb20665bc0bd680791 +PKG_MD5SUM:= 9cdfb9d6ec0578c166d3beae5e15c4e5 PKG_SITES:= ${MASTER_SITE_GNU:=binutils/} DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index 7b04ffa23..863cd88ba 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -7,6 +7,10 @@ include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk +ifneq ($(ADK_DEBUG),) +TARGET_CFLAGS+= -O2 +endif + EGLIBC_CONFOPTS:= \ --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ @@ -31,9 +35,9 @@ EGLIBC_ENV:= PATH='${TARGET_PATH}' \ libc_cv_forced_unwind=yes \ libc_cv_c_cleanup=yes \ libc_cv_gnu99_inline=yes \ - libc_cv_slibdir="/lib" + libc_cv_slibdir="/lib" -ifeq ($(ADK_DEVICE_NO_FPU),y) +ifeq ($(ADK_TARGET_NO_FPU),y) EGLIBC_CONFOPTS+= --without-fp endif @@ -44,7 +48,6 @@ $(WRKBUILD)/.headers_configure: mkdir -p $(EGLIBC_BUILD_DIR_INITIAL) (cd ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION); \ ln -sf ../ports ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)/libc); - (cd ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)/libc; autoconf --force); $(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \ $(EGLIBC_BUILD_DIR_INITIAL) (cd $(EGLIBC_BUILD_DIR_INITIAL); \ @@ -61,19 +64,9 @@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure PATH='${TARGET_PATH}' \ $(MAKE) -C $(EGLIBC_BUILD_DIR_INITIAL) \ install-headers install-bootstrap-headers=yes - PATH='${TARGET_PATH}' \ - $(MAKE) -C $(EGLIBC_BUILD_DIR_INITIAL) \ - csu/subdir_lib - ( cd $(EGLIBC_BUILD_DIR_INITIAL); \ - $(CP) csu/crt1.o csu/crti.o csu/crtn.o \ - $(TOOLCHAIN_SYSROOT)/usr/lib \ - ); - PATH='${TARGET_PATH}' \ - $(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \ - -o $(TOOLCHAIN_SYSROOT)/usr/lib/libc.so touch $@ -$(WRKBUILD)/.configured: +$(WRKBUILD)/.configured: mkdir -p $(EGLIBC_BUILD_DIR_FINAL) $(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \ $(EGLIBC_BUILD_DIR_FINAL) diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc index 4f11fba45..0dba0457c 100644 --- a/toolchain/eglibc/Makefile.inc +++ b/toolchain/eglibc/Makefile.inc @@ -2,7 +2,7 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= eglibc -PKG_VERSION:= 2.10.1 +PKG_VERSION:= 2.11.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= 1b5d08c87de09018dcabd9974ba754d4 -PKG_SITES:= http://www.openadk.org/distfiles/ +PKG_MD5SUM:= 393cfbba56898bf7d5d5444fe3313cb4 +PKG_SITES:= http://openadk.org/distfiles/ diff --git a/toolchain/eglibc/eglibc.config b/toolchain/eglibc/eglibc.config index 198741139..b7f5f96e1 100644 --- a/toolchain/eglibc/eglibc.config +++ b/toolchain/eglibc/eglibc.config @@ -1,26 +1,42 @@ -OPTION_EGLIBC_ADVANCED_INET6=y -OPTION_EGLIBC_BACKTRACE=n -OPTION_EGLIBC_BSD=y -OPTION_EGLIBC_CXX_TESTS=n -OPTION_EGLIBC_CATGETS=y -OPTION_EGLIBC_CHARSETS=y -OPTION_EGLIBC_DB_ALIASES=y -OPTION_EGLIBC_ENVZ=y -OPTION_EGLIBC_FSTAB=y -OPTION_EGLIBC_GETLOGIN=y -OPTION_EGLIBC_INET=y -OPTION_EGLIBC_LIBM=y -OPTION_EGLIBC_LOCALES=n -OPTION_EGLIBC_LOCALE_CODE=y -OPTION_EGLIBC_NIS=n -OPTION_EGLIBC_NSSWITCH=y -OPTION_EGLIBC_RCMD=y -OPTION_EGLIBC_SPAWN=y -OPTION_EGLIBC_STREAMS=y -OPTION_EGLIBC_SUNRPC=y -OPTION_EGLIBC_UTMP=y -OPTION_EGLIBC_UTMPX=y -OPTION_EGLIBC_WORDEXP=y -OPTION_POSIX_C_LANG_WIDE_CHAR=y -OPTION_POSIX_REGEXP=y -OPTION_POSIX_WIDE_CHAR_DEVICE_IO=y +# This file sets default values for all option group variables +# mentioned in option-groups.def; see that file for a description of +# each option group. +# +# Subdirectory makefiles include this file before including the user's +# settings from option-groups.config at the top of the build tree; +# that file need only refer to those options whose default settings +# are to be changed. +# +# By default, all option groups are enabled. +OPTION_EGLIBC_ADVANCED_INET6 = y +OPTION_EGLIBC_BACKTRACE = n +OPTION_EGLIBC_BIG_MACROS = y +OPTION_EGLIBC_BSD = y +OPTION_EGLIBC_CXX_TESTS = n +OPTION_EGLIBC_CATGETS = n +OPTION_EGLIBC_CHARSETS = n +OPTION_EGLIBC_DB_ALIASES = n +OPTION_EGLIBC_ENVZ = y +OPTION_EGLIBC_FCVT = y +OPTION_EGLIBC_FMTMSG = y +OPTION_EGLIBC_FSTAB = y +OPTION_EGLIBC_FTRAVERSE = y +OPTION_EGLIBC_GETLOGIN = y +OPTION_EGLIBC_INET = y +OPTION_EGLIBC_LIBM = y +OPTION_EGLIBC_LOCALES = n +OPTION_EGLIBC_LOCALE_CODE = n +OPTION_EGLIBC_MEMUSAGE = y +OPTION_EGLIBC_NIS = n +OPTION_EGLIBC_NSSWITCH = n +OPTION_EGLIBC_RCMD = y +OPTION_EGLIBC_SPAWN = y +OPTION_EGLIBC_STREAMS = y +OPTION_EGLIBC_SUNRPC = y +OPTION_EGLIBC_UTMP = y +OPTION_EGLIBC_UTMPX = y +OPTION_EGLIBC_WORDEXP = y +OPTION_POSIX_C_LANG_WIDE_CHAR = y +OPTION_POSIX_REGEXP = y +OPTION_POSIX_REGEXP_GLIBC = n +OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch new file mode 100644 index 000000000..e2cc86c2e --- /dev/null +++ b/toolchain/eglibc/patches/eglibc-cross.patch @@ -0,0 +1,92 @@ +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h eglibc-2.11.1/libc/sunrpc/rpc/types.h +--- eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h 2010-02-24 08:09:59.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc/types.h 2010-03-22 18:30:14.944408497 +0100 +@@ -68,6 +68,7 @@ + #include <sys/types.h> + #endif + ++#if !defined(_CROSS_RPCGEN_) + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; +@@ -83,6 +84,7 @@ + typedef __caddr_t caddr_t; + # define __daddr_t_defined + #endif ++#endif + + #include <sys/time.h> + #include <sys/param.h> +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc/rpc_clntout.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c 2010-02-24 08:10:01.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_clntout.c 2010-03-22 18:30:38.973160151 +0100 +@@ -31,7 +31,7 @@ + */ + #include <stdio.h> + #include <string.h> +-#include <rpc/types.h> ++#include "rpc/types.h" + #include "rpc_parse.h" + #include "rpc_util.h" + #include "proto.h" +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-03-22 18:31:31.245661003 +0100 +@@ -37,7 +37,11 @@ + #include <stdio.h> + #include <string.h> + #include <unistd.h> ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include <libintl.h> ++#endif + #include <ctype.h> + #include <sys/types.h> + #include <sys/param.h> +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c 2010-02-24 08:10:00.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c 2010-03-22 18:31:16.146907097 +0100 +@@ -36,7 +36,11 @@ + #include <stdio.h> + #include <ctype.h> + #include <string.h> ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include <libintl.h> ++#endif + #include "rpc_scan.h" + #include "rpc_parse.h" + #include "rpc_util.h" +diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile +--- eglibc-2.11.1.orig/libc/timezone/Makefile 2010-02-24 08:09:02.000000000 +0100 ++++ eglibc-2.11.1/libc/timezone/Makefile 2010-03-22 18:50:04.134408513 +0100 +@@ -69,10 +69,11 @@ + $(addprefix $(inst_zonedir)/, \ + $(posixrules-file))) + +-install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \ +- $(zonenames:%=posix/%) \ +- $(zonenames:%=right/%)) \ +- $(installed-localtime-file) $(installed-posixrules-file) ++install-others = ++#install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \ ++# $(zonenames:%=posix/%) \ ++# $(zonenames:%=right/%)) \ ++# $(installed-localtime-file) $(installed-posixrules-file) + + ifeq ($(have-ksh),yes) + install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab +@@ -181,8 +182,9 @@ + $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs)) + + $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c +- gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \ +- -DCROSS_ZIC $(compile-mkdep-flags) ++ gcc $< -c $(OUTPUT_OPTION) \ ++ $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \ ++ $(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags) + + $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs)) + gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@ diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 210c0f68a..9ad2a3b05 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -5,13 +5,6 @@ include $(TOPDIR)/rules.mk include ../rules.mk include Makefile.inc - -ifeq ($(ADK_CXX),y) -TARGET_LANGUAGES:= c,c++ -else -TARGET_LANGUAGES:= c -endif - GCC_CONFOPTS= --prefix=$(STAGING_TOOLS) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ @@ -24,23 +17,14 @@ GCC_CONFOPTS= --prefix=$(STAGING_TOOLS) \ --disable-libmudflap \ --disable-libgomp \ --disable-biarch \ + --disable-decimal-float \ --disable-multilib \ --disable-sjlj-exceptions \ - --disable-nls - -#ifeq ($(ADK_LINUX_ARM_TOMTOM),y) -#GCC_CONFOPTS+= --enable-sjlj-exceptions -#else -#GCC_CONFOPTS+= --disable-sjlj-exceptions -#endif - -ifeq ($(ADK_SSP),y) -GCC_CONFOPTS+= --enable-libssp -else -GCC_CONFOPTS+= --disable-libssp -endif + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-nls -ifeq ($(ADK_DEVICE_NO_FPU),y) +ifeq ($(ADK_TARGET_NO_FPU),y) GCC_CONFOPTS+= --with-float=soft endif @@ -50,6 +34,12 @@ endif ifeq ($(ADK_TARGET_LIB_UCLIBC),y) GCC_CONFOPTS+= --disable-tls +else +GCC_CONFOPTS+= --enable-tls +endif + +ifeq (${ADK_MAKE_PARALLEL},y) +GCC_MAKEOPTS+= -j${ADK_MAKE_JOBS} endif include ${TOPDIR}/mk/buildhlp.mk @@ -73,7 +63,7 @@ $(GCC_BUILD_DIR_MINIMAL)/.configured: $(GCC_BUILD_DIR_MINIMAL)/.compiled: $(GCC_BUILD_DIR_MINIMAL)/.configured PATH=$(TARGET_PATH) \ - $(MAKE) -C $(GCC_BUILD_DIR_MINIMAL) all-gcc + $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_MINIMAL) all-gcc touch $@ $(WRKBUILD)/.headers: $(GCC_BUILD_DIR_MINIMAL)/.compiled @@ -93,6 +83,8 @@ $(GCC_BUILD_DIR_INITIAL)/.configured: ${GCC_CONFOPTS} \ --enable-languages=c \ --disable-shared \ + --disable-threads \ + --with-newlib \ --with-sysroot=$(TOOLCHAIN_SYSROOT) \ ); touch $@ @@ -100,12 +92,12 @@ $(GCC_BUILD_DIR_INITIAL)/.configured: $(GCC_BUILD_DIR_INITIAL)/.compiled: $(GCC_BUILD_DIR_INITIAL)/.configured PATH=$(TARGET_PATH) \ - $(MAKE) -C $(GCC_BUILD_DIR_INITIAL) all + $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_INITIAL) all-gcc all-target-libgcc touch $@ $(WRKBUILD)/.configured: $(GCC_BUILD_DIR_INITIAL)/.compiled PATH=$(TARGET_PATH) \ - $(MAKE) -C $(GCC_BUILD_DIR_INITIAL) install + $(MAKE) -C $(GCC_BUILD_DIR_INITIAL) install-gcc install-target-libgcc touch $@ $(GCC_BUILD_DIR_FINAL)/.configured: @@ -114,7 +106,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured: PATH=$(TARGET_PATH) \ $(WRKBUILD)/configure \ ${GCC_CONFOPTS} \ - --enable-languages=$(TARGET_LANGUAGES) \ + --enable-languages=c,c++ \ --with-sysroot=$(STAGING_DIR) \ --with-slibdir=$(STAGING_DIR)/lib \ --enable-shared \ @@ -123,7 +115,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured: $(WRKBUILD)/.compiled: $(GCC_BUILD_DIR_FINAL)/.configured PATH=$(TARGET_PATH) \ - $(MAKE) -C $(GCC_BUILD_DIR_FINAL) all + $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_FINAL) all touch $@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled @@ -138,7 +130,7 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled cd bin; \ for app in $(REAL_GNU_TARGET_NAME)-* ; do \ ln -sf $${app} \ - $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ + $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ) touch $@ diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc index 9ef38d96e..e40fc2dec 100644 --- a/toolchain/gcc/Makefile.inc +++ b/toolchain/gcc/Makefile.inc @@ -2,8 +2,8 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= gcc -PKG_VERSION:= 4.4.1 +PKG_VERSION:= 4.4.3 PKG_RELEASE:= 1 -PKG_MD5SUM:= 927eaac3d44b22f31f9c83df82f26436 +PKG_MD5SUM:= fe1ca818fc6d2caeffc9051fe67ff103 PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/} DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/toolchain/gcc/patches/mirbsd-compat.patch b/toolchain/gcc/patches/mirbsd-compat.patch new file mode 100644 index 000000000..2f3ea0c87 --- /dev/null +++ b/toolchain/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/toolchain/gcc/patches/no-lib64.patch b/toolchain/gcc/patches/no-lib64.patch index 25ada0e4e..add17ecb8 100644 --- a/toolchain/gcc/patches/no-lib64.patch +++ b/toolchain/gcc/patches/no-lib64.patch @@ -6,7 +6,7 @@ diff -Nur gcc-4.4.1.orig/gcc/config/i386/linux64.h gcc-4.4.1/gcc/config/i386/lin #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.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 --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 0d6b7cb48..52a40fb0d 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -7,6 +7,10 @@ include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk +ifeq (${ADK_MAKE_PARALLEL},y) +GDB_MAKEOPTS+= -j${ADK_MAKE_JOBS} +endif + $(WRKBUILD)/.headers: $(WRKBUILD)/.configured: (cd $(WRKBUILD); \ @@ -32,11 +36,11 @@ $(WRKBUILD)/.configured: ); touch $@ -$(WRKBUILD)/.compiled: - $(MAKE) -C $(WRKBUILD) CFLAGS="-fPIC ${HOSTCFLAGS}" +$(WRKBUILD)/.compiled: + $(MAKE) ${GDB_MAKEOPTS} -C $(WRKBUILD) CFLAGS="-fPIC ${HOSTCFLAGS}" touch $@ -$(WRKBUILD)/.installed: +$(WRKBUILD)/.installed: install -c $(WRKBUILD)/gdb/gdb $(TARGET_CROSS)gdb cd $(STAGING_TOOLS)/bin && \ ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb diff --git a/toolchain/gdb/Makefile.inc b/toolchain/gdb/Makefile.inc index 112b62f6f..eb92d7a18 100644 --- a/toolchain/gdb/Makefile.inc +++ b/toolchain/gdb/Makefile.inc @@ -2,8 +2,8 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= gdb -PKG_VERSION:= 6.8 -PKG_MD5SUM:= c9da266b884fb8fa54df786dfaadbc7a +PKG_VERSION:= 7.0 +PKG_MD5SUM:= 3386a7b69c010785c920ffc1e9cb890a PKG_RELEASE:= 1 -MASTER_SITES:= ${MASTER_SITE_GNU:=gdb/} +PKG_SITES:= ${MASTER_SITE_GNU:=gdb/} DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/toolchain/glibc-ports/Makefile b/toolchain/glibc-ports/Makefile new file mode 100644 index 000000000..be4a39e65 --- /dev/null +++ b/toolchain/glibc-ports/Makefile @@ -0,0 +1,22 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk +include ../rules.mk +include Makefile.inc + +include ${TOPDIR}/mk/buildhlp.mk + +$(WRKBUILD)/.headers: + touch $@ + +$(WRKBUILD)/.configured: + touch $@ + +$(WRKBUILD)/.compiled: + touch $@ + +$(WRKBUILD)/.installed: + touch $@ + +include ${TOPDIR}/mk/toolchain.mk diff --git a/toolchain/glibc-ports/Makefile.inc b/toolchain/glibc-ports/Makefile.inc new file mode 100644 index 000000000..42e68663f --- /dev/null +++ b/toolchain/glibc-ports/Makefile.inc @@ -0,0 +1,8 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +PKG_NAME:= glibc-ports +PKG_VERSION:= 2.11 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 7100d8ba81c52e90e7fb4795d2f736c9 +PKG_SITES:= ${MASTER_SITE_GNU:=glibc/} diff --git a/toolchain/glibc-ports/patches/mips.patch b/toolchain/glibc-ports/patches/mips.patch new file mode 100644 index 000000000..2176a0a7e --- /dev/null +++ b/toolchain/glibc-ports/patches/mips.patch @@ -0,0 +1,41 @@ +diff -Nur glibc-ports-2.11.orig/sysdeps/mips/mips32/Makefile glibc-ports-2.11/sysdeps/mips/mips32/Makefile +--- glibc-ports-2.11.orig/sysdeps/mips/mips32/Makefile 2009-11-15 21:53:20.000000000 +0100 ++++ glibc-ports-2.11/sysdeps/mips/mips32/Makefile 2010-02-25 05:06:53.093359450 +0100 +@@ -1,3 +1,3 @@ +-ifeq ($(filter -mabi=32,$(CC)),) +-CC += -mabi=32 +-endif ++#ifeq ($(filter -mabi=32,$(CC)),) ++#CC += -mabi=32 ++#endif +diff -Nur glibc-ports-2.11.orig/sysdeps/mips/nptl/tls.h glibc-ports-2.11/sysdeps/mips/nptl/tls.h +--- glibc-ports-2.11.orig/sysdeps/mips/nptl/tls.h 2009-11-15 21:53:20.000000000 +0100 ++++ glibc-ports-2.11/sysdeps/mips/nptl/tls.h 2010-02-25 19:16:31.338162548 +0100 +@@ -55,12 +55,6 @@ + .set pop + #endif /* __ASSEMBLER__ */ + +- +-/* We require TLS support in the tools. */ +-#ifndef HAVE_TLS_SUPPORT +-# error "TLS support is required." +-#endif +- + /* Signal that TLS support is available. */ + #define USE_TLS 1 + +diff -Nur glibc-ports-2.11.orig/sysdeps/mips/preconfigure glibc-ports-2.11/sysdeps/mips/preconfigure +--- glibc-ports-2.11.orig/sysdeps/mips/preconfigure 2009-11-15 21:53:20.000000000 +0100 ++++ glibc-ports-2.11/sysdeps/mips/preconfigure 2010-02-25 05:07:40.565358364 +0100 +@@ -19,11 +19,6 @@ + 32) machine=mips/mips32/kern64 ;; + esac + machine=$machine/$config_machine +- if test $mips_config_abi != $mips_cc_abi; then +- # This won't make it to config.make, but we want to +- # set this in case configure tests depend on it. +- CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi" +- fi + ;; + mips*) base_machine=mips machine=mips/mips32/$machine ;; + esac diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 36d6f1214..bfd56f9fe 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -10,20 +10,19 @@ include ${TOPDIR}/mk/buildhlp.mk # glibc does not compile with Os TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS)) -GLIBC_CONFOPTS:= \ +GLIBC_CONFOPTS:= \ --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \ --disable-nls \ --disable-sanity-checks \ - --disable-nls \ --without-cvs \ --disable-profile \ --disable-debug \ + --enable-kernel="2.6.0" \ --without-gd \ --with-__thread \ --with-tls \ - --enable-kernel="2.6.0" \ --enable-add-ons GLIBC_ENV:= PATH='${TARGET_PATH}' \ @@ -33,39 +32,45 @@ GLIBC_ENV:= PATH='${TARGET_PATH}' \ CXX=${REAL_GNU_TARGET_NAME}-g++ \ AR=${REAL_GNU_TARGET_NAME}-ar \ RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \ - LD=${REAL_GNU_TARGET_NAME}-ld \ libc_cv_forced_unwind=yes \ libc_cv_c_cleanup=yes \ libc_cv_gnu99_inline=yes \ libc_cv_slibdir="/lib" -ifeq ($(ADK_DEVICE_NO_FPU),y) +ifeq ($(ADK_TARGET_NO_FPU),y) GLIBC_CONFOPTS+= --without-fp endif +ifeq (${ADK_MAKE_PARALLEL},y) +GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j${ADK_MAKE_JOBS}" +endif + GLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers GLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final $(WRKBUILD)/.headers_configure: mkdir -p $(GLIBC_BUILD_DIR_INITIAL) + (cd ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION); \ + ln -sf ../../w-glibc-ports-2.11-1/glibc-ports-2.11/ ports); (cd $(GLIBC_BUILD_DIR_INITIAL); \ + ${GLIBC_ENV} \ $(WRKBUILD)/configure \ - --prefix=/usr \ - --with-sysroot=$(TOOLCHAIN_SYSROOT) \ - ${GLIBC_CONFOPTS} \ + --prefix=/usr \ + --with-sysroot=$(TOOLCHAIN_SYSROOT) \ + ${GLIBC_CONFOPTS} \ ); touch $@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure - $(MAKE) -C $(GLIBC_BUILD_DIR_INITIAL) \ + mkdir -p $(TOOLCHAIN_SYSROOT)/usr/lib + -${GLIBC_ENV} $(MAKE) ${GLIBC_MAKEOPTS} -C $(GLIBC_BUILD_DIR_INITIAL) \ cross-compiling=yes \ install_root=$(TOOLCHAIN_SYSROOT) \ install-headers touch $(TOOLCHAIN_SYSROOT)/usr/include/gnu/stubs.h - touch $(TOOLCHAIN_SYSROOT)/usr/include/bits/stdio_lim.h touch $@ -$(WRKBUILD)/.configured: +$(WRKBUILD)/.configured: mkdir -p $(GLIBC_BUILD_DIR_FINAL) (cd $(GLIBC_BUILD_DIR_FINAL); \ ${GLIBC_ENV} \ @@ -78,11 +83,12 @@ $(WRKBUILD)/.configured: touch $@ $(WRKBUILD)/.compiled: - ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL) all + ${GLIBC_ENV} $(MAKE) ${GLIBC_MAKEOPTS} -C $(GLIBC_BUILD_DIR_FINAL) all touch $@ $(WRKBUILD)/.installed: - ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL) install_root=$(STAGING_DIR) install + ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL) \ + install_root=$(STAGING_DIR) install touch $(STAGING_DIR)/usr/include/gnu/stubs.h touch $@ diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc index 3ba08efa3..0a7530565 100644 --- a/toolchain/glibc/Makefile.inc +++ b/toolchain/glibc/Makefile.inc @@ -2,7 +2,7 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= glibc -PKG_VERSION:= 2.10.1 +PKG_VERSION:= 2.11.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= adfbd93cada84dc16259f4dffa60dc34 -PKG_SITES:= http://www.openadk.org/distfiles +PKG_MD5SUM:= cf60820c052b14a9c5a7816fc7dc0161 +PKG_SITES:= ${MASTER_SITE_GNU:=glibc/} diff --git a/toolchain/glibc/patches/longjmp_chk.patch b/toolchain/glibc/patches/longjmp_chk.patch new file mode 100644 index 000000000..b2590460c --- /dev/null +++ b/toolchain/glibc/patches/longjmp_chk.patch @@ -0,0 +1,56 @@ +diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S +--- glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.11/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2010-02-19 08:06:22.000000000 +0100 +@@ -33,10 +33,10 @@ + cfi_register(%ebx,%ecx); \ + LOAD_PIC_REG (bx); \ + leal longjmp_msg@GOTOFF(%ebx), %eax; \ +- call __GI___fortify_fail@PLT ++ call HIDDEN_JUMPTARGET(__fortify_fail) + #else + # define CALL_FAIL movl $longjmp_msg, %eax; \ +- call __fortify_fail ++ call HIDDEN_JUMPTARGET(__fortify_fail) + #endif + + +diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S +--- glibc-2.11.orig/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.11/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S 2010-02-19 08:06:22.000000000 +0100 +@@ -30,19 +30,13 @@ + + #define __longjmp ____longjmp_chk + +-#ifdef PIC +-# define CALL_FAIL __GI___fortify_fail +-#else +-# define CALL_FAIL __fortify_fail +-#endif +- + #define CHECK_RSP(reg) \ + cmp.ltu p0, p8 = reg, r12; \ + (p8) br.cond.dpnt .Lok;; \ + addl r28 = @ltoffx(longjmp_msg#), r1;; \ + ld8.mov r28 = [r28], longjmp_msg#;; \ + ld8 out0 = [r28]; \ +- br.call.sptk.many b0 = CALL_FAIL#;; \ ++ br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \ + .Lok: + + #include "__longjmp.S" +diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S +--- glibc-2.11.orig/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.11/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2010-02-19 08:06:22.000000000 +0100 +@@ -31,10 +31,10 @@ + + #ifdef PIC + # define CALL_FAIL leaq longjmp_msg(%rip), %rdi; \ +- call __GI___fortify_fail ++ call HIDDEN_JUMPTARGET(__fortify_fail) + #else + # define CALL_FAIL movq $longjmp_msg, %rdi; \ +- call __fortify_fail ++ call HIDDEN_JUMPTARGET(__fortify_fail) + #endif + + #define CHECK_RSP(reg) \ diff --git a/toolchain/glibc/patches/mips-compile-error.patch b/toolchain/glibc/patches/mips-compile-error.patch deleted file mode 100644 index a07aab16a..000000000 --- a/toolchain/glibc/patches/mips-compile-error.patch +++ /dev/null @@ -1,577 +0,0 @@ -diff -Nur glibc-2.10.1/ports/sysdeps/mips/dl-lookup.c glibc-2.10.90/ports/sysdeps/mips/dl-lookup.c ---- glibc-2.10.1/ports/sysdeps/mips/dl-lookup.c 2009-08-20 08:59:52.000000000 +0200 -+++ glibc-2.10.90/ports/sysdeps/mips/dl-lookup.c 2009-05-26 22:53:27.000000000 +0200 -@@ -1,6 +1,9 @@ - /* Look up a symbol in the loaded objects. -- MIPS/Linux version - special handling of non-PIC undefined symbol rules. -- Copyright (C) 1995-2005, 2006, 2007, 2009 Free Software Foundation, Inc. -+ MIPS/Linux version - this is identical to the common version, but -+ because it is in sysdeps/mips, it gets sysdeps/mips/do-lookup.h. -+ Using <do-lookup.h> instead of "do-lookup.h" would work too. -+ -+ Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -70,387 +73,8 @@ - #endif - - --/* Inner part of the lookup functions. We return a value > 0 if we -- found the symbol, the value 0 if nothing is found and < 0 if -- something bad happened. */ --static int --__attribute_noinline__ --do_lookup_x (const char *undef_name, uint_fast32_t new_hash, -- unsigned long int *old_hash, const ElfW(Sym) *ref, -- struct sym_val *result, struct r_scope_elem *scope, size_t i, -- const struct r_found_version *const version, int flags, -- struct link_map *skip, int type_class, struct link_map *undef_map) --{ -- size_t n = scope->r_nlist; -- /* Make sure we read the value before proceeding. Otherwise we -- might use r_list pointing to the initial scope and r_nlist being -- the value after a resize. That is the only path in dl-open.c not -- protected by GSCOPE. A read barrier here might be to expensive. */ -- __asm volatile ("" : "+r" (n), "+m" (scope->r_list)); -- struct link_map **list = scope->r_list; -- -- do -- { -- /* These variables are used in the nested function. */ -- Elf_Symndx symidx; -- int num_versions = 0; -- const ElfW(Sym) *versioned_sym = NULL; -- -- const struct link_map *map = list[i]->l_real; -- -- /* Here come the extra test needed for `_dl_lookup_symbol_skip'. */ -- if (map == skip) -- continue; -- -- /* Don't search the executable when resolving a copy reloc. */ -- if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable) -- continue; -- -- /* Do not look into objects which are going to be removed. */ -- if (map->l_removed) -- continue; -- -- /* Print some debugging info if wanted. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0)) -- _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", -- undef_name, -- map->l_name[0] ? map->l_name : rtld_progname, -- map->l_ns); -- -- /* If the hash table is empty there is nothing to do here. */ -- if (map->l_nbuckets == 0) -- continue; -- -- /* The tables for this map. */ -- const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); -- const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); -- -- -- /* Nested routine to check whether the symbol matches. */ -- const ElfW(Sym) * -- __attribute_noinline__ -- check_match (const ElfW(Sym) *sym) -- { -- unsigned int stt = ELFW(ST_TYPE) (sym->st_info); -- assert (ELF_RTYPE_CLASS_PLT == 1); -- /* The semantics of zero/non-zero values of undefined symbols -- differs depending on whether the non-PIC ABI is in use. -- Under the non-PIC ABI, a non-zero value indicates that -- there is an address reference to the symbol and thus it -- must always be resolved (except when resolving a jump slot -- relocation) to the PLT entry whose address is provided as -- the symbol's value; a zero value indicates that this -- canonical-address behaviour is not required. Yet under the -- classic MIPS psABI, a zero value indicates that there is an -- address reference to the function and the dynamic linker -- must resolve the symbol immediately upon loading. To avoid -- conflict, symbols for which the dynamic linker must assume -- the non-PIC ABI semantics are marked with the STO_MIPS_PLT -- flag. */ -- if (__builtin_expect ((sym->st_value == 0 /* No value. */ -- && stt != STT_TLS) -- || (sym->st_shndx == SHN_UNDEF -- && !(sym->st_other & STO_MIPS_PLT)) -- || (type_class & (sym->st_shndx == SHN_UNDEF)), -- 0)) -- return NULL; -- -- /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC, -- STT_COMMON, STT_TLS, and STT_GNU_IFUNC since these are no -- code/data definitions. */ --#define ALLOWED_STT \ -- ((1 << STT_NOTYPE) | (1 << STT_OBJECT) | (1 << STT_FUNC) \ -- | (1 << STT_COMMON) | (1 << STT_TLS) | (1 << STT_GNU_IFUNC)) -- if (__builtin_expect (((1 << stt) & ALLOWED_STT) == 0, 0)) -- return NULL; -- -- if (sym != ref && strcmp (strtab + sym->st_name, undef_name)) -- /* Not the symbol we are looking for. */ -- return NULL; -- -- const ElfW(Half) *verstab = map->l_versyms; -- if (version != NULL) -- { -- if (__builtin_expect (verstab == NULL, 0)) -- { -- /* We need a versioned symbol but haven't found any. If -- this is the object which is referenced in the verneed -- entry it is a bug in the library since a symbol must -- not simply disappear. -- -- It would also be a bug in the object since it means that -- the list of required versions is incomplete and so the -- tests in dl-version.c haven't found a problem.*/ -- assert (version->filename == NULL -- || ! _dl_name_match_p (version->filename, map)); -- -- /* Otherwise we accept the symbol. */ -- } -- else -- { -- /* We can match the version information or use the -- default one if it is not hidden. */ -- ElfW(Half) ndx = verstab[symidx] & 0x7fff; -- if ((map->l_versions[ndx].hash != version->hash -- || strcmp (map->l_versions[ndx].name, version->name)) -- && (version->hidden || map->l_versions[ndx].hash -- || (verstab[symidx] & 0x8000))) -- /* It's not the version we want. */ -- return NULL; -- } -- } -- else -- { -- /* No specific version is selected. There are two ways we -- can got here: -- -- - a binary which does not include versioning information -- is loaded -- -- - dlsym() instead of dlvsym() is used to get a symbol which -- might exist in more than one form -- -- If the library does not provide symbol version information -- there is no problem at at: we simply use the symbol if it -- is defined. -- -- These two lookups need to be handled differently if the -- library defines versions. In the case of the old -- unversioned application the oldest (default) version -- should be used. In case of a dlsym() call the latest and -- public interface should be returned. */ -- if (verstab != NULL) -- { -- if ((verstab[symidx] & 0x7fff) -- >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3)) -- { -- /* Don't accept hidden symbols. */ -- if ((verstab[symidx] & 0x8000) == 0 -- && num_versions++ == 0) -- /* No version so far. */ -- versioned_sym = sym; -- -- return NULL; -- } -- } -- } -- -- /* There cannot be another entry for this symbol so stop here. */ -- return sym; -- } -- -- const ElfW(Sym) *sym; -- const ElfW(Addr) *bitmask = map->l_gnu_bitmask; -- if (__builtin_expect (bitmask != NULL, 1)) -- { -- ElfW(Addr) bitmask_word -- = bitmask[(new_hash / __ELF_NATIVE_CLASS) -- & map->l_gnu_bitmask_idxbits]; -- -- unsigned int hashbit1 = new_hash & (__ELF_NATIVE_CLASS - 1); -- unsigned int hashbit2 = ((new_hash >> map->l_gnu_shift) -- & (__ELF_NATIVE_CLASS - 1)); -- -- if (__builtin_expect ((bitmask_word >> hashbit1) -- & (bitmask_word >> hashbit2) & 1, 0)) -- { -- Elf32_Word bucket = map->l_gnu_buckets[new_hash -- % map->l_nbuckets]; -- if (bucket != 0) -- { -- const Elf32_Word *hasharr = &map->l_gnu_chain_zero[bucket]; -- -- do -- if (((*hasharr ^ new_hash) >> 1) == 0) -- { -- symidx = hasharr - map->l_gnu_chain_zero; -- sym = check_match (&symtab[symidx]); -- if (sym != NULL) -- goto found_it; -- } -- while ((*hasharr++ & 1u) == 0); -- } -- } -- /* No symbol found. */ -- symidx = SHN_UNDEF; -- } -- else -- { -- if (*old_hash == 0xffffffff) -- *old_hash = _dl_elf_hash (undef_name); -- -- /* Use the old SysV-style hash table. Search the appropriate -- hash bucket in this object's symbol table for a definition -- for the same symbol name. */ -- for (symidx = map->l_buckets[*old_hash % map->l_nbuckets]; -- symidx != STN_UNDEF; -- symidx = map->l_chain[symidx]) -- { -- sym = check_match (&symtab[symidx]); -- if (sym != NULL) -- goto found_it; -- } -- } -- -- /* If we have seen exactly one versioned symbol while we are -- looking for an unversioned symbol and the version is not the -- default version we still accept this symbol since there are -- no possible ambiguities. */ -- sym = num_versions == 1 ? versioned_sym : NULL; -- -- if (sym != NULL) -- { -- found_it: -- switch (__builtin_expect (ELFW(ST_BIND) (sym->st_info), STB_GLOBAL)) -- { -- case STB_WEAK: -- /* Weak definition. Use this value if we don't find another. */ -- if (__builtin_expect (GLRO(dl_dynamic_weak), 0)) -- { -- if (! result->s) -- { -- result->s = sym; -- result->m = (struct link_map *) map; -- } -- break; -- } -- /* FALLTHROUGH */ -- case STB_GLOBAL: -- success: -- /* Global definition. Just what we need. */ -- result->s = sym; -- result->m = (struct link_map *) map; -- return 1; -- -- case STB_GNU_UNIQUE:; -- /* We have to determine whether we already found a -- symbol with this name before. If not then we have to -- add it to the search table. If we already found a -- definition we have to use it. */ -- void enter (struct unique_sym *table, size_t size, -- unsigned int hash, const char *name, -- const ElfW(Sym) *sym, const struct link_map *map) -- { -- size_t idx = hash % size; -- size_t hash2 = 1 + hash % (size - 2); -- while (1) -- { -- if (table[idx].hashval == 0) -- { -- table[idx].hashval = hash; -- table[idx].name = strtab + sym->st_name; -- if ((type_class & ELF_RTYPE_CLASS_COPY) != 0) -- { -- table[idx].sym = ref; -- table[idx].map = undef_map; -- } -- else -- { -- table[idx].sym = sym; -- table[idx].map = map; -- } -- return; -- } -- -- idx += hash2; -- if (idx >= size) -- idx -= size; -- } -- } -- -- struct unique_sym_table *tab -- = &GL(dl_ns)[map->l_ns]._ns_unique_sym_table; -- -- __rtld_lock_lock_recursive (tab->lock); -- -- struct unique_sym *entries = tab->entries; -- size_t size = tab->size; -- if (entries != NULL) -- { -- size_t idx = new_hash % size; -- size_t hash2 = 1 + new_hash % (size - 2); -- while (1) -- { -- if (entries[idx].hashval == new_hash -- && strcmp (entries[idx].name, undef_name) == 0) -- { -- result->s = entries[idx].sym; -- result->m = (struct link_map *) entries[idx].map; -- __rtld_lock_unlock_recursive (tab->lock); -- return 1; -- } -- -- if (entries[idx].hashval == 0 -- && entries[idx].name == NULL) -- break; -- -- idx += hash2; -- if (idx >= size) -- idx -= size; -- } -- -- if (size * 3 <= tab->n_elements) -- { -- /* Expand the table. */ -- size_t newsize = _dl_higher_prime_number (size); -- struct unique_sym *newentries -- = calloc (sizeof (struct unique_sym), newsize); -- if (newentries == NULL) -- { -- nomem: -- __rtld_lock_unlock_recursive (tab->lock); -- _dl_fatal_printf ("out of memory\n"); -- } -- -- for (idx = 0; idx < size; ++idx) -- if (entries[idx].hashval != 0) -- enter (newentries, newsize, entries[idx].hashval, -- entries[idx].name, entries[idx].sym, -- entries[idx].map); -- -- tab->free (entries); -- tab->size = newsize; -- entries = tab->entries = newentries; -- tab->free = free; -- } -- } -- else -- { --#define INITIAL_NUNIQUE_SYM_TABLE 31 -- size = INITIAL_NUNIQUE_SYM_TABLE; -- entries = calloc (sizeof (struct unique_sym), size); -- if (entries == NULL) -- goto nomem; -- -- tab->entries = entries; -- tab->size = size; -- tab->free = free; -- } -- -- enter (entries, size, new_hash, strtab + sym->st_name, sym, map); -- ++tab->n_elements; -- -- __rtld_lock_unlock_recursive (tab->lock); -- -- goto success; -- -- default: -- /* Local symbols are ignored. */ -- break; -- } -- } -- -- /* If this current map is the one mentioned in the verneed entry -- and we have not found a weak entry, it is a bug. */ -- if (symidx == STN_UNDEF && version != NULL && version->filename != NULL -- && __builtin_expect (_dl_name_match_p (version->filename, map), 0)) -- return -1; -- } -- while (++i < n); -- -- /* We have not found anything until now. */ -- return 0; --} -+/* The actual lookup code. */ -+#include "do-lookup.h" - - - static uint_fast32_t -@@ -717,7 +341,7 @@ - { - int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref, - ¤t_value, *scope, start, version, flags, -- skip_map, type_class, undef_map); -+ skip_map, type_class); - if (res > 0) - break; - -@@ -790,7 +414,7 @@ - for (scope = symbol_scope; *scope != NULL; i = 0, ++scope) - if (do_lookup_x (undef_name, new_hash, &old_hash, *ref, - &protected_value, *scope, i, version, flags, -- skip_map, ELF_RTYPE_CLASS_PLT, NULL) != 0) -+ skip_map, ELF_RTYPE_CLASS_PLT) != 0) - break; - - if (protected_value.s != NULL && protected_value.m != undef_map) -@@ -916,26 +540,21 @@ - - do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val, - undef_map->l_local_scope[0], 0, version, 0, NULL, -- type_class, undef_map); -+ type_class); - - if (val.s != value->s || val.m != value->m) - conflict = 1; - } - -- if (value->s) -- { -- if (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) -- == STT_TLS, 0)) -- type_class = 4; -- else if (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) -- == STT_GNU_IFUNC, 0)) -- type_class |= 8; -- } -+ if (value->s -+ && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) -+ == STT_TLS, 0))) -+ type_class = 4; - - if (conflict - || GLRO(dl_trace_prelink_map) == undef_map - || GLRO(dl_trace_prelink_map) == NULL -- || type_class >= 4) -+ || type_class == 4) - { - _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ", - conflict ? "conflict" : "lookup", -diff -Nur glibc-2.10.1/ports/sysdeps/mips/do-lookup.h glibc-2.10.90/ports/sysdeps/mips/do-lookup.h ---- glibc-2.10.1/ports/sysdeps/mips/do-lookup.h 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.10.90/ports/sysdeps/mips/do-lookup.h 2009-05-26 22:53:27.000000000 +0200 -@@ -0,0 +1,37 @@ -+/* MIPS-specific veneer to GLIBC's do-lookup.h. -+ Copyright (C) 2008 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+/* The semantics of zero/non-zero values of undefined symbols differs -+ depending on whether the non-PIC ABI is in use. Under the non-PIC ABI, -+ a non-zero value indicates that there is an address reference to the -+ symbol and thus it must always be resolved (except when resolving a jump -+ slot relocation) to the PLT entry whose address is provided as the -+ symbol's value; a zero value indicates that this canonical-address -+ behaviour is not required. Yet under the classic MIPS psABI, a zero value -+ indicates that there is an address reference to the function and the -+ dynamic linker must resolve the symbol immediately upon loading. To -+ avoid conflict, symbols for which the dynamic linker must assume the -+ non-PIC ABI semantics are marked with the STO_MIPS_PLT flag. The -+ following ugly hack causes the code in the platform-independent -+ do-lookup.h file to check this flag correctly. */ -+#define st_value st_shndx == SHN_UNDEF && !(sym->st_other & STO_MIPS_PLT)) \ -+ || (sym->st_value -+#include_next "do-lookup.h" -+#undef st_value -+ -diff -Nur glibc-2.10.1/ports/sysdeps/mips/__longjmp.c glibc-2.10.90/ports/sysdeps/mips/__longjmp.c ---- glibc-2.10.1/ports/sysdeps/mips/__longjmp.c 2009-08-20 08:59:52.000000000 +0200 -+++ glibc-2.10.90/ports/sysdeps/mips/__longjmp.c 2009-05-26 22:53:26.000000000 +0200 -@@ -25,19 +25,19 @@ - #endif - - void --__longjmp (env_arg, val_arg) -- __jmp_buf env_arg; -+__longjmp (env, val_arg) -+ __jmp_buf env; - int val_arg; - { - /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before - the hack around it); force it to use $a1 for the longjmp value. - Without this it saves $a1 in a register which gets clobbered - along the way. */ -- register struct __jmp_buf_internal_tag *env asm ("a0"); - register int val asm ("a1"); - #ifdef CHECK_SP - register long sp asm ("$29"); -- CHECK_SP (env[0].__sp, sp, long); -+ if ((long) (env[0].__sp) < sp) -+ __fortify_fail ("longjmp causes uninitialized stack frame"); - #endif - - #ifdef __mips_hard_float -diff -Nur glibc-2.10.1/ports/sysdeps/mips/____longjmp_chk.c glibc-2.10.90/ports/sysdeps/mips/____longjmp_chk.c ---- glibc-2.10.1/ports/sysdeps/mips/____longjmp_chk.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.10.90/ports/sysdeps/mips/____longjmp_chk.c 2009-05-26 22:53:26.000000000 +0200 -@@ -0,0 +1,22 @@ -+/* Copyright (C) 2009 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include <stdio.h> -+#define __longjmp ____longjmp_chk -+#define CHECK_SP -+#include <__longjmp.c> -diff -Nur glibc-2.10.1/ports/sysdeps/mips/mips64/__longjmp.c glibc-2.10.90/ports/sysdeps/mips/mips64/__longjmp.c ---- glibc-2.10.1/ports/sysdeps/mips/mips64/__longjmp.c 2009-08-20 08:59:52.000000000 +0200 -+++ glibc-2.10.90/ports/sysdeps/mips/mips64/__longjmp.c 2009-05-26 22:53:27.000000000 +0200 -@@ -27,19 +27,19 @@ - #endif - - void --__longjmp (env_arg, val_arg) -- __jmp_buf env_arg; -+__longjmp (env, val_arg) -+ __jmp_buf env; - int val_arg; - { - /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before - the hack around it); force it to use $a1 for the longjmp value. - Without this it saves $a1 in a register which gets clobbered - along the way. */ -- register struct __jmp_buf_internal_tag *env asm ("a0"); - register int val asm ("a1"); - #ifdef CHECK_SP - register long long sp asm ("$29"); -- CHECK_SP (env[0].__sp, sp, long long); -+ if ((long long) (env[0].__sp) < sp) -+ __fortify_fail ("longjmp causes uninitialized stack frame"); - #endif - - #ifdef __mips_hard_float diff --git a/toolchain/glibc/patches/mips32.patch b/toolchain/glibc/patches/mips32.patch deleted file mode 100644 index d06bc7aad..000000000 --- a/toolchain/glibc/patches/mips32.patch +++ /dev/null @@ -1,7 +0,0 @@ -diff -Nur glibc-2.10-current.orig/ports/sysdeps/mips/mips32/Makefile glibc-2.10-current/ports/sysdeps/mips/mips32/Makefile ---- glibc-2.10-current.orig/ports/sysdeps/mips/mips32/Makefile 2009-05-26 22:53:27.000000000 +0200 -+++ glibc-2.10-current/ports/sysdeps/mips/mips32/Makefile 2009-05-30 13:59:48.000000000 +0200 -@@ -1,3 +0,0 @@ --ifeq ($(filter -mabi=32,$(CC)),) --CC += -mabi=32 --endif diff --git a/toolchain/glibc/patches/mips64.patch b/toolchain/glibc/patches/mips64.patch deleted file mode 100644 index 0b53244b9..000000000 --- a/toolchain/glibc/patches/mips64.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -Nur glibc-2.10-current.orig/ports/sysdeps/mips/mips64/n32/Makefile glibc-2.10-current/ports/sysdeps/mips/mips64/n32/Makefile ---- glibc-2.10-current.orig/ports/sysdeps/mips/mips64/n32/Makefile 2009-05-26 22:53:27.000000000 +0200 -+++ glibc-2.10-current/ports/sysdeps/mips/mips64/n32/Makefile 2009-05-27 02:23:06.000000000 +0200 -@@ -1,6 +1,2 @@ - # `long double' is a distinct type we support. - long-double-fcts = yes -- --ifeq ($(filter -mabi=n32,$(CC)),) --CC += -mabi=n32 --endif -diff -Nur glibc-2.10-current.orig/ports/sysdeps/mips/mips64/n64/Makefile glibc-2.10-current/ports/sysdeps/mips/mips64/n64/Makefile ---- glibc-2.10-current.orig/ports/sysdeps/mips/mips64/n64/Makefile 2009-05-26 22:53:27.000000000 +0200 -+++ glibc-2.10-current/ports/sysdeps/mips/mips64/n64/Makefile 2009-05-27 02:20:00.000000000 +0200 -@@ -1,6 +1,2 @@ - # `long double' is a distinct type we support. - long-double-fcts = yes -- --ifeq ($(filter -mabi=64,$(CC)),) --CC += -mabi=64 --endif -diff -Nur glibc-2.10-current.orig/ports/sysdeps/mips/preconfigure glibc-2.10-current/ports/sysdeps/mips/preconfigure ---- glibc-2.10-current.orig/ports/sysdeps/mips/preconfigure 2009-05-26 22:53:27.000000000 +0200 -+++ glibc-2.10-current/ports/sysdeps/mips/preconfigure 2009-05-27 02:20:14.000000000 +0200 -@@ -22,7 +22,7 @@ - if test $mips_config_abi != $mips_cc_abi; then - # This won't make it to config.make, but we want to - # set this in case configure tests depend on it. -- CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi" -+ CPPFLAGS="$CPPFLAGS" - fi - ;; - mips*) base_machine=mips machine=mips/mips32/$machine ;; diff --git a/toolchain/glibc/patches/stdio_lim.patch b/toolchain/glibc/patches/stdio_lim.patch new file mode 100644 index 000000000..41f8447dc --- /dev/null +++ b/toolchain/glibc/patches/stdio_lim.patch @@ -0,0 +1,31 @@ +diff -Nur glibc-2.11.orig/stdio-common/Makefile glibc-2.11/stdio-common/Makefile +--- glibc-2.11.orig/stdio-common/Makefile 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.11/stdio-common/Makefile 2009-12-30 23:52:08.000000000 +0100 +@@ -21,7 +21,7 @@ + # + subdir := stdio-common + +-headers := stdio_ext.h printf.h bits/printf-ldbl.h ++headers := stdio_ext.h printf.h bits/printf-ldbl.h bits/stdio_lim.h + + routines := \ + ctermid cuserid \ +@@ -40,8 +40,6 @@ + isoc99_vsscanf \ + psiginfo + +-install-others = $(inst_includedir)/bits/stdio_lim.h +- + include ../Makeconfig + + aux := errlist siglist printf-parsemb printf-parsewc fxprintf +@@ -66,9 +64,6 @@ + + include ../Rules + +-$(inst_includedir)/bits/stdio_lim.h: $(common-objpfx)bits/stdio_lim.h $(+force) +- $(do-install) +- + ifeq ($(cross-compiling),no) + .PHONY: do-tst-unbputc do-tst-printf + tests: do-tst-unbputc do-tst-printf diff --git a/toolchain/gmp/Makefile b/toolchain/gmp/Makefile index bbe26f14d..5b359b8cf 100644 --- a/toolchain/gmp/Makefile +++ b/toolchain/gmp/Makefile @@ -2,12 +2,16 @@ # material, please see the LICENCE file in the top-level directory. include $(TOPDIR)/rules.mk -include ../rules.mk include Makefile.inc +include ../rules.mk include ${TOPDIR}/mk/buildhlp.mk -$(WRKBUILD)/.headers: -$(WRKBUILD)/.configured: +ifeq (${ADK_MAKE_PARALLEL},y) +GMP_MAKEOPTS+= -j${ADK_MAKE_JOBS} +endif + +$(WRKBUILD)/.headers: +$(WRKBUILD)/.configured: (cd $(WRKBUILD); \ $(WRKBUILD)/configure \ --prefix=$(STAGING_TOOLS) \ @@ -20,7 +24,7 @@ $(WRKBUILD)/.configured: touch $@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured - $(MAKE) -C $(WRKBUILD) all + $(MAKE) ${GMP_MAKEOPTS} -C $(WRKBUILD) all touch $@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled diff --git a/toolchain/gmp/Makefile.inc b/toolchain/gmp/Makefile.inc index ea02b2d0e..29d2e2a68 100644 --- a/toolchain/gmp/Makefile.inc +++ b/toolchain/gmp/Makefile.inc @@ -2,9 +2,9 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= gmp -PKG_VERSION:= 4.3.1 +PKG_VERSION:= 4.3.2 PKG_RELEASE:= 1 -PKG_MD5SUM:= 26cec15a90885042dd4a15c4003b08ae +PKG_MD5SUM:= dd60683d7057917e34630b4a787932e8 PKG_SITES:= ${MASTER_SITE_GNU:=gmp/} DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 -GMP_BUILD_DIR:= $(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +GMP_BUILD_DIR:= $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index 400141524..794351862 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -7,15 +7,18 @@ include $(TOPDIR)/mk/linux.mk include ${TOPDIR}/mk/buildhlp.mk $(WRKBUILD)/.headers: - $(MAKE) -C $(WRKBUILD) ARCH=$(ARCH) V=1 \ + $(MAKE) -C $(WRKBUILD) HOSTCC=$(HOSTCC) ARCH=$(ARCH) V=1 \ INSTALL_HDR_PATH=$(STAGING_DIR)/usr \ headers_install - $(MAKE) -C $(WRKBUILD) ARCH=$(ARCH) V=1 \ + $(MAKE) -C $(WRKBUILD) HOSTCC=$(HOSTCC) ARCH=$(ARCH) V=1 \ INSTALL_HDR_PATH=$(TOOLCHAIN_SYSROOT)/usr \ headers_install + $(MAKE) -C $(WRKBUILD) HOSTCC=$(HOSTCC) ARCH=$(ARCH) V=1 \ + INSTALL_HDR_PATH=$(LINUX_HEADER_DIR) \ + headers_install # cryptodev.h from ocf-linux-20080917 - mkdir -p ${STAGING_DIR}/include/crypto - cp files/cryptodev.h ${STAGING_DIR}/include/crypto/ + mkdir -p ${STAGING_DIR}/usr/include/crypto + cp files/cryptodev.h ${STAGING_DIR}/usr/include/crypto/ ifeq ($(ARCH),cris) ifeq ($(CPU_ARCH),crisv32) cd $(STAGING_DIR)/usr/include && ln -sf arch-v32/arch arch diff --git a/toolchain/kernel-headers/patches/etrax-header.patch b/toolchain/kernel-headers/patches/etrax-header.patch index fadcf5d53..3672cf60b 100644 --- a/toolchain/kernel-headers/patches/etrax-header.patch +++ b/toolchain/kernel-headers/patches/etrax-header.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.28.orig/arch/cris/include/arch-v10/arch/Kbuild linux-2.6.28/arch/cris/include/arch-v10/arch/Kbuild ---- linux-2.6.28.orig/arch/cris/include/arch-v10/arch/Kbuild 2008-12-25 00:26:37.000000000 +0100 -+++ linux-2.6.28/arch/cris/include/arch-v10/arch/Kbuild 2008-12-29 20:49:24.000000000 +0100 +diff -Nur linux-2.6.31.4.orig/arch/cris/include/arch-v10/arch/Kbuild linux-2.6.31.4/arch/cris/include/arch-v10/arch/Kbuild +--- linux-2.6.31.4.orig/arch/cris/include/arch-v10/arch/Kbuild 2009-10-12 22:15:40.000000000 +0200 ++++ linux-2.6.31.4/arch/cris/include/arch-v10/arch/Kbuild 2009-10-25 09:57:06.167232146 +0100 @@ -1,4 +1,9 @@ +header-y += dma.h +header-y += io_interface_mux.h @@ -11,9 +11,9 @@ diff -Nur linux-2.6.28.orig/arch/cris/include/arch-v10/arch/Kbuild linux-2.6.28/ +header-y += elf.h +header-y += page.h +header-y += ptrace.h -diff -Nur linux-2.6.28.orig/arch/cris/include/arch-v32/arch/Kbuild linux-2.6.28/arch/cris/include/arch-v32/arch/Kbuild ---- linux-2.6.28.orig/arch/cris/include/arch-v32/arch/Kbuild 2008-12-25 00:26:37.000000000 +0100 -+++ linux-2.6.28/arch/cris/include/arch-v32/arch/Kbuild 2008-12-29 20:48:51.000000000 +0100 +diff -Nur linux-2.6.31.4.orig/arch/cris/include/arch-v32/arch/Kbuild linux-2.6.31.4/arch/cris/include/arch-v32/arch/Kbuild +--- linux-2.6.31.4.orig/arch/cris/include/arch-v32/arch/Kbuild 2009-10-12 22:15:40.000000000 +0200 ++++ linux-2.6.31.4/arch/cris/include/arch-v32/arch/Kbuild 2009-10-25 09:57:06.167232146 +0100 @@ -1,2 +1,6 @@ header-y += user.h header-y += cryptocop.h @@ -21,9 +21,9 @@ diff -Nur linux-2.6.28.orig/arch/cris/include/arch-v32/arch/Kbuild linux-2.6.28/ +header-y += page.h +header-y += ptrace.h + -diff -Nur linux-2.6.28.orig/arch/cris/include/asm/Kbuild linux-2.6.28/arch/cris/include/asm/Kbuild ---- linux-2.6.28.orig/arch/cris/include/asm/Kbuild 2008-12-25 00:26:37.000000000 +0100 -+++ linux-2.6.28/arch/cris/include/asm/Kbuild 2008-12-29 20:48:51.000000000 +0100 +diff -Nur linux-2.6.31.4.orig/arch/cris/include/asm/Kbuild linux-2.6.31.4/arch/cris/include/asm/Kbuild +--- linux-2.6.31.4.orig/arch/cris/include/asm/Kbuild 2009-10-12 22:15:40.000000000 +0200 ++++ linux-2.6.31.4/arch/cris/include/asm/Kbuild 2009-10-25 09:57:06.167232146 +0100 @@ -1,11 +1,14 @@ include include/asm-generic/Kbuild.asm @@ -41,28 +41,33 @@ diff -Nur linux-2.6.28.orig/arch/cris/include/asm/Kbuild linux-2.6.28/arch/cris/ unifdef-y += etraxgpio.h unifdef-y += rs485.h -diff -Nur linux-2.6.28.orig/include/asm-generic/Kbuild linux-2.6.28/include/asm-generic/Kbuild ---- linux-2.6.28.orig/include/asm-generic/Kbuild 2008-12-25 00:26:37.000000000 +0100 -+++ linux-2.6.28/include/asm-generic/Kbuild 2008-12-29 20:48:51.000000000 +0100 -@@ -2,8 +2,10 @@ +diff -Nur linux-2.6.31.4.orig/include/asm-generic/Kbuild linux-2.6.31.4/include/asm-generic/Kbuild +--- linux-2.6.31.4.orig/include/asm-generic/Kbuild 2009-10-12 22:15:40.000000000 +0200 ++++ linux-2.6.31.4/include/asm-generic/Kbuild 2009-10-25 10:00:20.743354404 +0100 +@@ -3,12 +3,15 @@ + header-y += errno-base.h header-y += errno.h header-y += fcntl.h ++header-y += getorder.h header-y += ioctl.h + header-y += ioctls.h + header-y += ipcbuf.h +header-y += memory_model.h + header-y += mman-common.h header-y += mman.h - header-y += poll.h + header-y += msgbuf.h +header-y += page.h - header-y += signal.h - header-y += statfs.h - -diff -Nur linux-2.6.28.orig/include/linux/Kbuild linux-2.6.28/include/linux/Kbuild ---- linux-2.6.28.orig/include/linux/Kbuild 2008-12-25 00:26:37.000000000 +0100 -+++ linux-2.6.28/include/linux/Kbuild 2008-12-29 20:48:51.000000000 +0100 -@@ -158,6 +158,7 @@ + header-y += param.h + header-y += poll.h + header-y += posix_types.h +diff -Nur linux-2.6.31.4.orig/include/linux/Kbuild linux-2.6.31.4/include/linux/Kbuild +--- linux-2.6.31.4.orig/include/linux/Kbuild 2009-10-12 22:15:40.000000000 +0200 ++++ linux-2.6.31.4/include/linux/Kbuild 2009-10-25 09:57:06.207234174 +0100 +@@ -160,6 +160,7 @@ header-y += udf_fs_i.h header-y += ultrasound.h header-y += un.h +header-y += user.h header-y += utime.h header-y += veth.h - header-y += video_decoder.h + header-y += videotext.h diff --git a/toolchain/kernel-headers/patches/linux-gcc-check.patch b/toolchain/kernel-headers/patches/linux-gcc-check.patch new file mode 100644 index 000000000..7cc381845 --- /dev/null +++ b/toolchain/kernel-headers/patches/linux-gcc-check.patch @@ -0,0 +1,18 @@ +diff -Nur linux-2.6.32.orig/arch/mips/include/asm/sgidefs.h linux-2.6.32/arch/mips/include/asm/sgidefs.h +--- linux-2.6.32.orig/arch/mips/include/asm/sgidefs.h 2009-12-03 04:51:21.000000000 +0100 ++++ linux-2.6.32/arch/mips/include/asm/sgidefs.h 2010-02-14 11:49:21.000000000 +0100 +@@ -11,14 +11,6 @@ + #define __ASM_SGIDEFS_H + + /* +- * Using a Linux compiler for building Linux seems logic but not to +- * everybody. +- */ +-#ifndef __linux__ +-#error Use a Linux compiler or give up. +-#endif +- +-/* + * Definitions for the ISA levels + * + * With the introduction of MIPS32 / MIPS64 instruction sets definitions diff --git a/toolchain/kernel-headers/patches/scsi-header.patch b/toolchain/kernel-headers/patches/scsi-header.patch new file mode 100644 index 000000000..9173b242d --- /dev/null +++ b/toolchain/kernel-headers/patches/scsi-header.patch @@ -0,0 +1,41 @@ +diff -Nur linux-2.6.32.orig/include/scsi/Kbuild linux-2.6.32/include/scsi/Kbuild +--- linux-2.6.32.orig/include/scsi/Kbuild 2009-12-03 04:51:21.000000000 +0100 ++++ linux-2.6.32/include/scsi/Kbuild 2009-12-03 19:46:03.000000000 +0100 +@@ -1,3 +1,5 @@ ++header-y += sg.h ++header-y += scsi_ioctl.h + header-y += scsi.h + header-y += scsi_netlink.h + header-y += scsi_netlink_fc.h +diff -Nur linux-2.6.32.orig/include/scsi/scsi.h linux-2.6.32/include/scsi/scsi.h +--- linux-2.6.32.orig/include/scsi/scsi.h 2009-12-03 04:51:21.000000000 +0100 ++++ linux-2.6.32/include/scsi/scsi.h 2009-12-03 19:47:49.000000000 +0100 +@@ -143,6 +143,8 @@ + + #define SCSI_MAX_VARLEN_CDB_SIZE 260 + ++#ifdef __KERNEL__ ++ + /* defined in T10 SCSI Primary Commands-2 (SPC2) */ + struct scsi_varlen_cdb_hdr { + u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ +@@ -169,6 +171,8 @@ + scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); + } + ++#endif ++ + /* + * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft + * T10/1561-D Revision 4 Draft dated 7th November 2002. +@@ -284,8 +288,10 @@ + SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */ + }; + ++#ifdef __KERNEL__ + /* Returns a human-readable name for the device */ + extern const char * scsi_device_type(unsigned type); ++#endif + + /* + * standard mode-select header prepended to all mode-select commands diff --git a/toolchain/mpfr/Makefile b/toolchain/mpfr/Makefile index f74f0199f..67753db9b 100644 --- a/toolchain/mpfr/Makefile +++ b/toolchain/mpfr/Makefile @@ -7,8 +7,12 @@ include $(TOPDIR)/toolchain/gmp/Makefile.inc include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk -$(WRKBUILD)/.headers: -$(WRKBUILD)/.configured: +ifeq (${ADK_MAKE_PARALLEL},y) +MPFR_MAKEOPTS+= -j${ADK_MAKE_JOBS} +endif + +$(WRKBUILD)/.headers: +$(WRKBUILD)/.configured: (cd $(WRKBUILD); \ $(WRKBUILD)/configure \ --prefix=$(STAGING_TOOLS) \ @@ -21,7 +25,7 @@ $(WRKBUILD)/.configured: touch $@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured - $(MAKE) -C $(WRKBUILD) all + $(MAKE) ${MPFR_MAKEOPTS} -C $(WRKBUILD) all touch $@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled diff --git a/toolchain/mpfr/Makefile.inc b/toolchain/mpfr/Makefile.inc index 665796739..6f4ed40ef 100644 --- a/toolchain/mpfr/Makefile.inc +++ b/toolchain/mpfr/Makefile.inc @@ -2,8 +2,8 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= mpfr -PKG_VERSION:= 2.4.1 +PKG_VERSION:= 2.4.2 PKG_RELEASE:= 1 -PKG_MD5SUM:= c5ee0a8ce82ad55fe29ac57edd35d09e +PKG_MD5SUM:= 89e59fe665e2b3ad44a6789f40b059a0 PKG_SITES:= http://www.mpfr.org/mpfr-current/ DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/toolchain/rules.mk b/toolchain/rules.mk index fa8be6bd3..d2710d053 100644 --- a/toolchain/rules.mk +++ b/toolchain/rules.mk @@ -2,4 +2,3 @@ # material, please see the LICENCE file in the top-level directory. WRKDIR_BASE= ${TOOLCHAIN_BUILD_DIR} -WRKDIR= ${WRKDIR_BASE} diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile index 3a9310ad1..8d956f4b1 100644 --- a/toolchain/uClibc/Makefile +++ b/toolchain/uClibc/Makefile @@ -8,46 +8,24 @@ include ../rules.mk include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk -#workaround for mips and gcc 4.4, where -Os does not inline code in ld.so -ifeq ($(ARCH),mips) -TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS)) -endif -#workaround for cris and gcc 4.4, where -Os generates ICE -ifeq ($(ARCH),cris) -TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS)) -endif - $(WRKBUILD)/.headers: $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${TOOLCHAIN_SYSROOT}/usr/include\"' \ - $(TOPDIR)/target/$(DEVICE)/uclibc.config >${WRKBUILD}/.config -ifeq ($(ADK_IPV6),y) - $(SED) 's,# UCLIBC_HAS_IPV6.*,UCLIBC_HAS_IPV6=y,' \ - ${WRKBUILD}/.config -endif -ifeq ($(ADK_SSP),y) - $(SED) 's,# UCLIBC_HAS_SSP.*,UCLIBC_HAS_SSP=y,' \ - ${WRKBUILD}/.config - echo 'UCLIBC_BUILD_SSP=y' >> ${WRKBUILD}/.config - echo '# UCLIBC_HAS_SSP_COMPAT is not set' >> ${WRKBUILD}/.config - echo '# SSP_QUICK_CANARY is not set' >> ${WRKBUILD}/.config - echo 'PROPOLICE_BLOCK_ABRT=y' >> ${WRKBUILD}/.config - echo '# PROPOLICE_BLOCK_SEGV is not set' >> ${WRKBUILD}/.config -endif + $(TOPDIR)/target/$(ADK_TARGET)/uclibc.config >${WRKBUILD}/.config ifneq ($(ADK_DEBUG),) $(SED) 's,DOSTRIP,DODEBUG,' ${WRKBUILD}/.config endif $(MAKE) -C $(WRKBUILD) \ - PREFIX=$(TOOLCHAIN_SYSROOT)/ \ + PREFIX=$(TOOLCHAIN_SYSROOT) \ DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=$(TOOLCHAIN_SYSROOT)/ \ + RUNTIME_PREFIX=$(TOOLCHAIN_SYSROOT) \ HOSTCC="$(HOSTCC)" \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ install_headers touch $(WRKBUILD)/.configured touch $@ -$(WRKBUILD)/.compiled: +$(WRKBUILD)/.compiled: $(MAKE) -C $(WRKBUILD) \ PREFIX= \ DEVEL_PREFIX=/ \ @@ -60,7 +38,8 @@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.install_headers: $(WRKBUILD)/.compiled $(MAKE) -C $(WRKBUILD) \ PREFIX=$(STAGING_DIR) \ - DEVEL_PREFIX=/ \ + DEVEL_PREFIX=/usr/ \ + DEVEL_PREFIX_LIB=/ \ RUNTIME_PREFIX=/ \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ install_dev @@ -69,7 +48,8 @@ $(WRKBUILD)/.install_headers: $(WRKBUILD)/.compiled $(WRKBUILD)/.installed: $(WRKBUILD)/.install_headers $(MAKE) -C $(WRKBUILD) \ PREFIX=$(STAGING_DIR) \ - DEVEL_PREFIX=/ \ + DEVEL_PREFIX=/usr/ \ + DEVEL_PREFIX_LIB=/ \ RUNTIME_PREFIX=/ \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ install_runtime diff --git a/toolchain/uClibc/Makefile.inc b/toolchain/uClibc/Makefile.inc index 5fdeb5a17..f02b99e1a 100644 --- a/toolchain/uClibc/Makefile.inc +++ b/toolchain/uClibc/Makefile.inc @@ -2,8 +2,8 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= uClibc -PKG_VERSION:= 0.9.30.1 +PKG_VERSION:= 0.9.30.3 PKG_RELEASE:= 1 -PKG_MD5SUM:= 1a4b84e5536ad8170563ffa88c34679c +PKG_MD5SUM:= 73a4bf4a0fa508b01a7a3143574e3d21 PKG_SITES:= http://uclibc.org/downloads/ DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/toolchain/uClibc/patches/devel-prefix-lib.patch b/toolchain/uClibc/patches/devel-prefix-lib.patch new file mode 100644 index 000000000..336fad1c7 --- /dev/null +++ b/toolchain/uClibc/patches/devel-prefix-lib.patch @@ -0,0 +1,78 @@ +diff -Nur uClibc-0.9.30.3.orig/Makefile.in uClibc-0.9.30.3/Makefile.in +--- uClibc-0.9.30.3.orig/Makefile.in 2010-03-12 20:32:42.000000000 +0100 ++++ uClibc-0.9.30.3/Makefile.in 2010-03-12 22:05:15.486918488 +0100 +@@ -190,7 +190,7 @@ + install: install_runtime install_dev + + +-RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib) ++RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX_LIB)lib $(RUNTIME_PREFIX)lib) + + $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c|$(@D) + $(hcompile.u) +@@ -371,41 +371,41 @@ + + # Installs development library links. + install_dev: install_headers install_runtime +- $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib +- -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/ ++ $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX_LIB)lib ++ -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX_LIB)lib/ + ifeq ($(HAVE_SHARED),y) + for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \ + $(SED) -e 's/lib\///'` ; do \ + $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \ +- $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \ ++ $(PREFIX)$(DEVEL_PREFIX_LIB)lib/$$i; \ + done + if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \ +- $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ +- $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \ ++ $(RM) $(PREFIX)$(DEVEL_PREFIX_LIB)lib/libc.so; \ ++ $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX_LIB)lib/$(NONSHARED_LIBNAME):' \ + -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \ + -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \ +- $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ ++ $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX_LIB)lib/libc.so; \ + fi + ifeq ($(UCLIBC_HAS_THREADS),y) + ifneq ($(LINUXTHREADS_OLD),y) + if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \ +- $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \ +- cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \ +- echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \ +- >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \ ++ $(RM) $(PREFIX)$(DEVEL_PREFIX_LIB)lib/libpthread.so; \ ++ cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX_LIB)lib/libpthread.so; \ ++ echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX_LIB)lib/libpthread_nonshared.a )" \ ++ >> $(PREFIX)$(DEVEL_PREFIX_LIB)lib/libpthread.so; \ + fi + endif + endif + ifeq ($(PTHREADS_DEBUG_SUPPORT),y) + $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \ +- $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so ++ $(PREFIX)$(DEVEL_PREFIX_LIB)lib/libthread_db.so + endif + ifeq ($(DOPIC),y) + # # If we build shared libraries then the static libs are PIC... + # # Make _pic.a symlinks to make mklibs.py and similar tools happy. + if [ -d lib ] ; then \ + for i in `find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \ +- $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \ ++ $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX_LIB)lib/`echo $$i \ + | $(SED) -e 's/\.a$$/_pic.a/'`; \ + done ; \ + fi +@@ -414,9 +414,9 @@ + ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y) + for file in lib/lib*.gdb; do \ + if test -f $$file; then \ +- $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \ ++ $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX_LIB)lib; \ + $(INSTALL) -m 755 `echo $$file | $(SED) 's/\.gdb$$//'` \ +- $(PREFIX)$(DEVEL_PREFIX)lib; \ ++ $(PREFIX)$(DEVEL_PREFIX_LIB)lib; \ + fi; \ + done + endif diff --git a/toolchain/uClibc/patches/disable-opt-debug-cflags.patch b/toolchain/uClibc/patches/disable-opt-debug-cflags.patch deleted file mode 100644 index 434f1d793..000000000 --- a/toolchain/uClibc/patches/disable-opt-debug-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nur uClibc-0.9.30.1.orig/Rules.mak uClibc-0.9.30.1/Rules.mak ---- uClibc-0.9.30.1.orig/Rules.mak 2009-03-02 22:10:04.000000000 +0100 -+++ uClibc-0.9.30.1/Rules.mak 2009-06-18 16:02:34.000000000 +0200 -@@ -150,9 +150,10 @@ - # Flags in OPTIMIZATION are used only for non-debug builds - OPTIMIZATION:= - # Use '-Os' optimization if available, else use -O2, allow Config to override --OPTIMIZATION+=$(call check_gcc,-Os,-O2) -+# disable, let OpenADK do the optimization -+#OPTIMIZATION+=$(call check_gcc,-Os,-O2) - # Use the gcc 3.4 -funit-at-a-time optimization when available --OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,) -+#OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,) - - GCC_MAJOR_VER?=$(shell $(CC) -dumpversion | cut -d . -f 1) - #GCC_MINOR_VER?=$(shell $(CC) -dumpversion | cut -d . -f 2) -@@ -547,7 +548,7 @@ - - LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs - ifeq ($(DODEBUG),y) --CFLAGS += -O0 -g3 -+CFLAGS += - else - CFLAGS += $(OPTIMIZATION) $(XARCH_CFLAGS) - endif diff --git a/toolchain/uClibc/patches/extension-insteadof-inline.patch b/toolchain/uClibc/patches/extension-insteadof-inline.patch deleted file mode 100644 index bd3a720e9..000000000 --- a/toolchain/uClibc/patches/extension-insteadof-inline.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h ---- uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200 -+++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h 2009-06-21 19:08:44.487613137 +0200 -@@ -163,22 +163,25 @@ - - #define OFFSET_GP_GOT 0x7ff0 - --static __inline__ ElfW(Addr) * --elf_mips_got_from_gpreg (ElfW(Addr) gpreg) --{ -- /* FIXME: the offset of gp from GOT may be system-dependent. */ -- return (ElfW(Addr) *) (gpreg - OFFSET_GP_GOT); --} -+#define elf_mips_got_from_gpreg(gpreg) __extension__({ \ -+ ElfW(Addr) *elf_mips_got_from_gpreg_res; \ -+ \ -+ /* FIXME: the offset of gp from GOT may be system-dependent. */ \ -+ elf_mips_got_from_gpreg_res = gpreg - OFFSET_GP_GOT; \ -+ (elf_mips_got_from_gpreg_res); \ -+}) - - /* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. We assume its $gp points to the primary GOT. */ --static __inline__ ElfW(Addr) --elf_machine_dynamic (void) --{ -- register ElfW(Addr) gp __asm__ ("$28"); -- return *elf_mips_got_from_gpreg (gp); --} -+#define elf_machine_dynamic() __extension__({ \ -+ register ElfW(Addr) elf_machine_dynamic_gp __asm__("$28"); \ -+ ElfW(Addr) elf_machine_dynamic_res; \ -+ \ -+ elf_machine_dynamic_res = *elf_mips_got_from_gpreg( \ -+ elf_machine_dynamic_gp); \ -+ (elf_machine_dynamic_res); \ -+}) - - #define STRINGXP(X) __STRING(X) - #define STRINGXV(X) STRINGV_(X) -@@ -192,21 +195,20 @@ - #endif - - /* Return the run-time load address of the shared object. */ --static __inline__ ElfW(Addr) --elf_machine_load_address (void) --{ -- ElfW(Addr) addr; -- __asm__ (" .set noreorder\n" -- " " STRINGXP (PTR_LA) " %0, 0f\n" -- " bltzal $0, 0f\n" -- " nop\n" -- "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n" -- " .set reorder\n" -- : "=r" (addr) -- : /* No inputs */ -- : "$31"); -- return addr; --} -+#define elf_machine_load_address() __extension__({ \ -+ ElfW(Addr) elf_machine_load_address_addr; \ -+ \ -+ __asm__ (" .set noreorder\n" \ -+ " " STRINGXP (PTR_LA) " %0, 0f\n" \ -+ " bltzal $0, 0f\n" \ -+ " nop\n" \ -+ "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n" \ -+ " .set reorder\n" \ -+ : "=r" (elf_machine_load_address_addr) \ -+ : /* No inputs */ \ -+ : "$31"); \ -+ (elf_machine_load_address_addr); \ -+}) - - static __inline__ void - elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr, diff --git a/toolchain/uClibc/patches/mips64.patch b/toolchain/uClibc/patches/mips64.patch deleted file mode 100644 index 70fcc24e6..000000000 --- a/toolchain/uClibc/patches/mips64.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur uClibc-0.9.30.1.orig/Rules.mak uClibc-0.9.30.1/Rules.mak ---- uClibc-0.9.30.1.orig/Rules.mak 2009-03-02 22:10:04.000000000 +0100 -+++ uClibc-0.9.30.1/Rules.mak 2009-05-28 15:08:37.000000000 +0200 -@@ -292,7 +292,7 @@ - CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32R2)+=-march=mips32r2 -mtune=mips32r2 -- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32 -+ CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 - ifeq ($(strip $(ARCH_BIG_ENDIAN)),y) - CPU_LDFLAGS-$(CONFIG_MIPS_N64_ABI)+=-Wl,-melf64btsmip - CPU_LDFLAGS-$(CONFIG_MIPS_O32_ABI)+=-Wl,-melf32btsmip diff --git a/toolchain/uClibc/patches/null-pointer.patch b/toolchain/uClibc/patches/null-pointer.patch deleted file mode 100644 index e77cd72b8..000000000 --- a/toolchain/uClibc/patches/null-pointer.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur uClibc-0.9.30.1.orig/libc/inet/getaddrinfo.c uClibc-0.9.30.1/libc/inet/getaddrinfo.c ---- uClibc-0.9.30.1.orig/libc/inet/getaddrinfo.c 2009-02-26 13:49:14.000000000 +0100 -+++ uClibc-0.9.30.1/libc/inet/getaddrinfo.c 2009-06-14 17:46:45.000000000 +0200 -@@ -187,6 +187,8 @@ - } - - for (runp = ifa; runp != NULL; runp = runp->ifa_next) { -+ if (runp->ifa_addr == NULL) -+ continue; - #if defined __UCLIBC_HAS_IPV4__ - if (runp->ifa_addr->sa_family == PF_INET) - seen |= SEEN_IPV4; |