parent
9961c4b75f
commit
f7ea086630
|
@ -1,3 +1,7 @@
|
|||
We do not have /dev at this stage of the bootstrap, including /dev/tty. For
|
||||
some reason, bash has a fixation on /dev/tty, even though we are not
|
||||
interactive. Removing this check entirely fixes this issue.
|
||||
|
||||
diff --color -ru shell.c
|
||||
--- shell.c 2002-07-02 01:27:11.000000000 +1000
|
||||
+++ shell.c 2021-01-16 11:23:36.407287955 +1100
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
--- builtins/common.c.bak 2021-01-15 21:32:56.938683418 +1100
|
||||
tinycc's extern support is bad. i.e. these externs don't propagate through.
|
||||
|
||||
--- builtins/common.c 2021-01-15 21:32:56.938683418 +1100
|
||||
+++ builtins/common.c 2021-01-15 21:34:09.102153806 +1100
|
||||
@@ -46,6 +46,9 @@
|
||||
#include "../flags.h"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
mes libc + setting locale = not worky.
|
||||
|
||||
--- locale.c 2021-01-15 09:38:55.729307629 +1100
|
||||
+++ locale.c 2021-01-15 11:19:01.929391346 +1100
|
||||
@@ -190,7 +190,7 @@
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
mes libc does not have locale support...
|
||||
|
||||
diff --git lib/sh/snprintf.c lib/sh/snprintf.c
|
||||
index 7669576..747aeba 100644
|
||||
--- lib/sh/snprintf.c
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
--- ../bash-2.05b.bak/execute_cmd.c 2021-01-15 09:38:55.730307635 +1100
|
||||
We don't actually want any of these things, which should really be hidden
|
||||
behind the ifdefs given here to disable them when they are not being
|
||||
used (as we do).
|
||||
|
||||
--- execute_cmd.c 2021-01-15 09:38:55.730307635 +1100
|
||||
+++ execute_cmd.c 2021-01-15 09:43:41.046896754 +1100
|
||||
@@ -286,12 +286,18 @@
|
||||
{
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
int name, namelen; is wrong for mes libc, it is char* name, so we modify tinycc
|
||||
to reflect this.
|
||||
|
||||
diff --git lib/sh/oslib.c lib/sh/oslib.c
|
||||
index 90d7be9..37fdf2a 100644
|
||||
--- lib/sh/oslib.c
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
diff -r -N -U3 bzip2-1.0.8/Makefile bzip2-1.0.8/Makefile
|
||||
Disable all coreutils calls in the Makefile which we do not have at this
|
||||
point of the bootstrap. ranlib can be unconditionally disabled as we do not
|
||||
have it either.
|
||||
|
||||
diff -r -N -U3 Makefile Makefile
|
||||
--- Makefile 2019-07-13 18:50:05.000000000 +0100
|
||||
+++ Makefile 2021-01-14 15:45:17.558516299 +0000
|
||||
@@ -21,7 +21,7 @@
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
diff -r -N -U3 bzip2-1.0.8/bzip2.c bzip2-1.0.8/bzip2.c
|
||||
mes libc has no time support, so we remove that.
|
||||
|
||||
It also does not have fch{own,mod}, which we don't care about in the bootstrap
|
||||
anyway, so we can null-op those calls.
|
||||
|
||||
diff -r -N -U3 bzip2.c bzip2.c
|
||||
--- bzip2.c 2019-07-13 18:50:05.000000000 +0100
|
||||
+++ bzip2.c 2021-01-14 14:11:40.160213521 +0000
|
||||
@@ -1051,12 +1051,9 @@
|
||||
|
@ -15,7 +20,7 @@ diff -r -N -U3 bzip2-1.0.8/bzip2.c bzip2-1.0.8/bzip2.c
|
|||
ERROR_IF_NOT_ZERO ( retVal );
|
||||
# endif
|
||||
}
|
||||
diff -r -N -U3 bzip2-1.0.8/utime.h bzip2-1.0.8/utime.h
|
||||
diff -r -N -U3 utime.h utime.h
|
||||
--- utime.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ utime.h 2021-01-14 18:11:11.253825037 +0000
|
||||
@@ -0,0 +1,2 @@
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
strcoll() does not exist in mes libc, change it to strcmp.
|
||||
|
||||
--- src/ls.c
|
||||
+++ src/ls.c
|
||||
@@ -2597,7 +2597,7 @@ xstrcoll (char const *a, char const *b)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
mbstate_t is a struct that is required. However, it is not defined by mes libc.
|
||||
This implementation was taken from glibc 2.32.
|
||||
|
||||
--- lib/quotearg.c 2002-11-23 07:08:10.000000000 +0000
|
||||
+++ lib/quotearg.c 2021-01-17 19:41:59.461095532 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
modechange.h uses functions defined in sys/stat.h, so we need to move it to
|
||||
after sys/stat.h include.
|
||||
|
||||
--- lib/modechange.c 2001-12-09 22:54:19.000000000 +0000
|
||||
+++ lib/modechange.c 2021-01-17 18:34:22.016427148 +0000
|
||||
@@ -28,8 +28,8 @@
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
Comments are unsupported by our flex.
|
||||
|
||||
diff --git scan.l scan.l
|
||||
index 18d0de8..c251a5e 100644
|
||||
--- scan.l
|
||||
+++ scan.l
|
||||
@@ -32,6 +32,7 @@
|
||||
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
|
||||
/* PURPOSE. */
|
||||
|
||||
+#define yyin_defined
|
||||
#include "flexdef.h"
|
||||
#include "parse.h"
|
||||
|
||||
@@ -334,8 +335,8 @@ LEXOPT [aceknopr]
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
yyin has an odd redefinition error in scan.l, so we ensure that we don't
|
||||
acidentally re-declare it.
|
||||
|
||||
diff --git flexdef.h flexdef.h
|
||||
index 3eb710a..94ef024 100644
|
||||
--- flexdef.h
|
||||
|
@ -22,3 +25,13 @@ index 3eb710a..94ef024 100644
|
|||
extern char *action_array;
|
||||
extern int action_size;
|
||||
extern int defs1_offset, prolog_offset, action_offset, action_index;
|
||||
--- scan.l
|
||||
+++ scan.l
|
||||
@@ -32,6 +32,7 @@
|
||||
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
|
||||
/* PURPOSE. */
|
||||
|
||||
+#define yyin_defined
|
||||
#include "flexdef.h"
|
||||
#include "parse.h"
|
||||
|
|
@ -3,6 +3,9 @@ From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
|
|||
Date: Wed, 27 Jan 2021 00:40:19 +0000
|
||||
Subject: [PATCH] Workaround for lex to work with mes libc.
|
||||
|
||||
Similarily to yacc, remove wchar. See yacc patch for further
|
||||
information.
|
||||
|
||||
---
|
||||
lex/Makefile.mk | 2 +-
|
||||
lex/allprint.c | 6 ++--
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
Remove all kinds of wchar support. Mes Libc does not support wchar in any form,
|
||||
so we need to remove it.
|
||||
|
||||
heirloom-devtools is all kinds of broken in this way. C standard dictates that
|
||||
wchar_t may be defined as char, however heirloom-devtools does not respect this,
|
||||
which makes this non-trivial.
|
||||
|
||||
diff -U3 -r yacc/dextern yacc/dextern
|
||||
--- yacc/dextern 2005-11-10 20:31:45.000000000 +0000
|
||||
+++ yacc/dextern 2021-01-25 18:21:45.286602527 +0000
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
diff -r -U3 m4-1.4/src/m4.c m4-1.4-patched/src/m4.c
|
||||
sys/signal.h is not the POSIX appropriate place for signal.h, which mes libc
|
||||
attempts to conform to.
|
||||
|
||||
diff -r -U3 src/m4.c src/m4.c
|
||||
--- src/m4.c 1994-11-02 03:14:28.000000000 +0000
|
||||
+++ src/m4.c 2021-01-15 00:19:21.947654461 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
diff --color -ru make-3.80.bak/job.c make-3.80/job.c
|
||||
Two incompatibilities:
|
||||
|
||||
* mes libc does not provide string.h
|
||||
* lseek is not provided by mes libc
|
||||
|
||||
Both of these functions are unused later.
|
||||
|
||||
diff --color -ru job.c job.c
|
||||
--- job.c 2021-01-14 10:26:42.457657979 +1100
|
||||
+++ job.c 2021-01-14 10:27:03.332776801 +1100
|
||||
@@ -28,8 +28,6 @@
|
||||
|
@ -10,7 +17,7 @@ diff --color -ru make-3.80.bak/job.c make-3.80/job.c
|
|||
/* Default shell to use. */
|
||||
#ifdef WINDOWS32
|
||||
char *default_shell = "sh.exe";
|
||||
diff --color -ru make-3.80.bak/make.h make-3.80/make.h
|
||||
diff --color -ru make.h make.h
|
||||
--- make.h 2021-01-14 10:26:42.456657974 +1100
|
||||
+++ make.h 2021-01-14 10:26:51.154707480 +1100
|
||||
@@ -467,9 +467,6 @@
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
Reimplement qswap in a more correct manner that works much more cleanly and
|
||||
with larger string sizes.
|
||||
|
||||
--- lib/stdlib/qsort.c
|
||||
+++ lib/stdlib/qsort.c
|
||||
@@ -1,6 +1,7 @@
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
static linking is the only typing of linking mes libc supports, so default to
|
||||
it.
|
||||
|
||||
--- libtcc.c 2021-01-14 08:25:30.774995301 +1100
|
||||
+++ libtcc.c 2021-01-14 08:26:37.594417450 +1100
|
||||
@@ -734,6 +734,7 @@
|
||||
|
|
Loading…
Reference in New Issue