From: darcagn <da...@us...> - 2023-06-06 18:05:19
|
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 1c3282cc89b5ca2be893a8aca08d070212aa87a2 (commit) via 13a8ac6035fb52873aa038d70245508026a10a7b (commit) via 1cb7c1dddc6640789211f73c7af549a569df71f1 (commit) via 6b14ac4af1dd3294673157484d076db187284838 (commit) via 195b5e24f08d8e38043c1999eb58b1610dd06ecb (commit) via 070c8ee7d33bdc5dc00c1995bd4677c5bb186b1b (commit) from 7d888dc3c4aedc0ce62289d15ebe95f5e69d87ed (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 1c3282cc89b5ca2be893a8aca08d070212aa87a2 Merge: 070c8ee 13a8ac6 Author: darcagn <da...@pr...> Date: Tue Jun 6 13:03:26 2023 -0500 Merge pull request #243 from KallistiOS/patch-oldlib Update older newlib patches to move lock.h, disable syscalls cleanly. commit 13a8ac6035fb52873aa038d70245508026a10a7b Author: Quzar <qu...@co...> Date: Tue Jun 6 08:31:47 2023 -0400 Move Newlib 4.1.0 patch into historical as it is not used by any of the sample configs. commit 1cb7c1dddc6640789211f73c7af549a569df71f1 Author: Quzar <qu...@co...> Date: Tue Jun 6 08:28:24 2023 -0400 Newlib 3.3.0 also doesn't respect the disable syscalls flag, so only removing lock.h commit 6b14ac4af1dd3294673157484d076db187284838 Author: Quzar <qu...@co...> Date: Tue Jun 6 08:23:50 2023 -0400 Newlib 2.0.0 doesn't respect the disable-syscalls flag, so keep patching them out, but remove lock.h commit 195b5e24f08d8e38043c1999eb58b1610dd06ecb Author: Quzar <qu...@co...> Date: Tue Jun 6 00:48:12 2023 -0400 Update older newlib patches to move lock.h, disable syscalls cleanly. commit 070c8ee7d33bdc5dc00c1995bd4677c5bb186b1b Author: Donald Haase <qu...@ya...> Date: Tue Jun 6 00:19:35 2023 -0400 Newlib lock.h fix (#242) * Change lock.h to get copied directly into newlib, move lock.h patching into patch.mk --------- Co-authored-by: Quzar <qu...@co...> ----------------------------------------------------------------------- Summary of changes: .../patches/{ => historical}/newlib-4.1.0-kos.diff | 367 +-------------------- utils/dc-chain/patches/newlib-2.0.0-kos.diff | 55 --- utils/dc-chain/patches/newlib-3.3.0-kos.diff | 56 ---- utils/dc-chain/scripts/newlib.mk | 1 - utils/dc-chain/scripts/patch.mk | 6 + 5 files changed, 8 insertions(+), 477 deletions(-) rename utils/dc-chain/patches/{ => historical}/newlib-4.1.0-kos.diff (52%) diff --git a/utils/dc-chain/patches/newlib-4.1.0-kos.diff b/utils/dc-chain/patches/historical/newlib-4.1.0-kos.diff similarity index 52% rename from utils/dc-chain/patches/newlib-4.1.0-kos.diff rename to utils/dc-chain/patches/historical/newlib-4.1.0-kos.diff index 162d36c..af9dc8f 100755 --- a/utils/dc-chain/patches/newlib-4.1.0-kos.diff +++ b/utils/dc-chain/patches/historical/newlib-4.1.0-kos.diff @@ -243,374 +243,11 @@ diff --color -ruN newlib-4.1.0/newlib/libc/stdlib/assert.c newlib-4.1.0-kos/newl #ifndef HAVE_ASSERT_FUNC /* func can be NULL, in which case no function information is given. */ void -@@ -72,3 +74,5 @@ +@@ -72,3 +74,7 @@ __assert_func (file, line, NULL, failedexpr); /* NOTREACHED */ } +#endif -+ -diff --color -ruN newlib-4.1.0/newlib/libc/sys/sh/ftruncate.c newlib-4.1.0-kos/newlib/libc/sys/sh/ftruncate.c ---- newlib-4.1.0/newlib/libc/sys/sh/ftruncate.c 2023-02-01 22:17:03.742363687 -0600 -+++ newlib-4.1.0-kos/newlib/libc/sys/sh/ftruncate.c 2023-02-01 22:18:00.451489165 -0600 -@@ -1,9 +1,2 @@ --#include <_ansi.h> --#include <sys/types.h> --#include "sys/syscall.h" -+/* Nothing here */ - --int --ftruncate (int file, off_t length) --{ -- return __trap34 (SYS_ftruncate, file, length, 0); --} -diff --color -ruN newlib-4.1.0/newlib/libc/sys/sh/sys/lock.h newlib-4.1.0-kos/newlib/libc/sys/sh/sys/lock.h ---- newlib-4.1.0/newlib/libc/sys/sh/sys/lock.h 1969-12-31 18:00:00.000000000 -0600 -+++ newlib-4.1.0-kos/newlib/libc/sys/sh/sys/lock.h 2023-02-01 22:18:00.451489165 -0600 -@@ -0,0 +1,52 @@ -+/* KallistiOS ##version## -+ -+ lock_common.h -+ Copyright (C)2004 Megan Potter -+ -+*/ -+ -+#ifndef __SYS_LOCK_H__ -+#define __SYS_LOCK_H__ -+ -+typedef struct { -+ void *owner; -+ int nest; -+ volatile int lock; -+} __newlib_recursive_lock_t; -+ -+#define __NEWLIB_RECURSIVE_LOCK_INIT { (void *)0, 0, 0 } -+ -+typedef volatile int __newlib_lock_t; -+#define __NEWLIB_LOCK_INIT 0 -+ -+typedef __newlib_lock_t _LOCK_T; -+typedef __newlib_recursive_lock_t _LOCK_RECURSIVE_T; -+ -+#define __LOCK_INIT(class,lock) class _LOCK_T lock = __NEWLIB_LOCK_INIT; -+#define __LOCK_INIT_RECURSIVE(class,lock) class _LOCK_RECURSIVE_T lock = __NEWLIB_RECURSIVE_LOCK_INIT; -+#define __lock_init(lock) __newlib_lock_init(&(lock)) -+#define __lock_init_recursive(lock) __newlib_lock_init_recursive(&(lock)) -+#define __lock_close(lock) __newlib_lock_close(&(lock)) -+#define __lock_close_recursive(lock) __newlib_lock_close_recursive(&(lock)) -+#define __lock_acquire(lock) __newlib_lock_acquire(&(lock)) -+#define __lock_acquire_recursive(lock) __newlib_lock_acquire_recursive(&(lock)) -+#define __lock_try_acquire(lock) __newlib_lock_try_acquire(&(lock)) -+#define __lock_try_acquire_recursive(lock) __newlib_lock_try_acquire_recursive(&(lock)) -+#define __lock_release(lock) __newlib_lock_release(&(lock)) -+#define __lock_release_recursive(lock) __newlib_lock_release_recursive(&(lock)) -+ -+void __newlib_lock_init(__newlib_lock_t *); -+void __newlib_lock_close(__newlib_lock_t *); -+void __newlib_lock_acquire(__newlib_lock_t *); -+void __newlib_lock_try_acquire(__newlib_lock_t *); -+void __newlib_lock_release(__newlib_lock_t *); -+ -+void __newlib_lock_init_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_close_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_try_acquire_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_release_recursive(__newlib_recursive_lock_t *); -+ -+ -+#endif // __NEWLIB_LOCK_COMMON_H -+ -diff --color -ruN newlib-4.1.0/newlib/libc/sys/sh/syscalls.c newlib-4.1.0-kos/newlib/libc/sys/sh/syscalls.c ---- newlib-4.1.0/newlib/libc/sys/sh/syscalls.c 2023-02-01 22:17:03.742363687 -0600 -+++ newlib-4.1.0-kos/newlib/libc/sys/sh/syscalls.c 2023-02-01 22:18:00.451489165 -0600 -@@ -1,228 +1,3 @@ --#include <_ansi.h> --#include <sys/types.h> --#include <sys/stat.h> --#include <sys/time.h> --#include "sys/syscall.h" --int errno; +// This is put in here to cause link errors if a proper newlib isn't present. +int __newlib_kos_patch = 1; - --/* This is used by _sbrk. */ --register char *stack_ptr asm ("r15"); -- --int --_read (int file, -- char *ptr, -- int len) --{ -- return __trap34 (SYS_read, file, ptr, len); --} -- --int --_lseek (int file, -- int ptr, -- int dir) --{ -- return __trap34 (SYS_lseek, file, ptr, dir); --} -- --int --_write ( int file, -- char *ptr, -- int len) --{ -- return __trap34 (SYS_write, file, ptr, len); --} -- --int --_close (int file) --{ -- return __trap34 (SYS_close, file, 0, 0); --} -- --int --_link (char *old, char *new) --{ -- return -1; --} -- --caddr_t --_sbrk (int incr) --{ -- extern char end; /* Defined by the linker */ -- static char *heap_end; -- char *prev_heap_end; -- -- if (heap_end == 0) -- { -- heap_end = &end; -- } -- prev_heap_end = heap_end; -- if (heap_end + incr > stack_ptr) -- { -- _write (1, "Heap and stack collision\n", 25); -- abort (); -- } -- heap_end += incr; -- return (caddr_t) prev_heap_end; --} -- --int --_fstat (int file, -- struct stat *st) --{ -- st->st_mode = S_IFCHR; -- return 0; --} -- --int --_open (const char *path, -- int flags) --{ -- return __trap34 (SYS_open, path, flags, 0); --} -- --int --_creat (const char *path, -- int mode) --{ -- return __trap34 (SYS_creat, path, mode, 0); --} -- --int --_unlink () --{ -- return -1; --} -- --isatty (fd) -- int fd; --{ -- return 1; --} -- --_isatty (fd) -- int fd; --{ -- return 1; --} -- -- --_exit (n) --{ -- return __trap34 (SYS_exit, n, 0, 0); --} -- --_kill (n, m) --{ -- return __trap34 (SYS_exit, 0xdead, 0, 0); --} -- --_getpid (n) --{ -- return 1; --} -- --_raise () --{ --} -- --int --_stat (const char *path, struct stat *st) -- --{ -- return __trap34 (SYS_stat, path, st, 0); --} -- --int --_chmod (const char *path, short mode) --{ -- return __trap34 (SYS_chmod, path, mode); --} -- --int --_chown (const char *path, short owner, short group) --{ -- return __trap34 (SYS_chown, path, owner, group); --} -- --int --_utime (path, times) -- const char *path; -- char *times; --{ -- return __trap34 (SYS_utime, path, times); --} -- --int --_fork () --{ -- return __trap34 (SYS_fork); --} -- --int --_wait (statusp) -- int *statusp; --{ -- return __trap34 (SYS_wait); --} -- --int --_execve (const char *path, char *const argv[], char *const envp[]) --{ -- return __trap34 (SYS_execve, path, argv, envp); --} -- --int --_execv (const char *path, char *const argv[]) --{ -- return __trap34 (SYS_execv, path, argv); --} -- --int --_pipe (int *fd) --{ -- return __trap34 (SYS_pipe, fd); --} -- --/* This is only provided because _gettimeofday_r and _times_r are -- defined in the same module, so we avoid a link error. */ --clock_t --_times (struct tms *tp) --{ -- return -1; --} -- --int --_gettimeofday (struct timeval *tv, void *tz) --{ -- tv->tv_usec = 0; -- tv->tv_sec = __trap34 (SYS_time); -- return 0; --} -- --static inline int --__setup_argv_for_main (int argc) --{ -- char **argv; -- int i = argc; -- -- argv = __builtin_alloca ((1 + argc) * sizeof (*argv)); -- -- argv[i] = NULL; -- while (i--) { -- argv[i] = __builtin_alloca (1 + __trap34 (SYS_argnlen, i)); -- __trap34 (SYS_argn, i, argv[i]); -- } -- -- return main (argc, argv); --} -- --int --__setup_argv_and_call_main () --{ -- int argc = __trap34 (SYS_argc); -- -- if (argc <= 0) -- return main (argc, NULL); -- else -- return __setup_argv_for_main (argc); --} -diff --color -ruN newlib-4.1.0/newlib/libc/sys/sh/trap.S newlib-4.1.0-kos/newlib/libc/sys/sh/trap.S ---- newlib-4.1.0/newlib/libc/sys/sh/trap.S 2023-02-01 22:17:03.742363687 -0600 -+++ newlib-4.1.0-kos/newlib/libc/sys/sh/trap.S 2023-02-01 22:18:00.451489165 -0600 -@@ -1,43 +0,0 @@ --#if __SH5__ -- .mode SHmedia --#if __SH5__ == 32 && __SHMEDIA__ -- .section .text..SHmedia32, "ax" --#else -- .text --#endif -- .global ___trap34 --___trap34: -- movi 34, r0 -- trapa r0 -- pt/l ret, tr1 -- ptabs/l r18, tr0 -- beqi r1, 0, tr1 --#if __SH5__ == 64 -- movi ((_errno >> 48) & 65535), r0 -- shori ((_errno >> 32) & 65535), r0 -- shori ((_errno >> 16) & 65535), r0 --#else -- movi ((_errno >> 16) & 65535), r0 --#endif -- shori (_errno & 65535), r0 -- stx.l r0, r63, r1 --ret: -- blink tr0, r63 -- --#else -- .text -- .global ___trap34 --___trap34: -- trapa #34 -- tst r1,r1 ! r1 is errno -- bt ret -- mov.l perrno,r2 -- mov.l r1,@r2 --ret: -- rts -- nop -- -- .align 2 --perrno: -- .long _errno --#endif /* ! __SH5__ */ -diff --color -ruN newlib-4.1.0/newlib/libc/sys/sh/truncate.c newlib-4.1.0-kos/newlib/libc/sys/sh/truncate.c ---- newlib-4.1.0/newlib/libc/sys/sh/truncate.c 2023-02-01 22:17:03.742363687 -0600 -+++ newlib-4.1.0-kos/newlib/libc/sys/sh/truncate.c 2023-02-01 22:18:00.452489167 -0600 -@@ -1,9 +1,2 @@ --#include <_ansi.h> --#include <sys/types.h> --#include "sys/syscall.h" -+/* Nothing here. */ - --int --truncate (const char *path, off_t length) --{ -- return __trap34 (SYS_truncate, path, length, 0); --} ++ diff --git a/utils/dc-chain/patches/newlib-2.0.0-kos.diff b/utils/dc-chain/patches/newlib-2.0.0-kos.diff index e618b3c..5fe6d24 100644 --- a/utils/dc-chain/patches/newlib-2.0.0-kos.diff +++ b/utils/dc-chain/patches/newlib-2.0.0-kos.diff @@ -147,61 +147,6 @@ diff -ruN newlib-2.0.0/newlib/libc/sys/sh/ftruncate.c newlib-2.0.0-kos/newlib/li - return __trap34 (SYS_ftruncate, file, length, 0); -} +/* 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## -+ -+ lock_common.h -+ Copyright (C)2004 Megan Potter -+ -+*/ -+ -+#ifndef __SYS_LOCK_H__ -+#define __SYS_LOCK_H__ -+ -+typedef struct { -+ void * owner; -+ int nest; -+ volatile int lock; -+} __newlib_recursive_lock_t; -+ -+#define __NEWLIB_RECURSIVE_LOCK_INIT { (void *)0, 0, 0 } -+ -+typedef volatile int __newlib_lock_t; -+#define __NEWLIB_LOCK_INIT 0 -+ -+typedef __newlib_lock_t _LOCK_T; -+typedef __newlib_recursive_lock_t _LOCK_RECURSIVE_T; -+ -+#define __LOCK_INIT(class,lock) class _LOCK_T lock = __NEWLIB_LOCK_INIT; -+#define __LOCK_INIT_RECURSIVE(class,lock) class _LOCK_RECURSIVE_T lock = __NEWLIB_RECURSIVE_LOCK_INIT; -+#define __lock_init(lock) __newlib_lock_init(&(lock)) -+#define __lock_init_recursive(lock) __newlib_lock_init_recursive(&(lock)) -+#define __lock_close(lock) __newlib_lock_close(&(lock)) -+#define __lock_close_recursive(lock) __newlib_lock_close_recursive(&(lock)) -+#define __lock_acquire(lock) __newlib_lock_acquire(&(lock)) -+#define __lock_acquire_recursive(lock) __newlib_lock_acquire_recursive(&(lock)) -+#define __lock_try_acquire(lock) __newlib_lock_try_acquire(&(lock)) -+#define __lock_try_acquire_recursive(lock) __newlib_lock_try_acquire_recursive(&(lock)) -+#define __lock_release(lock) __newlib_lock_release(&(lock)) -+#define __lock_release_recursive(lock) __newlib_lock_release_recursive(&(lock)) -+ -+void __newlib_lock_init(__newlib_lock_t *); -+void __newlib_lock_close(__newlib_lock_t *); -+void __newlib_lock_acquire(__newlib_lock_t *); -+void __newlib_lock_try_acquire(__newlib_lock_t *); -+void __newlib_lock_release(__newlib_lock_t *); -+ -+void __newlib_lock_init_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_close_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_try_acquire_recursive(__newlib_recursive_lock_t *); -+void __newlib_lock_release_recursive(__newlib_recursive_lock_t *); -+ -+ -+#endif // __NEWLIB_LOCK_COMMON_H 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 diff --git a/utils/dc-chain/patches/newlib-3.3.0-kos.diff b/utils/dc-chain/patches/newlib-3.3.0-kos.diff index 24f19f8..2a2991f 100644 --- a/utils/dc-chain/patches/newlib-3.3.0-kos.diff +++ b/utils/dc-chain/patches/newlib-3.3.0-kos.diff @@ -263,62 +263,6 @@ diff -ruN newlib-3.3.0/newlib/libc/sys/sh/ftruncate.c newlib-3.3.0-kos/newlib/li -{ - return __trap34 (SYS_ftruncate, file, length, 0); -} -diff -ruN newlib-3.3.0/newlib/libc/sys/sh/sys/lock.h newlib-3.3.0-kos/newlib/libc/sys/sh/sys/lock.h ---- newlib-3.3.0/newlib/libc/sys/sh/sys/lock.h 1969-12-31 19:00:00.000000000 -0500 -+++ newlib-3.3.0-kos/newlib/libc/sys/sh/sys/lock.h 2021-02-24 21:52:38.000299800 -0500 -@@ -0,0 +1,52 @@ -+/* KallistiOS ##version## -+ -+ lock_common.h -+ Copyright (C)2004 Megan Potter -+ -+*/ -+ -+#ifndef __SYS_LOCK_H__ -+#define __SYS_LOCK_H__ -+ -+typedef struct { -+ void *owner; -+ int nest; -+ volatile int lock; -+} __newlib_recursive_lock_t; -+ -+#define __NEWLIB_RECURSIVE_LOCK_INIT { (void *)0, 0, 0 } -+ -+typedef volatile int __newlib_lock_t; -+#define __NEWLIB_LOCK_INIT 0 -+ -+typedef __newlib_lock_t _LOCK_T; -+typedef __newlib_recursive_lock_t _LOCK_RECURSIVE_T; -+ -+#define __LOCK_INIT(class,lock) class _LOCK_T lock = __NEWLIB_LOCK_INIT; -+#define __LOCK_INIT_RECURSIVE(class,lock) class _LOCK_RECURSIVE_T lock = __NEWLIB_RECURSIVE_LOCK_INIT; -+#define __lock_init(lock) __newlib_lock_init(&(lock)) -+#define __lock_init_recursive(lock) __newlib_lock_init_recursive(&(lock)) -+#define __lock_close(lock) __newlib_lock_close(&(lock)) -+#define __lock_close_recursive(lock) __newlib_lock_close_recursive(&(lock)) -+#define __lock_acquire(lock) __newlib_lock_acquire(&(lock)) -+#define __lock_acquire_recursive(lock) __newlib_lock_acquire_recursive(&(lock)) -+#define __lock_try_acquire(lock) __newlib_lock_try_acquire(&(lock)) -+#define __lock_try_acquire_recursive(lock) __newlib_lock_try_acquire_recursive(&(lock)) -+#define __lock_release(lock) __newlib_lock_release(&(lock)) -+#define __lock_release_recursive(lock) __newlib_lock_release_recursive(&(lock)) -+ -+void __newlib_lock_init(__newlib_lock_t *); -+void __newlib_lock_close(__newlib_lock_t *); -+void __newlib_lock_acquire(__newlib_lock_t *); -+void __newlib_lock_try_acquire(__newlib_lock_t *); -+void __newlib_lock_release(__newlib_lock_t *); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |