From: Lawrence S. <ljs...@us...> - 2020-09-19 23:29:36
|
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 9e04dfc35a091e80929d6158cda53d7c804c5f30 (commit) via 224dbb559a7e90b8cb003f7575ae562038534418 (commit) via 099fd94740dfc20da3f1daf621bb474101d53980 (commit) via 3b9c14871991f13034a1fbadb43c62bd69d9372d (commit) via 75391ea0b8cebd429c100bf4b6bd145302d7b7e6 (commit) via f91ddef9c87ea4883a8113c3a437c56e1290f7e6 (commit) via cc01c36133be2db3b3072d681039aca5ca20bac0 (commit) via 547f9729818f3a39df6de6e6e19e6f641ebd0773 (commit) via 58911457d200517e12ff51b3e4f9f7ca2049ed0c (commit) via 6f44478f01f7ed4c562da44b7fa9e27de8205a6d (commit) via dfe683ad6cd627ad95d67b62f482ed7e1b3983ea (commit) via a4077367991ad58a9f44a78c331cb65d67a2d7fa (commit) from a9d0ae1cc06071469ba8a40480d2ca7f5e2b73e2 (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 9e04dfc35a091e80929d6158cda53d7c804c5f30 Merge: a9d0ae1 224dbb5 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:28:27 2020 -0400 Merge pull request #46 from sizious/dc-chain-upgrade Major dc-chain updates. commit 224dbb559a7e90b8cb003f7575ae562038534418 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:27:18 2020 -0400 Update mingw/mingw.md Fix canonical repository locations. commit 099fd94740dfc20da3f1daf621bb474101d53980 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:26:37 2020 -0400 Update mingw/mingw-w64.md Fix canonical repository locations. commit 3b9c14871991f13034a1fbadb43c62bd69d9372d Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:25:41 2020 -0400 Update macos/README.md Fix canonical repository locations. commit 75391ea0b8cebd429c100bf4b6bd145302d7b7e6 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:24:59 2020 -0400 Update linux/debian.md Fix canonical repository locations. commit f91ddef9c87ea4883a8113c3a437c56e1290f7e6 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:24:12 2020 -0400 Update linux/alpine.md Fix canonical repository locations. commit cc01c36133be2db3b3072d681039aca5ca20bac0 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:23:28 2020 -0400 Update cygwin/README.md Fix canonical repository locations. commit 547f9729818f3a39df6de6e6e19e6f641ebd0773 Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 19 19:22:38 2020 -0400 Fix repository location in bsd/README.md The sourceforge repositories are still the canonical locations for KOS and kos-ports. commit 58911457d200517e12ff51b3e4f9f7ca2049ed0c Author: SiZiOUS <si...@gm...> Date: Mon Aug 31 21:50:49 2020 +0200 Removing dcload/dc-tool part from documentation commit 6f44478f01f7ed4c562da44b7fa9e27de8205a6d Author: SiZiOUS <si...@gm...> Date: Mon Aug 31 21:41:06 2020 +0200 Adding missing critical scripts. commit dfe683ad6cd627ad95d67b62f482ed7e1b3983ea Author: SiZiOUS <si...@gm...> Date: Mon Aug 31 21:40:26 2020 +0200 Adding missing patches. commit a4077367991ad58a9f44a78c331cb65d67a2d7fa Author: SiZiOUS <si...@gm...> Date: Mon Aug 31 10:47:22 2020 +0200 Major upgrade of dc-chain utility. This version was completely revamped in order to work out-of-the box under several OS/environments, including (but not limited to): - BSD - GNU/Linux - macOS (including modern macOS versions, e.g. Catalina 10.15.6) - Windows (including MinGW/MSYS, MinGW-w64/MSYS2, Cygwin and WSL) All the configuration is located in the config.mk file; no need to update other files anymore. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/.gitignore | 10 + utils/dc-chain/00PATCHES | 21 -- utils/dc-chain/00README | 33 -- utils/dc-chain/Makefile | 352 ++------------------- utils/dc-chain/README.md | 286 +++++++++++++++++ utils/dc-chain/cleanup.sh | 185 +++++++---- utils/dc-chain/config.mk | 147 +++++++++ utils/dc-chain/doc/CONTRIBUTORS.md | 19 ++ utils/dc-chain/doc/README.md | 16 + utils/dc-chain/doc/bsd/README.md | 135 ++++++++ utils/dc-chain/doc/cygwin/README.md | 150 +++++++++ utils/dc-chain/doc/linux/README.md | 7 + utils/dc-chain/doc/linux/alpine.md | 121 +++++++ utils/dc-chain/doc/linux/debian.md | 121 +++++++ utils/dc-chain/doc/macos/README.md | 149 +++++++++ utils/dc-chain/doc/mingw/README.md | 30 ++ utils/dc-chain/doc/mingw/mingw-w64.md | 174 ++++++++++ utils/dc-chain/doc/mingw/mingw.md | 248 +++++++++++++++ .../doc/mingw/packages/fixup-sh4-newlib.sh | 22 ++ .../mingw/msysCORE-1.0.18-1-heap-patch-20140117.7z | Bin 0 -> 4552241 bytes utils/dc-chain/docker/README.md | 28 ++ utils/dc-chain/docker/stable/Dockerfile | 36 +++ utils/dc-chain/download.sh | 149 +++++---- utils/dc-chain/patches/README.md | 36 +++ .../{gcc-4.7.4-kos.diff => gcc-4.7.3-kos.diff} | 74 ++--- .../patches/i686-pc-mingw32/binutils-2.31.1.diff | 13 + .../patches/i686-pc-mingw32/binutils-2.34.diff | 30 ++ .../patches/i686-pc-mingw32/gdb-7.12.1.diff | 33 ++ .../dc-chain/patches/i686-pc-mingw32/gdb-8.2.diff | 27 ++ .../patches/i686-pc-mingw32/gdb-8.3.1.diff | 131 ++++++++ .../dc-chain/patches/i686-pc-mingw32/gdb-9.1.diff | 19 ++ .../dc-chain/patches/i686-pc-mingw32/gdb-9.2.diff | 19 ++ utils/dc-chain/scripts/banner-variables.mk | 2 + utils/dc-chain/scripts/banner.mk | 11 + utils/dc-chain/scripts/binutils.mk | 52 +++ utils/dc-chain/scripts/build.mk | 64 ++++ utils/dc-chain/scripts/clean.mk | 29 ++ utils/dc-chain/scripts/common.sh | 118 +++++++ utils/dc-chain/scripts/gcc-pass1.mk | 32 ++ utils/dc-chain/scripts/gcc-pass2.mk | 31 ++ utils/dc-chain/scripts/gdb.mk | 86 +++++ utils/dc-chain/scripts/host-detect.mk | 85 +++++ utils/dc-chain/scripts/init.mk | 125 ++++++++ utils/dc-chain/scripts/insight.mk | 59 ++++ utils/dc-chain/scripts/logdir.mk | 9 + utils/dc-chain/scripts/newlib.mk | 62 ++++ utils/dc-chain/scripts/options.mk | 26 ++ utils/dc-chain/scripts/patch.mk | 82 +++++ utils/dc-chain/scripts/phony.mk | 14 + utils/dc-chain/scripts/variables.mk | 51 +++ utils/dc-chain/unpack.sh | 159 ++++++---- 51 files changed, 3303 insertions(+), 615 deletions(-) create mode 100644 utils/dc-chain/.gitignore delete mode 100644 utils/dc-chain/00PATCHES delete mode 100644 utils/dc-chain/00README create mode 100644 utils/dc-chain/README.md create mode 100644 utils/dc-chain/config.mk create mode 100644 utils/dc-chain/doc/CONTRIBUTORS.md create mode 100644 utils/dc-chain/doc/README.md create mode 100644 utils/dc-chain/doc/bsd/README.md create mode 100644 utils/dc-chain/doc/cygwin/README.md create mode 100644 utils/dc-chain/doc/linux/README.md create mode 100644 utils/dc-chain/doc/linux/alpine.md create mode 100644 utils/dc-chain/doc/linux/debian.md create mode 100644 utils/dc-chain/doc/macos/README.md create mode 100644 utils/dc-chain/doc/mingw/README.md create mode 100644 utils/dc-chain/doc/mingw/mingw-w64.md create mode 100644 utils/dc-chain/doc/mingw/mingw.md create mode 100644 utils/dc-chain/doc/mingw/packages/fixup-sh4-newlib.sh create mode 100644 utils/dc-chain/doc/mingw/packages/mingw/msysCORE-1.0.18-1-heap-patch-20140117.7z create mode 100644 utils/dc-chain/docker/README.md create mode 100644 utils/dc-chain/docker/stable/Dockerfile create mode 100644 utils/dc-chain/patches/README.md copy utils/dc-chain/patches/{gcc-4.7.4-kos.diff => gcc-4.7.3-kos.diff} (95%) create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/binutils-2.31.1.diff create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/binutils-2.34.diff create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/gdb-7.12.1.diff create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/gdb-8.2.diff create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/gdb-8.3.1.diff create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/gdb-9.1.diff create mode 100644 utils/dc-chain/patches/i686-pc-mingw32/gdb-9.2.diff create mode 100644 utils/dc-chain/scripts/banner-variables.mk create mode 100644 utils/dc-chain/scripts/banner.mk create mode 100644 utils/dc-chain/scripts/binutils.mk create mode 100644 utils/dc-chain/scripts/build.mk create mode 100644 utils/dc-chain/scripts/clean.mk create mode 100755 utils/dc-chain/scripts/common.sh create mode 100644 utils/dc-chain/scripts/gcc-pass1.mk create mode 100644 utils/dc-chain/scripts/gcc-pass2.mk create mode 100644 utils/dc-chain/scripts/gdb.mk create mode 100644 utils/dc-chain/scripts/host-detect.mk create mode 100644 utils/dc-chain/scripts/init.mk create mode 100644 utils/dc-chain/scripts/insight.mk create mode 100644 utils/dc-chain/scripts/logdir.mk create mode 100644 utils/dc-chain/scripts/newlib.mk create mode 100644 utils/dc-chain/scripts/options.mk create mode 100644 utils/dc-chain/scripts/patch.mk create mode 100644 utils/dc-chain/scripts/phony.mk create mode 100644 utils/dc-chain/scripts/variables.mk diff --git a/utils/dc-chain/.gitignore b/utils/dc-chain/.gitignore new file mode 100644 index 0000000..01041b6 --- /dev/null +++ b/utils/dc-chain/.gitignore @@ -0,0 +1,10 @@ +logs +*.tar.* +binutils-* +gcc-* +newlib-* +gdb-* +insight-* +build-* +*.stamp +config.guess diff --git a/utils/dc-chain/00PATCHES b/utils/dc-chain/00PATCHES deleted file mode 100644 index 410a35b..0000000 --- a/utils/dc-chain/00PATCHES +++ /dev/null @@ -1,21 +0,0 @@ -gcc-3.4.6-diff: -- Defines SUPPORT_WEAK 0 in config/sh/kos.h so that pthreads will not create - weak symbols (GNU ld does not extract weak symbols from archives). -- Do not build m2/m2e/m4-single/m4 by default. Should be unnecessary once - we have a sh-kos-elf target. -- Adds config/sh/kos.h to config.gcc. Note: this is under sh-elf-unknown. - Once we have a sh-kos-elf target, that should be corrected. -- Add sh4/atomicity.h stub, not currently used. Requires addition of spinlock - or interrupt disable/enable code. Currently we use the generic atomicity - functions, which use pthreads (slow). -- Correct bug (?) in config/generic/atomicity.h (_GLIBCXX_ macros undefined). -- Add sh-unknown-elf defines to libstdc++/crossconfig.m4 -- this was done by - default (accident?) prior to 3.4. - -Generic newlib fixups (applied directly after newlib is installed): - cp $(kos_base)/include/pthread.h $(newlib_inc) # KOS pthread.h is modified - cp $(kos_base)/include/sys/_pthread.h $(newlib_inc)/sys # to define _POSIX_THREADS - cp $(kos_base)/include/sys/sched.h $(newlib_inc)/sys # pthreads to kthreads mapping - ln -nsf $(kos_base)/include/kos $(newlib_inc) # so KOS includes are available as kos/file.h - ln -nsf $(kos_base)/kernel/arch/dreamcast/include/arch $(newlib_inc) # kos/thread.h requires arch/arch.h - ln -nsf $(kos_base)/kernel/arch/dreamcast/include/dc $(newlib_inc) # arch/arch.h requires dc/video.h diff --git a/utils/dc-chain/00README b/utils/dc-chain/00README deleted file mode 100644 index 7f4e257..0000000 --- a/utils/dc-chain/00README +++ /dev/null @@ -1,33 +0,0 @@ -dc-chain 0.3 ------------- - -This package contains a Makefile which both simplifies building the Dreamcast -toolchain, and gives you substantial control. - -On the minimum hassle side, 'make' will patch everything (using patches/*.diff) -and build both the sh and arm toolchains. 'make erase=1' will erase the build -directories as they become safe to delete, to save space. And as for a more -complex example, 'make patch-gcc build-sh4-gcc-pass1 thread_model=single' will -build a patched, single-threaded sh4 gcc pass 1 compiler. Please see the -comments at the top of the Makefile for more options. - -Before you start, change the variables in the User Configuration section to -match your environment. They can be overridden at the command line as well. - -Then untar your binutils, gcc-core, and optionally newlib and gcc-g++ -distributions into this directory (or copy Makefile and patches/ into your -build directory.) Also, ensure the KOS distribution is unpacked, and set -its path in the Makefile, because some KOS includes are copied over to newlib. - -Finally, run make. If anything goes wrong, check the output in logs/. - -Some patches are included in this package as well. There are several different -versions provided for GCC and Newlib. The most well tested combination is -GCC 4.7.4 with Newlib 2.0.0, but there are also newer possibilities that are in -testing (GCC 9.3.0 with Newlib 3.3.0). - -You should not attempt to spawn multiple jobs with make. Using "make -j2" or any -other number after the -j will probably break things. There is however now an -option inside the Makefile to set the number of jobs for the building phases. -Set the makejobs variable in the Makefile to whatever you would normally feel -the need to use on the command line, and it will do the right thing. diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index b0ccf8a..09c1ac5 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -1,358 +1,66 @@ -# Dreamcast toolchain makefile by Jim Ursetto -# adapted from Stalin's build script version 0.3 +# Sega Dreamcast Toolchains Maker (dc-chain) +# This file is part of KallistiOS. # -# Interesting parameters: -# erase=0|1 Erase build directories on the fly to save space -# thread_model=single|kos Set gcc threading model -# verbose=0|1 Display -# makejobs=-jn Set the number of jobs for calls to make to n +# Created by Jim Ursetto (2004) +# Initially adapted from Stalin's build script version 0.3. # -# Interesting targets (you can 'make' any of these): -# all: patch build -# patch: patch-gcc patch-newlib patch-kos -# build: build-sh4 build-arm -# build-sh4: build-sh4-binutils build-sh4-gcc -# build-arm: build-arm-binutils build-arm-gcc -# build-sh4-gcc: build-sh4-gcc-pass1 build-sh4-newlib build-sh4-gcc-pass2 -# build-arm-gcc: build-arm-gcc-pass1 -# build-sh4-newlib: build-sh4-newlib-only fixup-sh4-newlib -# gdb -# insight -# User configuration -sh_target=sh-elf -arm_target=arm-eabi -sh_prefix := /opt/toolchains/dc/$(sh_target) -arm_prefix := /opt/toolchains/dc/$(arm_target) -# kos_root: KOS Git root (contains kos/ and kos-ports/) -kos_root=$(CURDIR)/../../.. -# kos_base: equivalent of KOS_BASE (contains include/ and kernel/) -kos_base=$(CURDIR)/../.. -sh_binutils_ver=2.34 -sh_gcc_ver=9.3.0 -newlib_ver=3.3.0 -gdb_ver=9.1 -insight_ver=6.8-1 - -# The ARM version of binutils/gcc is separated out as the -# particular CPU versions we need may not be available in -# newer versions of GCC. -arm_binutils_ver=2.34 -arm_gcc_ver=8.4.0 - -# With GCC 4.x versions and higher, the patches provide a kos thread model, -# so you should use it. With 3.4.6, you probably want posix here. If you -# really don't want threading support for C++ (or Objective C/Objective C++), -# you can set this to single (why you would is beyond me, though). -thread_model=kos -erase=1 -verbose=1 - -# Set this value to -jn where n is the number of jobs you want to run with make. -# If you only want one job, just set this to nothing (i.e, "makejobs="). -# Tracking down problems with multiple make jobs is much more difficult than -# with just one running at a time. So, if you run into trouble, then you should -# clear this variable and try again with just one job running. -makejobs=-j2 - -# Set the languages to build for pass 2 of building gcc for sh-elf. The default -# here is to build C, C++, Objective C, and Objective C++. You may want to take -# out the latter two if you're not worried about them and/or you're short on -# hard drive space. -pass2_languages=c,c++,objc,obj-c++ +# Please edit 'config.mk' to customize your 'dc-chain' setup. +# -# Change this if you don't have Bash installed in /bin -SHELL = /bin/bash +# Display startup banner +include scripts/banner-variables.mk +include scripts/banner.mk -# GCC compiles fine with clang, but only if we use libstdc++ instead of libc++. -UNAME_S := $(shell uname -s) -ifeq ($(UNAME_S),Darwin) - ifneq ($(shell $(CXX) --version | grep clang),) - CXX := "$(CXX) -stdlib=libstdc++" - endif -endif +# User configuration +include config.mk -# Catch all... -ifeq ($(CXX),) - CXX := g++ -endif +# Detect host machine +include scripts/host-detect.mk +# Initialization rules +include scripts/init.mk # Makefile variables -install=$(prefix)/bin -pwd := $(shell pwd) -patches := $(pwd)/patches -logdir := $(pwd)/logs -PATH := $(sh_prefix)/bin:$(arm_prefix)/bin:$(PATH) -binutils_dir=binutils-$(binutils_ver) -gcc_dir=gcc-$(sh_gcc_ver) -newlib_dir=newlib-$(newlib_ver) +include scripts/variables.mk all: patch build # ---- patch {{{ -binutils_patches := $(wildcard $(patches)/binutils-$(binutils_ver)*.diff) -gcc_patches := $(wildcard $(patches)/gcc-$(sh_gcc_ver)*.diff) -newlib_patches := $(wildcard $(patches)/newlib-$(newlib_ver)*.diff) -kos_patches := $(wildcard $(patches)/kos-*.diff) - -patch_targets=patch-binutils patch-gcc patch-newlib patch-kos - -patch: $(patch_targets) -patch-binutils: $(binutils_patches) -patch-gcc: $(gcc_patches) -patch-newlib: $(newlib_patches) -patch-kos: $(kos_patches) - -$(newlib_patches): - patch -N -d $(newlib_dir) -p1 < $@ -$(binutils_patches): - patch -N -d $(binutils_dir) -p1 < $@ - -$(gcc_patches): - patch -N -d $(gcc_dir) -p1 < $@ - -$(kos_patches): - patch -N -d $(kos_root) -p1 < $@ +include scripts/patch.mk # ---- }}} # ---- build {{{ -build: build-sh4 build-arm -build-sh4: build-sh4-binutils build-sh4-gcc -build-arm: build-arm-binutils build-arm-gcc -build-sh4-gcc: build-sh4-gcc-pass1 build-sh4-newlib build-sh4-gcc-pass2 -build-arm-gcc: build-arm-gcc-pass1 - $(clean_arm_hack) -build-sh4-newlib: build-sh4-newlib-only fixup-sh4-newlib - -# Ensure that, no matter where we enter, prefix and target are set correctly. -build_sh4_targets=build-sh4-binutils build-sh4-gcc build-sh4-gcc-pass1 build-sh4-newlib build-sh4-newlib-only build-sh4-gcc-pass2 -build_arm_targets=build-arm-binutils build-arm-gcc build-arm-gcc-pass1 -$(build_sh4_targets): prefix = $(sh_prefix) -$(build_sh4_targets): target = $(sh_target) -$(build_sh4_targets): extra_configure_args = --with-multilib-list=m4-single-only --with-endian=little --with-cpu=m4-single-only -$(build_sh4_targets): gcc_ver = $(sh_gcc_ver) -$(build_sh4_targets): binutils_ver = $(sh_binutils_ver) -$(build_arm_targets): prefix = $(arm_prefix) -$(build_arm_targets): target = $(arm_target) -$(build_arm_targets): extra_configure_args = --with-arch=armv4 --with-mode=arm --disable-multilib -$(build_arm_targets): gcc_ver = $(arm_gcc_ver) -$(build_arm_targets): binutils_ver = $(arm_binutils_ver) - -# To avoid code repetition, we use the same commands for both -# architectures. But we can't create a single target called -# build-binutils for both sh4 and arm, because phony targets -# can't be run multiple times. So we create multiple targets. -build_binutils = build-sh4-binutils build-arm-binutils -build_gcc_pass1 = build-sh4-gcc-pass1 build-arm-gcc-pass1 -build_newlib = build-sh4-newlib-only -build_gcc_pass2 = build-sh4-gcc-pass2 - -# Here we use the essentially same code for multiple targets, -# differing only by the current state of the variables below. -$(build_binutils): build = build-binutils-$(target)-$(binutils_ver) -$(build_binutils): src_dir = binutils-$(binutils_ver) -$(build_binutils): log = $(logdir)/$(build).log -$(build_binutils): logdir - @echo "+++ Building $(src_dir) to $(build)..." - -mkdir -p $(build) - > $(log) - cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) --disable-werror CXX=$(CXX) $(to_log) - $(MAKE) $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) - $(MAKE) -C $(build) install DESTDIR=$(DESTDIR) $(to_log) - $(clean_up) +include scripts/build.mk -$(build_gcc_pass1) $(build_gcc_pass2): build = build-gcc-$(target)-$(gcc_ver) -$(build_gcc_pass1) $(build_gcc_pass2): src_dir = gcc-$(gcc_ver) -$(build_gcc_pass1): log = $(logdir)/$(build)-pass1.log -$(build_gcc_pass1): logdir - @echo "+++ Building $(src_dir) to $(build) (pass 1)..." - -mkdir -p $(build) - > $(log) - cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) --without-headers --with-newlib --enable-languages=c --disable-libssp --disable-tls $(extra_configure_args) CXX=$(CXX) $(to_log) - $(MAKE) $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) - $(MAKE) -C $(build) install-strip DESTDIR=$(DESTDIR) $(to_log) - -$(build_newlib): build = build-newlib-$(target)-$(newlib_ver) -$(build_newlib): src_dir = newlib-$(newlib_ver) -$(build_newlib): log = $(logdir)/$(build).log -$(build_newlib): logdir - @echo "+++ Building $(src_dir) to $(build)..." - -mkdir -p $(build) - > $(log) - cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) $(extra_configure_args) $(to_log) - $(MAKE) $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) - $(MAKE) -C $(build) install DESTDIR=$(DESTDIR) $(to_log) - $(clean_up) - -fixup-sh4-newlib: newlib_inc=$(DESTDIR)$(sh_prefix)/$(sh_target)/include -fixup-sh4-newlib: $(build_newlib) - @echo "+++ Fixing up sh4 newlib includes..." -# KOS pthread.h is modified -# to define _POSIX_THREADS -# pthreads to kthreads mapping -# so KOS includes are available as kos/file.h -# kos/thread.h requires arch/arch.h -# arch/arch.h requires dc/video.h - cp $(kos_base)/include/pthread.h $(newlib_inc) - cp $(kos_base)/include/sys/_pthread.h $(newlib_inc)/sys - cp $(kos_base)/include/sys/sched.h $(newlib_inc)/sys - ln -nsf $(kos_base)/include/kos $(newlib_inc) - ln -nsf $(kos_base)/kernel/arch/dreamcast/include/arch $(newlib_inc) - ln -nsf $(kos_base)/kernel/arch/dreamcast/include/dc $(newlib_inc) - -$(build_gcc_pass2): log = $(logdir)/$(build)-pass2.log -$(build_gcc_pass2): logdir - @echo "+++ Building $(src_dir) to $(build) (pass 2)..." - -mkdir -p $(build) - > $(log) - cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) --with-newlib --disable-libssp --disable-tls \ - --enable-threads=$(thread_model) --enable-languages=$(pass2_languages) $(extra_configure_args) CXX=$(CXX) $(to_log) - $(MAKE) $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) - $(MAKE) -C $(build) install-strip DESTDIR=$(DESTDIR) $(to_log) - $(clean_up) +include scripts/binutils.mk +include scripts/gcc-pass1.mk +include scripts/newlib.mk +include scripts/gcc-pass2.mk # ---- }}}} +# ---- optional components {{{ -# GDB building - -gdb-$(gdb_ver).tar.gz: - @echo "+++ Downloading GDB..." - wget -c ftp://ftp.gnu.org/gnu/gdb/gdb-$(gdb_ver).tar.gz - -unpack_gdb: gdb-$(gdb_ver).tar.gz unpack_gdb_stamp - -unpack_gdb_stamp: - @echo "+++ Unpacking GDB..." - rm -f $@ - rm -rf gdb-$(gdb_ver) - tar xf gdb-$(gdb_ver).tar.gz - touch $@ - -build_gdb: log = $(logdir)/gdb-$(gdb_ver).log -build_gdb: logdir -build_gdb: unpack_gdb build_gdb_stamp - -build_gdb_stamp: - @echo "+++ Building GDB..." - rm -f $@ - > $(log) - rm -rf build-gdb-$(gdb_ver) - mkdir build-gdb-$(gdb_ver) - cd build-gdb-$(gdb_ver); ../gdb-$(gdb_ver)/configure \ - --disable-werror \ - --prefix=$(sh_prefix) \ - --target=$(sh_target) $(to_log) - $(MAKE) $(makejobs) -C build-gdb-$(gdb_ver) $(to_log) - touch $@ - -install_gdb: log = $(logdir)/gdb-$(gdb_ver).log -install_gdb: logdir -install_gdb: build_gdb install_gdb_stamp - -install_gdb_stamp: - @echo "+++ Installing GDB..." - rm -f $@ - $(MAKE) -C build-gdb-$(gdb_ver) install DESTDIR=$(DESTDIR) $(to_log) - touch $@ - -gdb: install_gdb - - -# Insight building - -insight-$(insight_ver)a.tar.bz2: - @echo "+++ Downloading Insight..." - wget -c ftp://sourceware.org/pub/insight/releases/insight-$(insight_ver)a.tar.bz2 - -unpack_insight: insight-$(insight_ver)a.tar.bz2 unpack_insight_stamp - -unpack_insight_stamp: - @echo "+++ Unpacking Insight..." - rm -f $@ - rm -rf insight-$(insight_ver) - tar xf insight-$(insight_ver)a.tar.bz2 - touch $@ - -build_insight: log = $(logdir)/insight-$(insight_ver).log -build_insight: logdir -build_insight: unpack_insight build_insight_stamp - -build_insight_stamp: - @echo "+++ Building Insight..." - rm -f $@ - > $(log) - rm -rf build-insight-$(insight_ver) - mkdir build-insight-$(insight_ver) - cd build-insight-$(insight_ver); ../insight-$(insight_ver)/configure \ - --disable-werror \ - --prefix=$(sh_prefix) \ - --target=$(sh_target) $(to_log) - $(MAKE) $(makejobs) -C build-insight-$(insight_ver) $(to_log) - touch $@ - -install_insight: log = $(logdir)/insight-$(insight_ver).log -install_insight: logdir -install_insight: build_insight install_insight_stamp - -install_insight_stamp: ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |