From: Victor Martinez Date: Wed, 7 Nov 2012 16:58:21 +0000 (+0000) Subject: Toolchain update libgmp 5.0.5, libmpfr 3.1.1, libmpc 1.0.1, binutils 2.22, glibc... X-Git-Url: http://gitweb/?a=commitdiff_plain;h=0d50b215bf341f98fadfa2eb17ddc8d4c6aefd18;p=toolchain.git Toolchain update libgmp 5.0.5, libmpfr 3.1.1, libmpc 1.0.1, binutils 2.22, glibc 2.16.0, gcc 4.7.2 First attempt to make a generic hardfp build with optimized files per device options. It breaks initrd creation when it tries to load the included file from its Makefile as it picks current directory ($pwd/initrd) to look for that include instead of toolchain path. Fixed builds: binutils: Removed patch binutils-2.21.1-gnueabihf.patch. Fixed in last sources (binutils 2.22) gcc-static: --disable-libquadmath (arm hasn't __float128) Adapted gcc-4.7.2-gnueabihf.patch glibc: "libc_cv_ctors_header=yes" (gcc constructor support is configured without the configure test) Removed patch glibc-2.13-gnueabihf.patch. Fixed in last sources (glibc 2.16.0) Removed patch glibc-2.13-prelink.patch gcc-final: --disable-bootstrap (removed the three times build bootstrap) --disable-libgomp (not needed for cross compilations) --disable-libstdcxx-pch (don't build the pre-compiled header (PCH) for libstdc++) --enable-c99 --enable-long-long (removed these options as in softfp) --- diff --git a/Makefile b/Makefile index da7e72b..177b39c 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ distclean: clean linux-headers-distclean libgmp-distclean libmpfr-distclean libm # LINUX HEADERS $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2: - wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 + wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 $(WORK)/linux-$(KERNEL_HEADERS_VERSION): $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 @@ -71,8 +71,10 @@ libgmp-distclean: libgmp-clean $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2: wget -P $(WORK) -c http://ftp.gnu.org/gnu/mpfr/mpfr-$(LIBMPFR_VERSION).tar.bz2 -$(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 +$(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 $(WORK)/libmpfr-3.1.1-p2.patch.gz tar -C $(WORK) -xvjf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 + cd $(WORK)/mpfr-$(LIBMPFR_VERSION) && \ + gunzip -c $(WORK)/libmpfr-$(LIBMPFR_VERSION)-p2.patch.gz | patch -p1 touch $(WORK)/mpfr-$(LIBMPFR_VERSION) $(WORK)/build-libmpfr: $(WORK)/mpfr-$(LIBMPFR_VERSION) @@ -132,8 +134,7 @@ $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2: $(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2 tar -C $(WORK) -xvjf $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2 - cd $(WORK)/binutils-$(BINUTILS_VERSION) && \ - patch -p1 -i $(WORK)/binutils-$(BINUTILS_VERSION)-gnueabihf.patch + sed -i '/^SUBDIRS/s/doc//' $(WORK)/binutils-$(BINUTILS_VERSION)/*/Makefile.in touch $(WORK)/binutils-$(BINUTILS_VERSION) $(WORK)/build-binutils: $(WORK)/binutils-$(BINUTILS_VERSION) @@ -184,7 +185,7 @@ $(CROSSTOOLS)/lib/gcc: $(WORK)/build-gcc-static $(WORK)/gcc-$(GCC_VERSION) --without-headers --enable-__cxa_atexit --enable-symvers=gnu --disable-decimal-float \ --disable-libgomp --disable-libmudflap --disable-libssp \ --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \ - --disable-shared --disable-threads --enable-languages=c \ + --disable-shared --disable-threads --enable-languages=c --disable-libquadmath \ --with-abi=$(ABI) --with-arch=$(ARCH) --with-mode=$(MODE) --with-float=$(FLOAT) --with-fpu=$(FPU) && \ make all-gcc all-target-libgcc && make install-gcc install-target-libgcc || exit 1 touch $(CROSSTOOLS)/lib/gcc @@ -210,9 +211,7 @@ $(WORK)/glibc-$(GLIBC_VERSION): $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 $(WORK)/g cd $(WORK)/glibc-$(GLIBC_VERSION) && \ tar xvjf $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2 && \ mv glibc-ports-$(GLIBC_VERSION) ports && \ - patch -p1 -i $(WORK)/glibc-$(GLIBC_VERSION)-gnueabihf.patch && \ - patch -p1 -i $(WORK)/glibc-$(GLIBC_VERSION)-prelink.patch && \ - sed -e 's/-lgcc_eh//g' -i Makeconfig + sed -e 's/-lgcc_eh//g' -e 's/-lgcc_s//g' -i Makeconfig touch $(WORK)/glibc-$(GLIBC_VERSION) $(WORK)/build-glibc: $(WORK)/glibc-$(GLIBC_VERSION) @@ -225,6 +224,7 @@ $(CLFS)/usr/lib/libc.so: $(WORK)/build-glibc $(WORK)/glibc-$(GLIBC_VERSION) echo "libc_cv_forced_unwind=yes" > config.cache && \ echo "libc_cv_c_cleanup=yes" >> config.cache && \ echo "libc_cv_gnu89_inline=yes" >> config.cache && \ + echo "libc_cv_ctors_header=yes" >> config.cache && \ echo "install_root=$(CLFS)" > configparms && \ unset CFLAGS && unset CXXFLAGS && \ BUILD_CC="gcc" CC="$(TARGET)-gcc" AR="$(TARGET)-ar" \ @@ -260,7 +260,8 @@ $(CLFS)/lib/gcc: $(WORK)/build-gcc-final $(WORK)/gcc-$(GCC_VERSION) --build=$(HOST) --host=$(HOST) --target=$(TARGET) \ --with-headers=$(CLFS)/usr/include --enable-shared \ --disable-multilib --with-sysroot=$(CLFS) --disable-nls \ - --enable-languages=c,c++ --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posix \ + --enable-languages=c,c++ --enable-__cxa_atexit \ + --enable-threads=posix --disable-libstdcxx-pch --disable-bootstrap --disable-libgomp \ --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \ --with-abi=$(ABI) --with-arch=$(ARCH) --with-mode=$(MODE) --with-float=$(FLOAT) --with-fpu=$(FPU) && \ make AS_FOR_TARGET="$(TARGET)-as" LD_FOR_TARGET="$(TARGET)-ld" && \ diff --git a/efikamx.mk b/efikamx.mk new file mode 100644 index 0000000..48c7cca --- /dev/null +++ b/efikamx.mk @@ -0,0 +1,8 @@ +# Hardfp EfikaMX imx51 +ABI = aapcs-linux +ARCH = armv7-a +FPU = vfpv3-d16 +MODE = thumb +FLOAT = hard + +# End of file diff --git a/generic.mk b/generic.mk new file mode 100644 index 0000000..b894fb4 --- /dev/null +++ b/generic.mk @@ -0,0 +1,4 @@ +# Generic hardfp toolchain +ABI = aapcs-linux +MODE = arm +FLOAT = hard diff --git a/raspberrypi.mk b/raspberrypi.mk new file mode 100644 index 0000000..e96c6a3 --- /dev/null +++ b/raspberrypi.mk @@ -0,0 +1,8 @@ +# Hardfp raspberrypi +ABI = aapcs-linux +ARCH = armv6zk +FPU = vfp +MODE = thumb +FLOAT = hard + +# End of file diff --git a/vars.mk b/vars.mk index 54761f2..e273fe4 100644 --- a/vars.mk +++ b/vars.mk @@ -5,24 +5,21 @@ HOST = $(shell echo $$MACHTYPE | sed "s/$$(echo $$MACHTYPE | cut -d- -f2)/cross/") TARGET = arm-crux-linux-gnueabihf -PWD = $(shell pwd) -CLFS = $(PWD)/clfs -CROSSTOOLS = $(PWD)/crosstools -WORK = $(PWD)/work +TOPDIR = $(shell pwd) +CLFS = $(TOPDIR)/clfs +CROSSTOOLS = $(TOPDIR)/crosstools +WORK = $(TOPDIR)/work -KERNEL_HEADERS_VERSION = 2.6.35.6 -LIBGMP_VERSION = 5.0.2 -LIBMPFR_VERSION = 3.1.0 -LIBMPC_VERSION = 0.9 -BINUTILS_VERSION = 2.21.1 -GCC_VERSION = 4.6.1 -GLIBC_VERSION = 2.13 +KERNEL_HEADERS_VERSION = 3.5.4 +LIBGMP_VERSION = 5.0.5 +LIBMPFR_VERSION = 3.1.1 +LIBMPC_VERSION = 1.0.1 +BINUTILS_VERSION = 2.22 +GCC_VERSION = 4.7.2 +GLIBC_VERSION = 2.16.0 -# Hardfp EfikaMX imx51 -ABI = aapcs-linux -ARCH = armv7-a -FPU = vfpv3-d16 -MODE = thumb -FLOAT = hard +# Optimizations per device: generic/efikamx/raspberrypi +DEVICE=generic +include $(TOPDIR)/$(DEVICE).mk # End of file diff --git a/work/binutils-2.21.1-gnueabihf.patch b/work/binutils-2.21.1-gnueabihf.patch deleted file mode 100644 index 10d7017..0000000 --- a/work/binutils-2.21.1-gnueabihf.patch +++ /dev/null @@ -1,35 +0,0 @@ -=================================================================== -RCS file: /cvs/src/src/ld/configure.tgt,v -retrieving revision 1.244 -retrieving revision 1.245 -diff -u -r1.244 -r1.245 ---- src/ld/configure.tgt 2011/04/07 01:19:22 1.244 -+++ src/ld/configure.tgt 2011/04/08 16:05:12 1.245 -@@ -71,7 +71,7 @@ - arm*-*-symbianelf*) targ_emul=armsymbian;; - arm-*-kaos*) targ_emul=armelf ;; - arm9e-*-elf) targ_emul=armelf ;; --arm*b-*-linux-*eabi) targ_emul=armelfb_linux_eabi -+arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi - targ_extra_emuls=armelf_linux_eabi - targ_extra_libpath=$targ_extra_emuls - ;; -@@ -79,7 +79,7 @@ - targ_extra_emuls="armelfb armelf armelf_linux" - targ_extra_libpath="armelf_linux" - ;; --arm*-*-linux-*eabi) targ_emul=armelf_linux_eabi -+arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi - targ_extra_emuls=armelfb_linux_eabi - targ_extra_libpath=$targ_extra_emuls - ;; -@@ -87,7 +87,7 @@ - targ_extra_emuls="armelf armelfb armelfb_linux" - targ_extra_libpath="armelfb_linux" - ;; --arm*-*-uclinux*eabi) targ_emul=armelf_linux_eabi -+arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi - targ_extra_emuls=armelfb_linux_eabi - targ_extra_libpath=$targ_extra_emuls - ;; - diff --git a/work/gcc-4.6.1-gnueabihf.patch b/work/gcc-4.6.1-gnueabihf.patch deleted file mode 100644 index 49059d3..0000000 --- a/work/gcc-4.6.1-gnueabihf.patch +++ /dev/null @@ -1,166 +0,0 @@ -http://gcc.gnu.org/ml/gcc/2011-02/msg00390.html - -Triplet for ARM Linux HardFP ABI, again - - * From: Guillem Jover - * To: gcc at gcc dot gnu dot org - * Date: Mon, 21 Feb 2011 11:12:09 +0100 - * Subject: Triplet for ARM Linux HardFP ABI, again - - -diff --git a/configure b/configure -index 501c6ff..43ff04f 100755 ---- a/configure -+++ b/configure -diff --git a/configure b/configure -index 501c6ff..43ff04f 100755 ---- a/configure -+++ b/configure -@@ -3236,7 +3236,7 @@ case "${target}" in - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-*eabi*) - noconfigdirs="$noconfigdirs target-qthreads" - case ${with_newlib} in - no) noconfigdirs="$noconfigdirs target-newlib target-libgloss" -diff --git a/configure.ac b/configure.ac -index 9121d65..e1a42e0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -682,7 +682,7 @@ case "${target}" in - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-*eabi*) - noconfigdirs="$noconfigdirs target-qthreads" - case ${with_newlib} in - no) noconfigdirs="$noconfigdirs target-newlib target-libgloss" -diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in -index b64ba55..cbe6b70 100644 ---- a/gcc/ada/gcc-interface/Makefile.in -+++ b/gcc/ada/gcc-interface/Makefile.in -@@ -1841,7 +1841,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),) - LIBRARY_VERSION := $(LIB_VERSION) - endif - --ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),) -+ifeq ($(strip $(filter-out arm% linux%,$(arch) $(osys))),) - LIBGNAT_TARGET_PAIRS = \ - a-intnam.ads - // -diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc -index d71c012..1086a18 100644 ---- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc -+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc -@@ -1,5 +1,5 @@ - // { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" } --// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } -+// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux-*eabi* } } - - // 2007-05-03 Benjamin Kosnik - // - diff --git a/work/gcc-4.7.2-gnueabihf.patch b/work/gcc-4.7.2-gnueabihf.patch new file mode 100644 index 0000000..8a77a7a --- /dev/null +++ b/work/gcc-4.7.2-gnueabihf.patch @@ -0,0 +1,135 @@ +diff -pruN gcc-4.7.2.orig/gcc/ada/gcc-interface/Makefile.in gcc-4.7.2/gcc/ada/gcc-interface/Makefile.in +--- gcc-4.7.2.orig/gcc/ada/gcc-interface/Makefile.in 2012-08-06 14:34:27.000000000 +0000 ++++ gcc-4.7.2/gcc/ada/gcc-interface/Makefile.in 2012-11-06 14:25:52.708613671 +0000 +@@ -1867,7 +1867,7 @@ ifeq ($(strip $(filter-out powerpc% linu + LIBRARY_VERSION := $(LIB_VERSION) + endif + +-ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),) ++ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(arch) $(osys)-$(word 4,$(targ)))),) + LIBGNAT_TARGET_PAIRS = \ + a-intnam.adsl_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL) -@@ -2288,10 +2292,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - lossage); - } - -- /* Remember the last search directory added at startup, now that -- malloc will no longer be the one from dl-minimal.c. */ -- GLRO(dl_init_all_dirs) = GL(dl_all_dirs); -- - if (! prelinked && rtld_multiple_ref) - { - /* There was an explicit ref to the dynamic linker as a shared lib. diff --git a/work/libmpfr-3.1.1-p2.patch.gz b/work/libmpfr-3.1.1-p2.patch.gz new file mode 100644 index 0000000..4fe891e Binary files /dev/null and b/work/libmpfr-3.1.1-p2.patch.gz differ