From: quzar <qu...@us...> - 2024-05-16 05:20:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 635e6aaf63b3144409ebcc806f5ed3edd5df2554 (commit) from e17f49f99fc204220008a85f4b887ab301595f02 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 635e6aaf63b3144409ebcc806f5ed3edd5df2554 Author: Colton Pawielski <cep...@us...> Date: Thu May 16 00:12:15 2024 -0500 Copy GNU configs into toolchain sources (#323) This change downloads the newest versions of config.guess & config.sub into the dc-chain directory and then uses those files to replace any found in the downloaded sources. This should fix issues when building older releases on newer machines that the old scripts wouldn't recognize properly. Co-authored-by: darcagn <da...@pr...> ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/.gitignore | 1 + utils/dc-chain/scripts/clean.mk | 4 ++++ utils/dc-chain/scripts/host-detect.mk | 3 +++ utils/dc-chain/scripts/patch.mk | 22 ++++++++++++++++++++++ 4 files changed, 30 insertions(+) diff --git a/utils/dc-chain/.gitignore b/utils/dc-chain/.gitignore index 5d007085..bfcd920c 100644 --- a/utils/dc-chain/.gitignore +++ b/utils/dc-chain/.gitignore @@ -7,4 +7,5 @@ gdb-* build-* *.stamp config.guess +config.sub *.cfg diff --git a/utils/dc-chain/scripts/clean.mk b/utils/dc-chain/scripts/clean.mk index 8550e44d..f7e677c4 100644 --- a/utils/dc-chain/scripts/clean.mk +++ b/utils/dc-chain/scripts/clean.mk @@ -46,6 +46,8 @@ clean-gdb-archives: -rm -f $(gdb_file) clean-arm-archives: + -rm -f $(config_guess) + -rm -f $(config_sub) -rm -f $(arm_binutils_file) -rm -f $(arm_gcc_file) -rm -f $(arm_gmp_file) @@ -54,6 +56,8 @@ clean-arm-archives: -rm -f $(arm_isl_file) clean-sh-archives: + -rm -f $(config_guess) + -rm -f $(config_sub) -rm -f $(sh_binutils_file) -rm -f $(sh_gcc_file) -rm -f $(newlib_file) diff --git a/utils/dc-chain/scripts/host-detect.mk b/utils/dc-chain/scripts/host-detect.mk index 05bb89be..6782d4d3 100644 --- a/utils/dc-chain/scripts/host-detect.mk +++ b/utils/dc-chain/scripts/host-detect.mk @@ -9,6 +9,8 @@ # This will help a lot to execute conditional steps depending on the host. config_guess = config.guess config_guess_url = http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=${config_guess};hb=HEAD +config_sub = config.sub +config_sub_url = http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=${config_sub};hb=HEAD is_clean_target=$(findstring clean,$(MAKECMDGOALS)) config_guess_check=$(shell test -f ./config.guess || echo 0) @@ -16,6 +18,7 @@ ifeq ($(is_clean_target),) ifeq ($(config_guess_check),0) $(info Downloading $(config_guess)) $(shell $(call web_download,$(config_guess_url),$(config_guess))) + $(shell $(call web_download,$(config_sub_url),$(config_sub))) $(shell chmod +x $(config_guess)) endif endif diff --git a/utils/dc-chain/scripts/patch.mk b/utils/dc-chain/scripts/patch.mk index 8314dd20..df724905 100644 --- a/utils/dc-chain/scripts/patch.mk +++ b/utils/dc-chain/scripts/patch.mk @@ -82,6 +82,25 @@ define patch_apply fi; endef +# This function is used to replace the config.guess & config.sub that come +# bundled with the sources with updated versions from GNU. This fixes issues +# when trying to compile older versions of the toolchain software on newer +# hardware. +define update_configs + @echo "+++ Updating $(1) files in $(src_dir)"; \ + files=$$(find $(src_dir) -name $(1)); \ + echo "$${files}" | while I= read -r line; do \ + echo " $${line}"; \ + cp $(1) $${line} > /dev/null; \ + done; \ + echo "" +endef + +define update_config_guess_sub + $(call update_configs,config.guess) + $(call update_configs,config.sub) +endef + # Binutils $(patch_binutils): patch_target_name = Binutils $(patch_binutils): src_dir = binutils-$(binutils_ver) @@ -90,6 +109,7 @@ $(patch_binutils): diff_patches := $(wildcard $(patches)/$(src_dir)*.diff) $(patch_binutils): diff_patches += $(wildcard $(patches)/$(host_triplet)/$(src_dir)*.diff) $(patch_binutils): $(call patch_apply) + $(call update_config_guess_sub) # GNU Compiler Collection (GCC) $(patch_gcc): patch_target_name = GCC @@ -104,6 +124,7 @@ endif endif $(patch_gcc): $(call patch_apply) + $(call update_config_guess_sub) # Newlib $(patch_newlib): patch_target_name = Newlib @@ -113,3 +134,4 @@ $(patch_newlib): diff_patches := $(wildcard $(patches)/$(src_dir)*.diff) $(patch_newlib): diff_patches += $(wildcard $(patches)/$(host_triplet)/$(src_dir)*.diff) $(patch_newlib): $(call patch_apply) + $(call update_config_guess_sub) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |