From 890317953724d8beb3f0924e887553cab8cb1cc2 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Fri, 17 Mar 2017 13:10:55 +0100 Subject: [PATCH] tool_chain: use port mechanism Fixes #2340 --- repos/ports/ports/binutils.hash | 2 +- repos/ports/ports/binutils.port | 15 ++ repos/ports/ports/gcc.hash | 2 +- repos/ports/ports/gcc.port | 9 +- repos/ports/ports/gdb.hash | 2 +- repos/ports/ports/gdb.port | 12 +- .../noux-pkg/binutils/patches}/riscv.patch | 0 .../binutils/patches}/riscv_files.patch | 0 .../src/noux-pkg/binutils/patches}/series | 0 .../src/noux-pkg/gcc/{ => patches}/arm.patch | 0 .../src/noux-pkg/gcc/patches}/config.patch | 0 .../gcc/patches}/gnu_inline_mismatch.patch | 0 .../gcc/patches}/go_libbacktrace.patch | 0 .../patches}/host_target_combination.patch | 0 .../src/noux-pkg/gcc/patches}/libgcc_s.patch | 0 .../gcc/patches}/libstdcxx_without_libc.patch | 0 .../gcc/patches}/libsupcxx_demangle.patch | 0 .../src/noux-pkg/gcc/patches}/misc.patch | 0 .../gcc/patches}/no_short_enums.patch | 0 .../{build.patch => patches/noux_build.patch} | 0 .../noux-pkg/gcc/patches}/prefer_pic.patch | 0 .../src/noux-pkg/gcc/patches}/riscv.patch | 0 .../noux-pkg/gcc/patches}/riscv_files.patch | 0 .../ports/src/noux-pkg/gcc/patches}/series | 2 + .../gcc/patches}/target_libbacktrace.patch | 0 .../gdb/patches}/arm_single_step.patch | 0 .../gdb/patches}/gdbserver_genode.patch | 0 .../gdb/patches}/gdbserver_x86_64.patch | 0 .../{build.patch => patches/noux_build.patch} | 0 repos/ports/src/noux-pkg/gdb/patches/series | 7 + .../gdb/patches}/shared_library.patch | 0 .../gdb/patches}/siginfo.patch | 0 .../src/noux-pkg/gdb/patches}/x86_64.patch | 0 tool/patches/gdb-7.3.1/series | 3 - tool/tool_chain | 140 +++++------------- tool/tool_chain_binutils_patches.inc | 12 -- tool/tool_chain_gcc_patches.inc | 16 -- tool/tool_chain_gdb_patches.inc | 8 - 38 files changed, 69 insertions(+), 161 deletions(-) rename {tool/patches/binutils-2.25 => repos/ports/src/noux-pkg/binutils/patches}/riscv.patch (100%) rename {tool/patches/binutils-2.25 => repos/ports/src/noux-pkg/binutils/patches}/riscv_files.patch (100%) rename {tool/patches/binutils-2.25 => repos/ports/src/noux-pkg/binutils/patches}/series (100%) rename repos/ports/src/noux-pkg/gcc/{ => patches}/arm.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/config.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/gnu_inline_mismatch.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/go_libbacktrace.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/host_target_combination.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/libgcc_s.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/libstdcxx_without_libc.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/libsupcxx_demangle.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/misc.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/no_short_enums.patch (100%) rename repos/ports/src/noux-pkg/gcc/{build.patch => patches/noux_build.patch} (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/prefer_pic.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/riscv.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/riscv_files.patch (100%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/series (90%) rename {tool/patches/gcc-4.9.2 => repos/ports/src/noux-pkg/gcc/patches}/target_libbacktrace.patch (100%) rename {tool/patches/gdb-7.3.1 => repos/ports/src/noux-pkg/gdb/patches}/arm_single_step.patch (100%) rename repos/ports/src/{app/gdb_monitor => noux-pkg/gdb/patches}/gdbserver_genode.patch (100%) rename repos/ports/src/{app/gdb_monitor => noux-pkg/gdb/patches}/gdbserver_x86_64.patch (100%) rename repos/ports/src/noux-pkg/gdb/{build.patch => patches/noux_build.patch} (100%) create mode 100644 repos/ports/src/noux-pkg/gdb/patches/series rename {tool/patches/gdb-7.3.1 => repos/ports/src/noux-pkg/gdb/patches}/shared_library.patch (100%) rename repos/ports/src/{app/gdb_monitor => noux-pkg/gdb/patches}/siginfo.patch (100%) rename {tool/patches/gdb-7.3.1 => repos/ports/src/noux-pkg/gdb/patches}/x86_64.patch (100%) delete mode 100644 tool/patches/gdb-7.3.1/series delete mode 100755 tool/tool_chain_binutils_patches.inc delete mode 100755 tool/tool_chain_gcc_patches.inc delete mode 100755 tool/tool_chain_gdb_patches.inc diff --git a/repos/ports/ports/binutils.hash b/repos/ports/ports/binutils.hash index 11675c155b..597f7075e5 100644 --- a/repos/ports/ports/binutils.hash +++ b/repos/ports/ports/binutils.hash @@ -1 +1 @@ -42eff4ba260ed74d0c144e58498e186e98b2046b +3edd0cb727069ae91777496a581e7dc7628ec4a8 diff --git a/repos/ports/ports/binutils.port b/repos/ports/ports/binutils.port index 5c2dfc77a8..af84a9a675 100644 --- a/repos/ports/ports/binutils.port +++ b/repos/ports/ports/binutils.port @@ -7,3 +7,18 @@ SHA(binutils) := b46cc90ebaba7ffcf6c6d996d60738881b14e50d SIG(binutils) := ${URL(binutils)}.sig KEY(binutils) := GNU DIR(binutils) := src/noux-pkg/binutils + +PATCHES := $(addprefix ${DIR(binutils)}/patches/, \ + $(shell cat $(REP_DIR)/${DIR(binutils)}/patches/series)) +PATCH_OPT := -p1 -d ${DIR(binutils)} + +AUTOCONF := autoconf2.64 + +$(call check_tool,$(AUTOCONF)) + +default: _patch + @# + @# Re-generate configure scripts + @# + $(VERBOSE)cd ${DIR(binutils)}/bfd; $(AUTOCONF) + $(VERBOSE)touch $@ diff --git a/repos/ports/ports/gcc.hash b/repos/ports/ports/gcc.hash index ae9cf1c982..b98a7431d1 100644 --- a/repos/ports/ports/gcc.hash +++ b/repos/ports/ports/gcc.hash @@ -1 +1 @@ -6f36711bdcf68dc66357563c8429cd29d8e92003 +252baf48de6641bad2af9ea82c716a4e50c1e74d diff --git a/repos/ports/ports/gcc.port b/repos/ports/ports/gcc.port index 95b942c844..6f2ac76ba7 100644 --- a/repos/ports/ports/gcc.port +++ b/repos/ports/ports/gcc.port @@ -8,12 +8,9 @@ SIG(gcc) := ${URL(gcc)}.sig KEY(gcc) := GNU DIR(gcc) := src/noux-pkg/gcc -GENODE_DIR := $(REP_DIR)/../.. -PATCHES_DIR := $(GENODE_DIR)/tool/patches/gcc-$(VERSION) -PATCHES := $(addprefix $(PATCHES_DIR)/,$(shell cat $(PATCHES_DIR)/series)) \ - $(REP_DIR)/src/noux-pkg/gcc/build.patch \ - $(REP_DIR)/src/noux-pkg/gcc/arm.patch -PATCH_OPT := -p1 -d ${DIR(gcc)} +PATCHES := $(addprefix ${DIR(gcc)}/patches/, \ + $(shell cat $(REP_DIR)/${DIR(gcc)}/patches/series)) +PATCH_OPT := -p1 -d ${DIR(gcc)} AUTOCONF := autoconf2.64 diff --git a/repos/ports/ports/gdb.hash b/repos/ports/ports/gdb.hash index bad86cd730..92353bb984 100644 --- a/repos/ports/ports/gdb.hash +++ b/repos/ports/ports/gdb.hash @@ -1 +1 @@ -4d172e5273a79dd9b3da41eff846f945719e4ee3 +b3ce3adb094fd871ca90e7d6b51912bd8140d8d0 diff --git a/repos/ports/ports/gdb.port b/repos/ports/ports/gdb.port index e301976fb8..971e6b8933 100644 --- a/repos/ports/ports/gdb.port +++ b/repos/ports/ports/gdb.port @@ -8,12 +8,6 @@ SIG(gdb) := ${URL(gdb)}.sig KEY(gdb) := GNU DIR(gdb) := src/noux-pkg/gdb -GENODE_DIR := $(REP_DIR)/../.. -PATCHES_DIR := $(GENODE_DIR)/tool/patches/gdb-$(VERSION) -PATCHES := $(addprefix $(PATCHES_DIR)/,$(shell cat $(PATCHES_DIR)/series)) \ - $(REP_DIR)/src/app/gdb_monitor/siginfo.patch \ - $(REP_DIR)/src/app/gdb_monitor/gdbserver_genode.patch \ - $(REP_DIR)/src/noux-pkg/gdb/build.patch \ - $(REP_DIR)/src/app/gdb_monitor/gdbserver_x86_64.patch - -PATCH_OPT := -p1 -d ${DIR(gdb)} +PATCHES := $(addprefix ${DIR(gdb)}/patches/, \ + $(shell cat $(REP_DIR)/${DIR(gdb)}/patches/series)) +PATCH_OPT := -p1 -d ${DIR(gdb)} diff --git a/tool/patches/binutils-2.25/riscv.patch b/repos/ports/src/noux-pkg/binutils/patches/riscv.patch similarity index 100% rename from tool/patches/binutils-2.25/riscv.patch rename to repos/ports/src/noux-pkg/binutils/patches/riscv.patch diff --git a/tool/patches/binutils-2.25/riscv_files.patch b/repos/ports/src/noux-pkg/binutils/patches/riscv_files.patch similarity index 100% rename from tool/patches/binutils-2.25/riscv_files.patch rename to repos/ports/src/noux-pkg/binutils/patches/riscv_files.patch diff --git a/tool/patches/binutils-2.25/series b/repos/ports/src/noux-pkg/binutils/patches/series similarity index 100% rename from tool/patches/binutils-2.25/series rename to repos/ports/src/noux-pkg/binutils/patches/series diff --git a/repos/ports/src/noux-pkg/gcc/arm.patch b/repos/ports/src/noux-pkg/gcc/patches/arm.patch similarity index 100% rename from repos/ports/src/noux-pkg/gcc/arm.patch rename to repos/ports/src/noux-pkg/gcc/patches/arm.patch diff --git a/tool/patches/gcc-4.9.2/config.patch b/repos/ports/src/noux-pkg/gcc/patches/config.patch similarity index 100% rename from tool/patches/gcc-4.9.2/config.patch rename to repos/ports/src/noux-pkg/gcc/patches/config.patch diff --git a/tool/patches/gcc-4.9.2/gnu_inline_mismatch.patch b/repos/ports/src/noux-pkg/gcc/patches/gnu_inline_mismatch.patch similarity index 100% rename from tool/patches/gcc-4.9.2/gnu_inline_mismatch.patch rename to repos/ports/src/noux-pkg/gcc/patches/gnu_inline_mismatch.patch diff --git a/tool/patches/gcc-4.9.2/go_libbacktrace.patch b/repos/ports/src/noux-pkg/gcc/patches/go_libbacktrace.patch similarity index 100% rename from tool/patches/gcc-4.9.2/go_libbacktrace.patch rename to repos/ports/src/noux-pkg/gcc/patches/go_libbacktrace.patch diff --git a/tool/patches/gcc-4.9.2/host_target_combination.patch b/repos/ports/src/noux-pkg/gcc/patches/host_target_combination.patch similarity index 100% rename from tool/patches/gcc-4.9.2/host_target_combination.patch rename to repos/ports/src/noux-pkg/gcc/patches/host_target_combination.patch diff --git a/tool/patches/gcc-4.9.2/libgcc_s.patch b/repos/ports/src/noux-pkg/gcc/patches/libgcc_s.patch similarity index 100% rename from tool/patches/gcc-4.9.2/libgcc_s.patch rename to repos/ports/src/noux-pkg/gcc/patches/libgcc_s.patch diff --git a/tool/patches/gcc-4.9.2/libstdcxx_without_libc.patch b/repos/ports/src/noux-pkg/gcc/patches/libstdcxx_without_libc.patch similarity index 100% rename from tool/patches/gcc-4.9.2/libstdcxx_without_libc.patch rename to repos/ports/src/noux-pkg/gcc/patches/libstdcxx_without_libc.patch diff --git a/tool/patches/gcc-4.9.2/libsupcxx_demangle.patch b/repos/ports/src/noux-pkg/gcc/patches/libsupcxx_demangle.patch similarity index 100% rename from tool/patches/gcc-4.9.2/libsupcxx_demangle.patch rename to repos/ports/src/noux-pkg/gcc/patches/libsupcxx_demangle.patch diff --git a/tool/patches/gcc-4.9.2/misc.patch b/repos/ports/src/noux-pkg/gcc/patches/misc.patch similarity index 100% rename from tool/patches/gcc-4.9.2/misc.patch rename to repos/ports/src/noux-pkg/gcc/patches/misc.patch diff --git a/tool/patches/gcc-4.9.2/no_short_enums.patch b/repos/ports/src/noux-pkg/gcc/patches/no_short_enums.patch similarity index 100% rename from tool/patches/gcc-4.9.2/no_short_enums.patch rename to repos/ports/src/noux-pkg/gcc/patches/no_short_enums.patch diff --git a/repos/ports/src/noux-pkg/gcc/build.patch b/repos/ports/src/noux-pkg/gcc/patches/noux_build.patch similarity index 100% rename from repos/ports/src/noux-pkg/gcc/build.patch rename to repos/ports/src/noux-pkg/gcc/patches/noux_build.patch diff --git a/tool/patches/gcc-4.9.2/prefer_pic.patch b/repos/ports/src/noux-pkg/gcc/patches/prefer_pic.patch similarity index 100% rename from tool/patches/gcc-4.9.2/prefer_pic.patch rename to repos/ports/src/noux-pkg/gcc/patches/prefer_pic.patch diff --git a/tool/patches/gcc-4.9.2/riscv.patch b/repos/ports/src/noux-pkg/gcc/patches/riscv.patch similarity index 100% rename from tool/patches/gcc-4.9.2/riscv.patch rename to repos/ports/src/noux-pkg/gcc/patches/riscv.patch diff --git a/tool/patches/gcc-4.9.2/riscv_files.patch b/repos/ports/src/noux-pkg/gcc/patches/riscv_files.patch similarity index 100% rename from tool/patches/gcc-4.9.2/riscv_files.patch rename to repos/ports/src/noux-pkg/gcc/patches/riscv_files.patch diff --git a/tool/patches/gcc-4.9.2/series b/repos/ports/src/noux-pkg/gcc/patches/series similarity index 90% rename from tool/patches/gcc-4.9.2/series rename to repos/ports/src/noux-pkg/gcc/patches/series index e03f45e15c..bf10656759 100644 --- a/tool/patches/gcc-4.9.2/series +++ b/repos/ports/src/noux-pkg/gcc/patches/series @@ -11,3 +11,5 @@ libgcc_s.patch go_libbacktrace.patch target_libbacktrace.patch gnu_inline_mismatch.patch +noux_build.patch +arm.patch diff --git a/tool/patches/gcc-4.9.2/target_libbacktrace.patch b/repos/ports/src/noux-pkg/gcc/patches/target_libbacktrace.patch similarity index 100% rename from tool/patches/gcc-4.9.2/target_libbacktrace.patch rename to repos/ports/src/noux-pkg/gcc/patches/target_libbacktrace.patch diff --git a/tool/patches/gdb-7.3.1/arm_single_step.patch b/repos/ports/src/noux-pkg/gdb/patches/arm_single_step.patch similarity index 100% rename from tool/patches/gdb-7.3.1/arm_single_step.patch rename to repos/ports/src/noux-pkg/gdb/patches/arm_single_step.patch diff --git a/repos/ports/src/app/gdb_monitor/gdbserver_genode.patch b/repos/ports/src/noux-pkg/gdb/patches/gdbserver_genode.patch similarity index 100% rename from repos/ports/src/app/gdb_monitor/gdbserver_genode.patch rename to repos/ports/src/noux-pkg/gdb/patches/gdbserver_genode.patch diff --git a/repos/ports/src/app/gdb_monitor/gdbserver_x86_64.patch b/repos/ports/src/noux-pkg/gdb/patches/gdbserver_x86_64.patch similarity index 100% rename from repos/ports/src/app/gdb_monitor/gdbserver_x86_64.patch rename to repos/ports/src/noux-pkg/gdb/patches/gdbserver_x86_64.patch diff --git a/repos/ports/src/noux-pkg/gdb/build.patch b/repos/ports/src/noux-pkg/gdb/patches/noux_build.patch similarity index 100% rename from repos/ports/src/noux-pkg/gdb/build.patch rename to repos/ports/src/noux-pkg/gdb/patches/noux_build.patch diff --git a/repos/ports/src/noux-pkg/gdb/patches/series b/repos/ports/src/noux-pkg/gdb/patches/series new file mode 100644 index 0000000000..4c6bbe3a9b --- /dev/null +++ b/repos/ports/src/noux-pkg/gdb/patches/series @@ -0,0 +1,7 @@ +siginfo.patch +shared_library.patch +arm_single_step.patch +x86_64.patch +noux_build.patch +gdbserver_genode.patch +gdbserver_x86_64.patch diff --git a/tool/patches/gdb-7.3.1/shared_library.patch b/repos/ports/src/noux-pkg/gdb/patches/shared_library.patch similarity index 100% rename from tool/patches/gdb-7.3.1/shared_library.patch rename to repos/ports/src/noux-pkg/gdb/patches/shared_library.patch diff --git a/repos/ports/src/app/gdb_monitor/siginfo.patch b/repos/ports/src/noux-pkg/gdb/patches/siginfo.patch similarity index 100% rename from repos/ports/src/app/gdb_monitor/siginfo.patch rename to repos/ports/src/noux-pkg/gdb/patches/siginfo.patch diff --git a/tool/patches/gdb-7.3.1/x86_64.patch b/repos/ports/src/noux-pkg/gdb/patches/x86_64.patch similarity index 100% rename from tool/patches/gdb-7.3.1/x86_64.patch rename to repos/ports/src/noux-pkg/gdb/patches/x86_64.patch diff --git a/tool/patches/gdb-7.3.1/series b/tool/patches/gdb-7.3.1/series deleted file mode 100644 index 232641c5e5..0000000000 --- a/tool/patches/gdb-7.3.1/series +++ /dev/null @@ -1,3 +0,0 @@ -shared_library.patch -arm_single_step.patch -x86_64.patch diff --git a/tool/tool_chain b/tool/tool_chain index d4748702ba..647ede88fa 100755 --- a/tool/tool_chain +++ b/tool/tool_chain @@ -43,40 +43,13 @@ MAKE_OPT ?= -j4 GENODE_DIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..) -# -# Download locations -# - -DOWNLOAD_MIRROR ?= ftp://ftp.fu-berlin.de -GCC_DOWNLOAD_URL = $(DOWNLOAD_MIRROR)/gnu/gcc -BINUTILS_DOWNLOAD_URL = $(DOWNLOAD_MIRROR)/gnu/binutils -GDB_DOWNLOAD_URL = $(DOWNLOAD_MIRROR)/gnu/gdb -GMP_DOWNLOAD_URL = $(DOWNLOAD_MIRROR)/gnu/gmp -MPFR_DOWNLOAD_URL = $(DOWNLOAD_MIRROR)/gnu/mpfr -MPC_DOWNLOAD_URL ?= http://www.multiprecision.org/mpc/download - - # # Tool versions and install location # GCC_VERSION = 4.9.2 BINUTILS_VERSION = 2.25 -GDB_VERSION = 7.3.1 -GMP_VERSION = 5.0.2 -MPFR_VERSION = 3.1.0 -MPC_VERSION = 0.9 INSTALL_LOCATION = /usr/local/genode-gcc -DOWNLOAD_DIR = download -CONTRIB_DIR = contrib -SIGVERIFIER = $(GENODE_DIR)/tool/download_sigver - -BINUTILS_DOWNLOAD_TBZ2 = binutils-$(BINUTILS_VERSION).tar.bz2 - -# download file name differs from dir name found within the archive -ifeq ($(BINUTILS_VERSION),2.21.1) -BINUTILS_DOWNLOAD_TBZ2 = binutils-$(BINUTILS_VERSION)a.tar.bz2 -endif # # Utilities @@ -293,71 +266,40 @@ endif build_all: $(GCC_INSTALLED_BINARIES) $(GDB_INSTALLED_BINARIES) -$(DOWNLOAD_DIR): - $(VERBOSE)mkdir -p $@ +GMP_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current gmp)/src/lib/gmp -$(DOWNLOAD_DIR)/$(BINUTILS_DOWNLOAD_TBZ2): $(DOWNLOAD_DIR) - $(ECHO) "$(BRIGHT_COL)downloading binutils...$(DEFAULT_COL)" - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(BINUTILS_DOWNLOAD_URL)/$(BINUTILS_DOWNLOAD_TBZ2) && touch $@ - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(BINUTILS_DOWNLOAD_URL)/$(BINUTILS_DOWNLOAD_TBZ2).sig && touch $@ - $(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(BINUTILS_DOWNLOAD_TBZ2) $(DOWNLOAD_DIR)/$(BINUTILS_DOWNLOAD_TBZ2).sig GNU +$(GMP_CONTRIB_DIR)/configure: + $(ECHO) "$(BRIGHT_COL)preparing gmp...$(DEFAULT_COL)" + $(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port gmp -$(DOWNLOAD_DIR)/gcc-$(GCC_VERSION).tar.bz2: $(DOWNLOAD_DIR) - $(ECHO) "$(BRIGHT_COL)downloading gcc...$(DEFAULT_COL)" - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GCC_DOWNLOAD_URL)/gcc-$(GCC_VERSION)/gcc-$(GCC_VERSION).tar.bz2 && touch $@ - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GCC_DOWNLOAD_URL)/gcc-$(GCC_VERSION)/gcc-$(GCC_VERSION).tar.bz2.sig && touch $@ - $(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/gcc-$(GCC_VERSION).tar.bz2 $(DOWNLOAD_DIR)/gcc-$(GCC_VERSION).tar.bz2.sig GNU +MPFR_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current mpfr)/src/lib/mpfr -$(DOWNLOAD_DIR)/gmp-$(GMP_VERSION).tar.bz2: $(DOWNLOAD_DIR) - $(ECHO) "$(BRIGHT_COL)downloading gmp...$(DEFAULT_COL)" - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GMP_DOWNLOAD_URL)/gmp-$(GMP_VERSION).tar.bz2 && touch $@ - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GMP_DOWNLOAD_URL)/gmp-$(GMP_VERSION).tar.bz2.sig && touch $@ - $(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/gmp-$(GMP_VERSION).tar.bz2 $(DOWNLOAD_DIR)/gmp-$(GMP_VERSION).tar.bz2.sig GNU +$(MPFR_CONTRIB_DIR)/configure: + $(ECHO) "$(BRIGHT_COL)preparing mpfr...$(DEFAULT_COL)" + $(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port mpfr -$(DOWNLOAD_DIR)/mpfr-$(MPFR_VERSION).tar.bz2: $(DOWNLOAD_DIR) - $(ECHO) "$(BRIGHT_COL)downloading mpfr...$(DEFAULT_COL)" - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPFR_DOWNLOAD_URL)/mpfr-$(MPFR_VERSION).tar.bz2 && touch $@ - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPFR_DOWNLOAD_URL)/mpfr-$(MPFR_VERSION).tar.bz2.sig && touch $@ - $(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/mpfr-$(MPFR_VERSION).tar.bz2 $(DOWNLOAD_DIR)/mpfr-$(MPFR_VERSION).tar.bz2.sig +MPC_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current mpc)/src/lib/mpc -$(DOWNLOAD_DIR)/mpc-$(MPC_VERSION).tar.gz: $(DOWNLOAD_DIR) - $(ECHO) "$(BRIGHT_COL)downloading mpc...$(DEFAULT_COL)" - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPC_DOWNLOAD_URL)/mpc-$(MPC_VERSION).tar.gz && touch $@ - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPC_DOWNLOAD_URL)/mpc-$(MPC_VERSION).tar.gz.asc && touch $@ - # GPG key from http://www.multiprecision.org/index.php?prog=mpc&page=download - $(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/mpc-$(MPC_VERSION).tar.gz $(DOWNLOAD_DIR)/mpc-$(MPC_VERSION).tar.gz.asc AD17A21EF8AED8F1CC02DBD9F7D5C9BF765C61E3 +$(MPC_CONTRIB_DIR)/configure: + $(ECHO) "$(BRIGHT_COL)preparing mpc...$(DEFAULT_COL)" + $(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port mpc -$(CONTRIB_DIR)/gmp-$(GMP_VERSION)/configure: $(DOWNLOAD_DIR)/gmp-$(GMP_VERSION).tar.bz2 - $(ECHO) "$(BRIGHT_COL)unpacking gmp...$(DEFAULT_COL)" - $(VERBOSE)tar xfj $< -C $(CONTRIB_DIR) +GCC_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current gcc)/src/noux-pkg/gcc -$(CONTRIB_DIR)/mpfr-$(MPFR_VERSION)/configure: $(DOWNLOAD_DIR)/mpfr-$(MPFR_VERSION).tar.bz2 - $(ECHO) "$(BRIGHT_COL)unpacking mpfr...$(DEFAULT_COL)" - $(VERBOSE)tar xfj $< -C $(CONTRIB_DIR) +$(GCC_CONTRIB_DIR)/configure: + $(ECHO) "$(BRIGHT_COL)preparing gcc...$(DEFAULT_COL)" + $(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port gcc -$(CONTRIB_DIR)/mpc-$(MPC_VERSION)/configure: $(DOWNLOAD_DIR)/mpc-$(MPC_VERSION).tar.gz - $(ECHO) "$(BRIGHT_COL)unpacking mpc...$(DEFAULT_COL)" - $(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) +BINUTILS_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current binutils)/src/noux-pkg/binutils -$(CONTRIB_DIR)/gcc-$(GCC_VERSION): $(addprefix $(DOWNLOAD_DIR)/,gcc-$(GCC_VERSION).tar.bz2) - $(ECHO) "$(BRIGHT_COL)unpacking gcc...$(DEFAULT_COL)" - $(VERBOSE)mkdir -p $(CONTRIB_DIR) - $(VERBOSE)for i in $^ ; do tar xfj $$i -C $(CONTRIB_DIR) ;done - $(VERBOSE)touch $@ +$(BINUTILS_CONTRIB_DIR)/configure: + $(ECHO) "$(BRIGHT_COL)preparing binutils...$(DEFAULT_COL)" + $(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port binutils -include $(GENODE_DIR)/tool/tool_chain_gcc_patches.inc - -$(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION): $(addprefix $(DOWNLOAD_DIR)/,$(BINUTILS_DOWNLOAD_TBZ2)) - $(ECHO) "$(BRIGHT_COL)unpacking binutils...$(DEFAULT_COL)" - $(VERBOSE)mkdir -p $(CONTRIB_DIR) - $(VERBOSE)tar xfj $^ -C $(CONTRIB_DIR) && touch $@ - -include $(GENODE_DIR)/tool/tool_chain_binutils_patches.inc - -build/$(PLATFORM)/binutils/Makefile: $(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION)/configure +build/$(PLATFORM)/binutils/Makefile: $(BINUTILS_CONTRIB_DIR)/configure $(ECHO) "$(BRIGHT_COL)configuring binutils...$(DEFAULT_COL)" $(VERBOSE)mkdir -p $(dir $@) - $(VERBOSE)cd $(dir $@); $(shell pwd)/$(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION)/configure $(BINUTILS_CONFIG) + $(VERBOSE)cd $(dir $@); $(BINUTILS_CONTRIB_DIR)/configure $(BINUTILS_CONFIG) $(BINUTILS_BINARIES): build/$(PLATFORM)/binutils/Makefile $(ECHO) "$(BRIGHT_COL)builing binutils...$(DEFAULT_COL)" @@ -386,24 +328,24 @@ $(LOCAL_LIB_INSTALL_LOCATION)/lib/lib%.a: $(ECHO) "$(BRIGHT_COL)building lib$*...$(DEFAULT_COL)" $(VERBOSE)make -C build/$* all install -build/gmp/Makefile: $(CONTRIB_DIR)/gmp-$(GMP_VERSION)/configure +build/gmp/Makefile: $(GMP_CONTRIB_DIR)/configure build/gmp/Makefile: $(ECHO) "$(BRIGHT_COL)configuring libgmp...$(DEFAULT_COL)" $(VERBOSE)mkdir -p $(dir $@) $(VERBOSE)cd $(dir $@); \ - $(shell pwd)/$(CONTRIB_DIR)/gmp-$(GMP_VERSION)/configure $(GMP_CONFIG) + $(GMP_CONTRIB_DIR)/configure $(GMP_CONFIG) -build/mpfr/Makefile: $(CONTRIB_DIR)/mpfr-$(MPFR_VERSION)/configure \ +build/mpfr/Makefile: $(MPFR_CONTRIB_DIR)/configure \ $(LOCAL_LIB_INSTALL_LOCATION)/lib/libgmp.a build/mpfr/Makefile: $(ECHO) "$(BRIGHT_COL)configuring libmpfr...$(DEFAULT_COL)" $(VERBOSE)mkdir -p $(dir $@) $(VERBOSE)cd $(dir $@); \ - $(shell pwd)/$(CONTRIB_DIR)/mpfr-$(MPFR_VERSION)/configure $(MPFR_CONFIG) + $(MPFR_CONTRIB_DIR)/configure $(MPFR_CONFIG) -build/mpc/Makefile: $(CONTRIB_DIR)/mpc-$(MPC_VERSION)/configure \ +build/mpc/Makefile: $(MPC_CONTRIB_DIR)/configure \ $(LOCAL_LIB_INSTALL_LOCATION)/lib/libgmp.a \ $(LOCAL_LIB_INSTALL_LOCATION)/lib/libmpfr.a @@ -411,9 +353,9 @@ build/mpc/Makefile: $(ECHO) "$(BRIGHT_COL)configuring libmpc...$(DEFAULT_COL)" $(VERBOSE)mkdir -p $(dir $@) $(VERBOSE)cd $(dir $@); \ - $(shell pwd)/$(CONTRIB_DIR)/mpc-$(MPC_VERSION)/configure $(MPC_CONFIG) + $(MPC_CONTRIB_DIR)/configure $(MPC_CONFIG) -build/$(PLATFORM)/gcc/Makefile: $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/configure \ +build/$(PLATFORM)/gcc/Makefile: $(GCC_CONTRIB_DIR)/configure \ $(BINUTILS_INSTALLED_BINARIES) \ $(LOCAL_LIB_INSTALL_LOCATION)/lib/libgmp.a \ $(LOCAL_LIB_INSTALL_LOCATION)/lib/libmpfr.a \ @@ -425,7 +367,7 @@ build/$(PLATFORM)/gcc/Makefile: $(VERBOSE)cd $(dir $@); \ host_configargs="$(HOST_CONFIG_ARGS)" \ target_configargs="$(TARGET_CONFIG_ARGS)" \ - $(shell pwd)/$(CONTRIB_DIR)/gcc-$(GCC_VERSION)/configure $(GCC_CONFIG) + $(GCC_CONTRIB_DIR)/configure $(GCC_CONFIG) $(GCC_BINARIES): build/$(PLATFORM)/gcc/Makefile \ $(LIBC) @@ -438,24 +380,17 @@ $(GCC_INSTALLED_BINARIES): $(GCC_BINARIES) $(ECHO) "$(BRIGHT_COL)installing gcc...$(DEFAULT_COL)" $(VERBOSE)$(MAKE) -C build/$(PLATFORM)/gcc $(GCC_INSTALL_RULE) -$(DOWNLOAD_DIR)/gdb-$(GDB_VERSION).tar.bz2: $(DOWNLOAD_DIR) - $(ECHO) "$(BRIGHT_COL)downloading gdb...$(DEFAULT_COL)" - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GDB_DOWNLOAD_URL)/gdb-$(GDB_VERSION).tar.bz2 && touch $@ - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GDB_DOWNLOAD_URL)/gdb-$(GDB_VERSION).tar.bz2.sig && touch $@ - $(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/gdb-$(GDB_VERSION).tar.bz2 $(DOWNLOAD_DIR)/gdb-$(GDB_VERSION).tar.bz2.sig GNU +GDB_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current gdb)/src/noux-pkg/gdb -$(CONTRIB_DIR)/gdb-$(GDB_VERSION): $(DOWNLOAD_DIR)/gdb-$(GDB_VERSION).tar.bz2 - $(ECHO) "$(BRIGHT_COL)unpacking gdb...$(DEFAULT_COL)" - $(VERBOSE)mkdir -p $(CONTRIB_DIR) - $(VERBOSE)tar xfj $^ -C $(CONTRIB_DIR) && touch $@ +$(GDB_CONTRIB_DIR)/configure: + $(ECHO) "$(BRIGHT_COL)preparing gdb...$(DEFAULT_COL)" + $(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port gdb -include $(GENODE_DIR)/tool/tool_chain_gdb_patches.inc - -build/$(PLATFORM)/gdb/Makefile: $(CONTRIB_DIR)/gdb-$(GDB_VERSION)/configure +build/$(PLATFORM)/gdb/Makefile: $(GDB_CONTRIB_DIR)/configure $(ECHO) "$(BRIGHT_COL)configuring gdb...$(DEFAULT_COL)" $(VERBOSE)mkdir -p $(dir $@) $(VERBOSE)cd $(dir $@); \ - $(shell pwd)/$(CONTRIB_DIR)/gdb-$(GDB_VERSION)/configure $(GDB_CONFIG) + $(GDB_CONTRIB_DIR)/configure $(GDB_CONFIG) $(GDB_BINARIES): build/$(PLATFORM)/gdb/Makefile $(ECHO) "$(BRIGHT_COL)builing gdb...$(DEFAULT_COL)" @@ -470,12 +405,9 @@ $(GDB_INSTALLED_BINARIES): $(GDB_BINARIES) # clean: - rm -rf $(addprefix $(CONTRIB_DIR)/,binutils-$(BINUTILS_VERSION) gcc-$(GCC_VERSION)) rm -rf build cleanall: clean - rm -rf $(DOWNLOAD_DIR)/$(BINUTILS_DOWNLOAD_TBZ2) - rm -rf $(DOWNLOAD_DIR)/gcc-$(GCC_VERSION).tar.bz2 # # Install rules diff --git a/tool/tool_chain_binutils_patches.inc b/tool/tool_chain_binutils_patches.inc deleted file mode 100755 index c329c0e967..0000000000 --- a/tool/tool_chain_binutils_patches.inc +++ /dev/null @@ -1,12 +0,0 @@ -BINUTILS_PATCHES_DIR = $(GENODE_DIR)/tool/patches/binutils-$(BINUTILS_VERSION) -BINUTILS_PATCHES = $(shell cat $(BINUTILS_PATCHES_DIR)/series) - -$(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION)/configure:: $(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION) - $(ECHO) "$(BRIGHT_COL)patching binutils build system...$(DEFAULT_COL)" - $(VERBOSE)for p in $(BINUTILS_PATCHES); do \ - patch -d $(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION) -p1 -i $(BINUTILS_PATCHES_DIR)/$$p; done; - @# - @# Re-generate configure scripts - @# - $(VERBOSE)cd $(CONTRIB_DIR)/binutils-$(BINUTILS_VERSION)/bfd; $(AUTOCONF) - $(VERBOSE)touch $@ diff --git a/tool/tool_chain_gcc_patches.inc b/tool/tool_chain_gcc_patches.inc deleted file mode 100755 index b9db399ae4..0000000000 --- a/tool/tool_chain_gcc_patches.inc +++ /dev/null @@ -1,16 +0,0 @@ -GCC_PATCHES_DIR = $(GENODE_DIR)/tool/patches/gcc-$(GCC_VERSION) -GCC_PATCHES = $(shell cat $(GCC_PATCHES_DIR)/series) - -$(CONTRIB_DIR)/gcc-$(GCC_VERSION)/configure:: $(CONTRIB_DIR)/gcc-$(GCC_VERSION) - $(ECHO) "$(BRIGHT_COL)patching gcc build system...$(DEFAULT_COL)" - $(VERBOSE)for p in $(GCC_PATCHES); do \ - patch -d $(CONTRIB_DIR)/gcc-$(GCC_VERSION) -p1 -i $(GCC_PATCHES_DIR)/$$p; done; - @# - @# Re-generate configure scripts - @# - $(VERBOSE)cd $(CONTRIB_DIR)/gcc-$(GCC_VERSION); autogen Makefile.def - $(VERBOSE)cd $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc; $(AUTOCONF) - $(VERBOSE)cd $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libstdc++-v3; $(AUTOCONF) - $(VERBOSE)cd $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc; $(AUTOCONF) - $(VERBOSE)cd $(CONTRIB_DIR)/gcc-$(GCC_VERSION); $(AUTOCONF) - $(VERBOSE)touch $@ diff --git a/tool/tool_chain_gdb_patches.inc b/tool/tool_chain_gdb_patches.inc deleted file mode 100755 index 8fcb52b8ad..0000000000 --- a/tool/tool_chain_gdb_patches.inc +++ /dev/null @@ -1,8 +0,0 @@ -GDB_PATCHES_DIR = $(GENODE_DIR)/tool/patches/gdb-$(GDB_VERSION) -GDB_PATCHES = $(shell cat $(GDB_PATCHES_DIR)/series) - -$(CONTRIB_DIR)/gdb-$(GDB_VERSION)/configure:: $(CONTRIB_DIR)/gdb-$(GDB_VERSION) - $(ECHO) "$(BRIGHT_COL)patching gdb...$(DEFAULT_COL)" - $(VERBOSE)for p in $(GDB_PATCHES); do \ - patch -d $(CONTRIB_DIR)/gdb-$(GDB_VERSION) -p1 -i $(GDB_PATCHES_DIR)/$$p; done; - $(VERBOSE)touch $@