Radix cross Linux Toolchains

Toolchains for all supported by Radix cross Linux devices

42 Commits   1 Branch   8 Tags
#
# Download: http://www.gnu.org/prep/ftp.html
#
# You can use the generic url http://ftpmirror.gnu.org
# to automatically choose a nearby and up-to-date mirror.
#
# original url: http://ftp.gnu.org/gnu/binutils
#

COMPONENT_TARGETS = $(TOOLCHAIN_NOARCH)


include ../../../build-system/config.mk


url         = $(DOWNLOAD_SERVER)/sources/GNU/binutils

versions    = 2.40

tarballs    = $(addsuffix .tar.xz, $(addprefix binutils-, $(versions)))
sha1s       = $(addsuffix .sha1sum, $(tarballs))

patches     = $(CURDIR)/patches/binutils-2.40-aarch64-ifunc.patch
patches    += $(CURDIR)/patches/binutils-2.40-not-link-static-libstdc++.patch
patches    += $(CURDIR)/patches/binutils-2.40-fname-in-error-messages.patch
patches    += $(CURDIR)/patches/binutils-2.40-gold-i386-gnu-property-notes.patch
patches    += $(CURDIR)/patches/binutils-2.40-gold-mismatched-section-flags.patch
patches    += $(CURDIR)/patches/binutils-2.40-gold-warn-unsupported.patch
patches    += $(CURDIR)/patches/binutils-2.40-readelf-other-sym-info.patch
patches    += $(CURDIR)/patches/binutils-2.40-special-sections-in-groups.patch
patches    += $(CURDIR)/patches/binutils-2.40-testsuite-failures.patch

patches    += $(CURDIR)/patches/binutils-2.40-cleansweep.patch
patches    += $(CURDIR)/patches/binutils-2.40-copy-osabi.patch
patches    += $(CURDIR)/patches/binutils-2.40-export-demangle.patch
patches    += $(CURDIR)/patches/binutils-2.40-ldforcele.patch
patches    += $(CURDIR)/patches/binutils-2.40-libtool-lib64.patch
patches    += $(CURDIR)/patches/binutils-2.40-no-config-check.patch
patches    += $(CURDIR)/patches/binutils-2.40-sec-merge-emit.patch

.NOTPARALLEL: $(patches)


BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)


include ../../../build-system/core.mk


.PHONY: download_clean


$(tarballs):
	@echo -e "\n======= Downloading source tarballs =======" ; \
	 for tarball in $(tarballs) ; do \
	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
	 done ; wait

$(sha1s): $(tarballs)
	@for sha in $@ ; do \
	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
	   touch $$sha ; \
	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
	   sha1sum --check $$sha ; ret="$$?" ; \
	   if [ "$$ret" == "1" ]; then \
	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
	     exit 1 ; \
	   fi ; \
	 done

$(patches): $(sha1s)
	@echo -e "\n======= Create Patches =======\n" ; \
	 ( cd create-2.40-aarch64-ifunc-patch                 ; ./create.patch.sh ) ; \
	 ( cd create-2.40-not-link-static-libstdc++-patch     ; ./create.patch.sh ) ; \
	 ( cd create-2.40-fname-in-error-messages-patch       ; ./create.patch.sh ) ; \
	 ( cd create-2.40-gold-i386-gnu-property-notes-patch  ; ./create.patch.sh ) ; \
	 ( cd create-2.40-gold-mismatched-section-flags-patch ; ./create.patch.sh ) ; \
	 ( cd create-2.40-gold-warn-unsupported-patch         ; ./create.patch.sh ) ; \
	 ( cd create-2.40-readelf-other-sym-info-patch        ; ./create.patch.sh ) ; \
	 ( cd create-2.40-special-sections-in-groups-patch    ; ./create.patch.sh ) ; \
	 ( cd create-2.40-testsuite-failures-patch            ; ./create.patch.sh ) ; \
	 ( cd create-2.40-cleansweep-patch                    ; ./create.patch.sh ) ; \
	 ( cd create-2.40-copy-osabi-patch                    ; ./create.patch.sh ) ; \
	 ( cd create-2.40-export-demangle-patch               ; ./create.patch.sh ) ; \
	 ( cd create-2.40-ldforcele-patch                     ; ./create.patch.sh ) ; \
	 ( cd create-2.40-libtool-lib64-patch                 ; ./create.patch.sh ) ; \
	 ( cd create-2.40-no-config-check-patch               ; ./create.patch.sh ) ; \
	 ( cd create-2.40-sec-merge-emit-patch                ; ./create.patch.sh ) ; \
	 echo -e "\n"

download_clean:
	@rm -f $(tarballs) $(sha1s) $(patches)