From: Lawrence S. <ljs...@us...> - 2013-05-18 17:35:29
|
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 326499749579f54a820ad565627aa80ed6a52ae6 (commit) from 816c924ac59d3e9a47da4da993139a7490b8f59a (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 326499749579f54a820ad565627aa80ed6a52ae6 Author: Lawrence Sebald <ljs...@us...> Date: Sat May 18 13:32:54 2013 -0400 A few dc-chain updates: 1. Update the packages to the following versions: Binutils 2.23.2 GCC 4.7.3 Newlib 2.0.0 2. Add a makejobs variable to the Makefile to allow multiple jobs to be spawned for building the tools. 3. Fix an issue that would cause the Makefile to not fail when verbose was set to 1 and one of the jobs spawned failed. This is probably the most often reported issue with this thing... ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/00README | 7 +- utils/dc-chain/Makefile | 42 ++++-- utils/dc-chain/download.sh | 6 +- .../{gcc-4.7.0-kos.diff => gcc-4.7.3-kos.diff} | 56 +++----- ...ewlib-1.20.0-kos.diff => newlib-2.0.0-kos.diff} | 136 +++++++++++--------- utils/dc-chain/unpack.sh | 8 +- 6 files changed, 137 insertions(+), 118 deletions(-) copy utils/dc-chain/patches/{gcc-4.7.0-kos.diff => gcc-4.7.3-kos.diff} (96%) copy utils/dc-chain/patches/{newlib-1.20.0-kos.diff => newlib-2.0.0-kos.diff} (70%) diff --git a/utils/dc-chain/00README b/utils/dc-chain/00README index f3ef74a..73a1e4b 100644 --- a/utils/dc-chain/00README +++ b/utils/dc-chain/00README @@ -22,7 +22,10 @@ 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. As of this writing, -they patch newlib-1.19.0 and gcc-4.5.2 to work with KOS. +they patch newlib-2.0.0 and gcc-4.7.3 to work with KOS. You should not attempt to spawn multiple jobs with make. Using "make -j2" or any -other number after the -j will probably break things. +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 e64b847..4dc1184 100755 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -5,7 +5,8 @@ # Interesting parameters: # erase=0|1 Erase build directories on the fly to save space # thread_model=posix|single|kos Set gcc threading model -# verbose=0|1 Display +# verbose=0|1 Display +# makejobs=-jn Set the number of jobs for calls to make to n # # Interesting targets (you can 'make' any of these): # all: patch build @@ -24,13 +25,13 @@ 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 subversion root (contains kos/ and kos-ports/) +# 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)/../.. -binutils_ver=2.22 -gcc_ver=4.7.0 -newlib_ver=1.20.0 +binutils_ver=2.23.2 +gcc_ver=4.7.3 +newlib_ver=2.0.0 gdb_ver=6.7.1 insight_ver=6.7.1 # With GCC 4.x versions, the patches provide a kos thread model, so you should @@ -38,14 +39,25 @@ insight_ver=6.7.1 # 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=0 +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=-j4 + # 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++ +# Change this if you don't have Bash installed in /bin +SHELL = /bin/bash + # Makefile variables install=$(prefix)/bin pwd := $(shell pwd) @@ -125,7 +137,8 @@ $(build_binutils): logdir -mkdir -p $(build) > $(log) cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) $(to_log) - make -C $(build) all install DESTDIR=$(DESTDIR) $(to_log) + make $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) + make -C $(build) install DESTDIR=$(DESTDIR) $(to_log) $(clean_up) $(build_gcc_pass1) $(build_gcc_pass2): build = build-gcc-$(target)-$(gcc_ver) @@ -136,7 +149,8 @@ $(build_gcc_pass1): logdir -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) $(to_log) - make -C $(build) all install DESTDIR=$(DESTDIR) $(to_log) + make $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) + make -C $(build) install DESTDIR=$(DESTDIR) $(to_log) $(build_newlib): build = build-newlib-$(target)-$(newlib_ver) $(build_newlib): src_dir = newlib-$(newlib_ver) @@ -146,7 +160,8 @@ $(build_newlib): logdir -mkdir -p $(build) > $(log) cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) $(extra_configure_args) $(to_log) - make -C $(build) all install DESTDIR=$(DESTDIR) $(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 @@ -172,7 +187,8 @@ $(build_gcc_pass2): logdir > $(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) $(to_log) - make -C $(build) all install DESTDIR=$(DESTDIR) $(to_log) + make $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) + make -C $(build) install DESTDIR=$(DESTDIR) $(to_log) $(clean_up) # ---- }}}} @@ -206,7 +222,7 @@ build_gdb_stamp: cd build-gdb-$(gdb_ver); ../gdb-$(gdb_ver)/configure \ --prefix=$(sh_prefix) \ --target=$(sh_target) $(to_log) - make -C build-gdb-$(gdb_ver) $(to_log) + make $(makejobs) -C build-gdb-$(gdb_ver) $(to_log) touch $@ install_gdb: log = $(logdir)/gdb-$(gdb_ver).log @@ -250,7 +266,7 @@ build_insight_stamp: cd build-insight-$(insight_ver); ../insight-$(insight_ver)/configure \ --prefix=$(sh_prefix) \ --target=$(sh_target) $(to_log) - make -C build-insight-$(insight_ver) $(to_log) + make $(makejobs) -C build-insight-$(insight_ver) $(to_log) touch $@ install_insight: log = $(logdir)/insight-$(insight_ver).log @@ -296,7 +312,7 @@ endif # If verbose=1, display output to screen as well as log files ifeq (1,$(verbose)) - to_log = 2>&1 | tee -a $(log) + to_log = 2>&1 | tee -a $(log) && [ $$PIPESTATUS -eq 0 ] else to_log = >> $(log) 2>&1 endif diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index 6babb66..3c0a5ae 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -1,5 +1,5 @@ #!/bin/sh -wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.bz2 || exit 1 -wget -c ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2 || exit 1 -wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.20.0.tar.gz || exit 1 +wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2 || exit 1 +wget -c ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.3/gcc-4.7.3.tar.bz2 || exit 1 +wget -c ftp://sources.redhat.com/pub/newlib/newlib-2.0.0.tar.gz || exit 1 diff --git a/utils/dc-chain/patches/gcc-4.7.0-kos.diff b/utils/dc-chain/patches/gcc-4.7.3-kos.diff similarity index 96% copy from utils/dc-chain/patches/gcc-4.7.0-kos.diff copy to utils/dc-chain/patches/gcc-4.7.3-kos.diff index ee592f3..cd3a5c4 100644 --- a/utils/dc-chain/patches/gcc-4.7.0-kos.diff +++ b/utils/dc-chain/patches/gcc-4.7.3-kos.diff @@ -1,19 +1,7 @@ -diff -ruN gcc-4.7.0/gcc/config/sh/sh.c gcc-4.7.0-kos/gcc/config/sh/sh.c ---- gcc-4.7.0/gcc/config/sh/sh.c 2012-03-05 13:52:44.000000000 -0500 -+++ gcc-4.7.0-kos/gcc/config/sh/sh.c 2012-06-09 21:58:01.000000000 -0400 -@@ -747,8 +747,6 @@ - if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno))) - sh_additional_register_names[regno][0] = '\0'; - -- flag_omit_frame_pointer = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG); -- - if ((flag_pic && ! TARGET_PREFERGOT) - || (TARGET_SHMEDIA && !TARGET_PT_FIXED)) - flag_no_function_cse = 1; -diff -ruN gcc-4.7.0/gcc/configure gcc-4.7.0-kos/gcc/configure ---- gcc-4.7.0/gcc/configure 2012-03-08 08:54:54.000000000 -0500 -+++ gcc-4.7.0-kos/gcc/configure 2012-06-11 12:38:05.000000000 -0400 -@@ -11262,7 +11262,7 @@ +diff -ruN gcc-4.7.3/gcc/configure gcc-4.7.3-kos/gcc/configure +--- gcc-4.7.3/gcc/configure 2013-02-06 10:23:55.000000000 -0500 ++++ gcc-4.7.3-kos/gcc/configure 2013-05-17 21:30:40.000000000 -0400 +@@ -11338,7 +11338,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -22,9 +10,9 @@ diff -ruN gcc-4.7.0/gcc/configure gcc-4.7.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-4.7.0/libgcc/config/sh/crt1.S gcc-4.7.0-kos/libgcc/config/sh/crt1.S ---- gcc-4.7.0/libgcc/config/sh/crt1.S 2011-11-02 10:33:56.000000000 -0400 -+++ gcc-4.7.0-kos/libgcc/config/sh/crt1.S 2012-06-11 12:38:05.000000000 -0400 +diff -ruN gcc-4.7.3/libgcc/config/sh/crt1.S gcc-4.7.3-kos/libgcc/config/sh/crt1.S +--- gcc-4.7.3/libgcc/config/sh/crt1.S 2011-11-02 10:33:56.000000000 -0400 ++++ gcc-4.7.3-kos/libgcc/config/sh/crt1.S 2013-05-17 21:34:42.000000000 -0400 @@ -1,1369 +1,202 @@ -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. @@ -1576,9 +1564,9 @@ diff -ruN gcc-4.7.0/libgcc/config/sh/crt1.S gcc-4.7.0-kos/libgcc/config/sh/crt1. - .ualong 0x0 -#endif /* VBR_SETUP */ -#endif /* ! __SH5__ */ -diff -ruN gcc-4.7.0/libgcc/config/sh/fake-kos.S gcc-4.7.0-kos/libgcc/config/sh/fake-kos.S ---- gcc-4.7.0/libgcc/config/sh/fake-kos.S 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-4.7.0-kos/libgcc/config/sh/fake-kos.S 2012-06-11 13:31:28.000000000 -0400 +diff -ruN gcc-4.7.3/libgcc/config/sh/fake-kos.S gcc-4.7.3-kos/libgcc/config/sh/fake-kos.S +--- gcc-4.7.3/libgcc/config/sh/fake-kos.S 1969-12-31 19:00:00.000000000 -0500 ++++ gcc-4.7.3-kos/libgcc/config/sh/fake-kos.S 2013-05-17 21:34:42.000000000 -0400 @@ -0,0 +1,75 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1656,9 +1644,9 @@ diff -ruN gcc-4.7.0/libgcc/config/sh/fake-kos.S gcc-4.7.0-kos/libgcc/config/sh/f + mov #-1, r0 + \ No newline at end of file -diff -ruN gcc-4.7.0/libgcc/config/sh/gthr-kos.h gcc-4.7.0-kos/libgcc/config/sh/gthr-kos.h ---- gcc-4.7.0/libgcc/config/sh/gthr-kos.h 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-4.7.0-kos/libgcc/config/sh/gthr-kos.h 2012-06-11 20:06:32.000000000 -0400 +diff -ruN gcc-4.7.3/libgcc/config/sh/gthr-kos.h gcc-4.7.3-kos/libgcc/config/sh/gthr-kos.h +--- gcc-4.7.3/libgcc/config/sh/gthr-kos.h 1969-12-31 19:00:00.000000000 -0500 ++++ gcc-4.7.3-kos/libgcc/config/sh/gthr-kos.h 2013-05-17 21:36:10.000000000 -0400 @@ -0,0 +1,355 @@ +/* Copyright (C) 2009, 2010, 2011, 2012 Lawrence Sebald */ + @@ -1719,7 +1707,7 @@ diff -ruN gcc-4.7.0/libgcc/config/sh/gthr-kos.h gcc-4.7.0-kos/libgcc/config/sh/g +#define __GTHREAD_COND_INIT COND_INITIALIZER + +static inline int __gthread_active_p(void) { -+ return 1; ++ return 1; +} + +#ifdef _LIBOBJC @@ -2015,9 +2003,9 @@ diff -ruN gcc-4.7.0/libgcc/config/sh/gthr-kos.h gcc-4.7.0-kos/libgcc/config/sh/g +#endif /* _LIBOBJC */ + +#endif /* ! GCC_GTHR_KOS_H */ -diff -ruN gcc-4.7.0/libgcc/config/sh/t-sh gcc-4.7.0-kos/libgcc/config/sh/t-sh ---- gcc-4.7.0/libgcc/config/sh/t-sh 2011-11-07 12:14:32.000000000 -0500 -+++ gcc-4.7.0-kos/libgcc/config/sh/t-sh 2012-06-11 13:30:55.000000000 -0400 +diff -ruN gcc-4.7.3/libgcc/config/sh/t-sh gcc-4.7.3-kos/libgcc/config/sh/t-sh +--- gcc-4.7.3/libgcc/config/sh/t-sh 2011-11-07 12:14:32.000000000 -0500 ++++ gcc-4.7.3-kos/libgcc/config/sh/t-sh 2013-05-17 21:33:11.000000000 -0400 @@ -24,6 +24,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -2027,14 +2015,14 @@ diff -ruN gcc-4.7.0/libgcc/config/sh/t-sh gcc-4.7.0-kos/libgcc/config/sh/t-sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff -ruN gcc-4.7.0/libgcc/configure gcc-4.7.0-kos/libgcc/configure ---- gcc-4.7.0/libgcc/configure 2012-01-23 01:25:28.000000000 -0500 -+++ gcc-4.7.0-kos/libgcc/configure 2012-06-11 12:38:05.000000000 -0400 -@@ -4801,6 +4801,7 @@ +diff -ruN gcc-4.7.3/libgcc/configure gcc-4.7.3-kos/libgcc/configure +--- gcc-4.7.3/libgcc/configure 2012-08-06 10:34:27.000000000 -0400 ++++ gcc-4.7.3-kos/libgcc/configure 2013-05-17 21:32:08.000000000 -0400 +@@ -4480,6 +4480,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; -+ kos) thread_header=config/sh/gthr-kos.h ;; ++ kos) thread_header=config/sh/gthr-kos.h ;; esac # Substitute configuration variables diff --git a/utils/dc-chain/patches/newlib-1.20.0-kos.diff b/utils/dc-chain/patches/newlib-2.0.0-kos.diff similarity index 70% copy from utils/dc-chain/patches/newlib-1.20.0-kos.diff copy to utils/dc-chain/patches/newlib-2.0.0-kos.diff index fbe71fc..fdb0e09 100644 --- a/utils/dc-chain/patches/newlib-1.20.0-kos.diff +++ b/utils/dc-chain/patches/newlib-2.0.0-kos.diff @@ -1,7 +1,7 @@ -diff -ruN newlib-1.20.0/newlib/configure.host newlib-1.20.0-kos/newlib/configure.host ---- newlib-1.20.0/newlib/configure.host 2011-11-29 01:33:48.000000000 -0500 -+++ newlib-1.20.0-kos/newlib/configure.host 2012-06-04 18:39:45.000000000 -0400 -@@ -237,6 +237,7 @@ +diff -ruN newlib-2.0.0/newlib/configure.host newlib-2.0.0-kos/newlib/configure.host +--- newlib-2.0.0/newlib/configure.host 2012-12-04 16:43:20.000000000 -0500 ++++ newlib-2.0.0-kos/newlib/configure.host 2013-05-18 00:16:34.000000000 -0400 +@@ -245,6 +245,7 @@ ;; sh | sh64) machine_dir=sh @@ -9,9 +9,9 @@ diff -ruN newlib-1.20.0/newlib/configure.host newlib-1.20.0-kos/newlib/configure ;; sparc*) machine_dir=sparc -diff -ruN newlib-1.20.0/newlib/libc/include/assert.h newlib-1.20.0-kos/newlib/libc/include/assert.h ---- newlib-1.20.0/newlib/libc/include/assert.h 2008-07-17 16:56:51.000000000 -0400 -+++ newlib-1.20.0-kos/newlib/libc/include/assert.h 2012-06-04 18:34:57.000000000 -0400 +diff -ruN newlib-2.0.0/newlib/libc/include/assert.h newlib-2.0.0-kos/newlib/libc/include/assert.h +--- newlib-2.0.0/newlib/libc/include/assert.h 2012-10-16 15:00:30.000000000 -0400 ++++ newlib-2.0.0-kos/newlib/libc/include/assert.h 2013-05-18 00:17:28.000000000 -0400 @@ -13,8 +13,8 @@ #ifdef NDEBUG /* required by ANSI standard */ # define assert(__e) ((void)0) @@ -34,12 +34,24 @@ diff -ruN newlib-1.20.0/newlib/libc/include/assert.h newlib-1.20.0-kos/newlib/li +void _EXFUN(__assert, (const char *, int, const char *, const char *, + const char *) _ATTRIBUTE ((__noreturn__))); - #ifdef __cplusplus - } -diff -ruN newlib-1.20.0/newlib/libc/include/sys/types.h newlib-1.20.0-kos/newlib/libc/include/sys/types.h ---- newlib-1.20.0/newlib/libc/include/sys/types.h 2011-08-01 13:22:18.000000000 -0400 -+++ newlib-1.20.0-kos/newlib/libc/include/sys/types.h 2012-06-04 18:34:57.000000000 -0400 -@@ -283,7 +283,7 @@ + #if __STDC_VERSION__ >= 201112L && !defined __cplusplus + # define static_assert _Static_assert +diff -ruN newlib-2.0.0/newlib/libc/include/machine/_default_types.h newlib-2.0.0-kos/newlib/libc/include/machine/_default_types.h +--- newlib-2.0.0/newlib/libc/include/machine/_default_types.h 2012-10-16 14:45:23.000000000 -0400 ++++ newlib-2.0.0-kos/newlib/libc/include/machine/_default_types.h 2013-05-18 01:00:45.000000000 -0400 +@@ -9,6 +9,8 @@ + extern "C" { + #endif + ++#include <sys/features.h> ++ + /* + * Guess on types by examining *_MIN / *_MAX defines. + */ +diff -ruN newlib-2.0.0/newlib/libc/include/sys/types.h newlib-2.0.0-kos/newlib/libc/include/sys/types.h +--- newlib-2.0.0/newlib/libc/include/sys/types.h 2012-07-06 06:41:21.000000000 -0400 ++++ newlib-2.0.0-kos/newlib/libc/include/sys/types.h 2013-05-18 00:23:09.000000000 -0400 +@@ -286,7 +286,7 @@ #if defined(__XMK__) typedef unsigned int pthread_t; /* identify a thread */ @@ -48,65 +60,65 @@ diff -ruN newlib-1.20.0/newlib/libc/include/sys/types.h newlib-1.20.0-kos/newlib typedef __uint32_t pthread_t; /* identify a thread */ #endif -@@ -301,6 +301,7 @@ +@@ -304,6 +304,7 @@ #define PTHREAD_CREATE_DETACHED 0 #define PTHREAD_CREATE_JOINABLE 1 -+#ifndef _arch_dreamcast ++#if !defined(_arch_dreamcast) #if defined(__XMK__) typedef struct pthread_attr_s { int contentionscope; -@@ -334,6 +335,7 @@ +@@ -337,6 +338,7 @@ } pthread_attr_t; #endif /* !defined(__XMK__) */ -+#endif ++#endif /* !defined(_arch_dreamcast) */ #if defined(_POSIX_THREAD_PROCESS_SHARED) /* NOTE: P1003.1c/D10, p. 81 defines following values for process_shared. */ -@@ -410,6 +412,7 @@ +@@ -413,6 +415,7 @@ } pthread_mutexattr_t; #else /* !defined(__XMK__) */ -+#ifndef _arch_dreamcast ++#if !defined(_arch_dreamcast) typedef __uint32_t pthread_mutex_t; /* identify a mutex */ typedef struct { -@@ -426,10 +429,12 @@ +@@ -429,10 +432,12 @@ #endif int recursive; } pthread_mutexattr_t; -+#endif /* !_arch_dreamcast */ ++#endif /* !defined(_arch_dreamcast) */ #endif /* !defined(__XMK__) */ /* Condition Variables */ -+#ifndef _arch_dreamcast ++#if !defined(_arch_dreamcast) typedef __uint32_t pthread_cond_t; /* identify a condition variable */ typedef struct { -@@ -438,15 +443,18 @@ +@@ -441,15 +446,18 @@ int process_shared; /* allow this to be shared amongst processes */ #endif } pthread_condattr_t; /* a condition attribute object */ -+#endif ++#endif /* !defined(_arch_dreamcast) */ /* Keys */ -+#ifndef _arch_dreamcast ++#if !defined(_arch_dreamcast) typedef __uint32_t pthread_key_t; /* thread-specific data keys */ typedef struct { int is_initialized; /* is this structure initialized? */ int init_executed; /* has the initialization routine been run? */ } pthread_once_t; /* dynamic package initialization */ -+#endif ++#endif /* !defined(_arch_dreamcast) */ #else #if defined (__CYGWIN__) #include <cygwin/types.h> -diff -ruN newlib-1.20.0/newlib/libc/stdlib/assert.c newlib-1.20.0-kos/newlib/libc/stdlib/assert.c ---- newlib-1.20.0/newlib/libc/stdlib/assert.c 2009-10-08 12:44:10.000000000 -0400 -+++ newlib-1.20.0-kos/newlib/libc/stdlib/assert.c 2012-06-04 18:34:57.000000000 -0400 +diff -ruN newlib-2.0.0/newlib/libc/stdlib/assert.c newlib-2.0.0-kos/newlib/libc/stdlib/assert.c +--- newlib-2.0.0/newlib/libc/stdlib/assert.c 2009-10-08 12:44:10.000000000 -0400 ++++ newlib-2.0.0-kos/newlib/libc/stdlib/assert.c 2013-05-18 00:23:54.000000000 -0400 @@ -47,6 +47,8 @@ #include <stdlib.h> #include <stdio.h> @@ -121,23 +133,23 @@ diff -ruN newlib-1.20.0/newlib/libc/stdlib/assert.c newlib-1.20.0-kos/newlib/lib /* NOTREACHED */ } +#endif -diff -ruN newlib-1.20.0/newlib/libc/sys/sh/ftruncate.c newlib-1.20.0-kos/newlib/libc/sys/sh/ftruncate.c ---- newlib-1.20.0/newlib/libc/sys/sh/ftruncate.c 2003-07-10 11:31:30.000000000 -0400 -+++ newlib-1.20.0-kos/newlib/libc/sys/sh/ftruncate.c 2012-06-04 18:34:57.000000000 -0400 -@@ -2,8 +2,8 @@ - #include <sys/types.h> - #include "sys/syscall.h" - +diff -ruN newlib-2.0.0/newlib/libc/sys/sh/ftruncate.c newlib-2.0.0-kos/newlib/libc/sys/sh/ftruncate.c +--- newlib-2.0.0/newlib/libc/sys/sh/ftruncate.c 2003-07-10 11:31:30.000000000 -0400 ++++ newlib-2.0.0-kos/newlib/libc/sys/sh/ftruncate.c 2013-05-18 00:27:35.000000000 -0400 +@@ -1,9 +1 @@ +-#include <_ansi.h> +-#include <sys/types.h> +-#include "sys/syscall.h" +- -int -+/* int - ftruncate (int file, off_t length) - { - return __trap34 (SYS_ftruncate, file, length, 0); +-ftruncate (int file, off_t length) +-{ +- return __trap34 (SYS_ftruncate, file, length, 0); -} -+} */ -diff -ruN newlib-1.20.0/newlib/libc/sys/sh/sys/lock.h newlib-1.20.0-kos/newlib/libc/sys/sh/sys/lock.h ---- newlib-1.20.0/newlib/libc/sys/sh/sys/lock.h 1969-12-31 19:00:00.000000000 -0500 -+++ newlib-1.20.0-kos/newlib/libc/sys/sh/sys/lock.h 2012-06-04 18:34:57.000000000 -0400 ++/* Nothing here. */ +diff -ruN newlib-2.0.0/newlib/libc/sys/sh/sys/lock.h newlib-2.0.0-kos/newlib/libc/sys/sh/sys/lock.h +--- newlib-2.0.0/newlib/libc/sys/sh/sys/lock.h 1969-12-31 19:00:00.000000000 -0500 ++++ newlib-2.0.0-kos/newlib/libc/sys/sh/sys/lock.h 2013-05-18 00:26:13.000000000 -0400 @@ -0,0 +1,51 @@ +/* KallistiOS ##version## + @@ -190,9 +202,9 @@ diff -ruN newlib-1.20.0/newlib/libc/sys/sh/sys/lock.h newlib-1.20.0-kos/newlib/l + + +#endif // __NEWLIB_LOCK_COMMON_H -diff -ruN newlib-1.20.0/newlib/libc/sys/sh/syscalls.c newlib-1.20.0-kos/newlib/libc/sys/sh/syscalls.c ---- newlib-1.20.0/newlib/libc/sys/sh/syscalls.c 2008-01-21 19:24:45.000000000 -0500 -+++ newlib-1.20.0-kos/newlib/libc/sys/sh/syscalls.c 2012-06-04 18:34:57.000000000 -0400 +diff -ruN newlib-2.0.0/newlib/libc/sys/sh/syscalls.c newlib-2.0.0-kos/newlib/libc/sys/sh/syscalls.c +--- newlib-2.0.0/newlib/libc/sys/sh/syscalls.c 2008-01-21 19:24:45.000000000 -0500 ++++ newlib-2.0.0-kos/newlib/libc/sys/sh/syscalls.c 2013-05-18 00:26:46.000000000 -0400 @@ -1,228 +1,2 @@ -#include <_ansi.h> -#include <sys/types.h> @@ -424,9 +436,9 @@ diff -ruN newlib-1.20.0/newlib/libc/sys/sh/syscalls.c newlib-1.20.0-kos/newlib/l -} +// This is put in here to cause link errors if a proper newlib isn't present. +int __newlib_kos_patch = 1; -diff -ruN newlib-1.20.0/newlib/libc/sys/sh/trap.S newlib-1.20.0-kos/newlib/libc/sys/sh/trap.S ---- newlib-1.20.0/newlib/libc/sys/sh/trap.S 2002-02-08 02:11:13.000000000 -0500 -+++ newlib-1.20.0-kos/newlib/libc/sys/sh/trap.S 2012-06-04 18:34:57.000000000 -0400 +diff -ruN newlib-2.0.0/newlib/libc/sys/sh/trap.S newlib-2.0.0-kos/newlib/libc/sys/sh/trap.S +--- newlib-2.0.0/newlib/libc/sys/sh/trap.S 2002-02-08 02:11:13.000000000 -0500 ++++ newlib-2.0.0-kos/newlib/libc/sys/sh/trap.S 2013-05-18 00:27:04.000000000 -0400 @@ -1,43 +0,0 @@ -#if __SH5__ - .mode SHmedia @@ -471,17 +483,17 @@ diff -ruN newlib-1.20.0/newlib/libc/sys/sh/trap.S newlib-1.20.0-kos/newlib/libc/ -perrno: - .long _errno -#endif /* ! __SH5__ */ -diff -ruN newlib-1.20.0/newlib/libc/sys/sh/truncate.c newlib-1.20.0-kos/newlib/libc/sys/sh/truncate.c ---- newlib-1.20.0/newlib/libc/sys/sh/truncate.c 2003-07-10 11:31:30.000000000 -0400 -+++ newlib-1.20.0-kos/newlib/libc/sys/sh/truncate.c 2012-06-04 18:34:57.000000000 -0400 -@@ -2,8 +2,8 @@ - #include <sys/types.h> - #include "sys/syscall.h" - +diff -ruN newlib-2.0.0/newlib/libc/sys/sh/truncate.c newlib-2.0.0-kos/newlib/libc/sys/sh/truncate.c +--- newlib-2.0.0/newlib/libc/sys/sh/truncate.c 2003-07-10 11:31:30.000000000 -0400 ++++ newlib-2.0.0-kos/newlib/libc/sys/sh/truncate.c 2013-05-18 00:27:23.000000000 -0400 +@@ -1,9 +1 @@ +-#include <_ansi.h> +-#include <sys/types.h> +-#include "sys/syscall.h" +- -int -+/* int - truncate (const char *path, off_t length) - { - return __trap34 (SYS_truncate, path, length, 0); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |