build: Add toolchain
This commit is contained in:
parent
3c6310d4e3
commit
6373955e86
17 changed files with 3292 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
Subject: Workaround change in glibc
|
||||
|
||||
Temporary workaround to compile with glibc 2.28, which
|
||||
deprecated some constants
|
||||
|
||||
Based on the workaround made for the tools/m4 package
|
||||
|
||||
--- a/lib/stdio-impl.h
|
||||
+++ b/lib/stdio-impl.h
|
||||
@@ -18,6 +18,12 @@
|
||||
the same implementation of stdio extension API, except that some fields
|
||||
have different naming conventions, or their access requires some casts. */
|
||||
|
||||
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
|
||||
+ problem by defining it ourselves. FIXME: Do not rely on glibc
|
||||
+ internals. */
|
||||
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
|
||||
+# define _IO_IN_BACKUP 0x100
|
||||
+#endif
|
||||
|
||||
/* BSD stdio derived implementations. */
|
||||
|
||||
--- a/lib/fseterr.c
|
||||
+++ b/lib/fseterr.c
|
||||
@@ -29,7 +29,7 @@
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_flags |= _IO_ERR_SEEN;
|
||||
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
|
||||
fp_->_flags |= __SERR;
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
This patch prevents a conflict with glibc
|
||||
|
||||
--- a/misc/create_inode.c
|
||||
+++ b/misc/create_inode.c
|
||||
@@ -392,7 +392,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
}
|
||||
#endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
|
||||
|
||||
-static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
||||
+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
||||
off_t start, off_t end, char *buf,
|
||||
char *zerobuf)
|
||||
{
|
||||
@@ -466,7 +466,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
|
||||
|
||||
data_blk = data & ~(fs->blocksize - 1);
|
||||
hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
|
||||
- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
|
||||
+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
|
||||
zerobuf);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -516,7 +516,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
||||
}
|
||||
for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
|
||||
i++, ext++) {
|
||||
- err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
|
||||
+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
|
||||
ext->fe_logical + ext->fe_length,
|
||||
buf, zerobuf);
|
||||
if (err)
|
||||
@@ -569,7 +569,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
|
||||
goto out;
|
||||
#endif
|
||||
|
||||
- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
|
||||
+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
|
||||
zerobuf);
|
||||
out:
|
||||
ext2fs_free_mem(&zerobuf);
|
||||
131
toolchain/support/patches/package/m4/000-fix-fseeko.patch
Normal file
131
toolchain/support/patches/package/m4/000-fix-fseeko.patch
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
From c79aedf13fe693da0fc5c4ff727aed5bd43526dc Mon Sep 17 00:00:00 2001
|
||||
From: Hutson Betts <hutson@hyper-expanse.net>
|
||||
Date: Thu, 10 Dec 2020 21:13:54 -0600
|
||||
Subject: [PATCH] glibc 2.28
|
||||
|
||||
|
||||
diff --git a/lib/fflush.c b/lib/fflush.c
|
||||
index ef2a7f1..787790d 100644
|
||||
--- a/lib/fflush.c
|
||||
+++ b/lib/fflush.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#undef fflush
|
||||
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
|
||||
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
|
||||
static void
|
||||
@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
|
||||
|
||||
#endif
|
||||
|
||||
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
|
||||
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
|
||||
|
||||
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
|
||||
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
|
||||
if (stream == NULL || ! freading (stream))
|
||||
return fflush (stream);
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
|
||||
clear_ungetc_buffer_preserving_position (stream);
|
||||
|
||||
diff --git a/lib/fpending.c b/lib/fpending.c
|
||||
index ce93604..9fe7ffb 100644
|
||||
--- a/lib/fpending.c
|
||||
+++ b/lib/fpending.c
|
||||
@@ -32,7 +32,7 @@ __fpending (FILE *fp)
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
return fp->_IO_write_ptr - fp->_IO_write_base;
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
diff --git a/lib/fpurge.c b/lib/fpurge.c
|
||||
index 53ee68c..7cba3a3 100644
|
||||
--- a/lib/fpurge.c
|
||||
+++ b/lib/fpurge.c
|
||||
@@ -62,7 +62,7 @@ fpurge (FILE *fp)
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_IO_read_end = fp->_IO_read_ptr;
|
||||
fp->_IO_write_ptr = fp->_IO_write_base;
|
||||
/* Avoid memory leak when there is an active ungetc buffer. */
|
||||
diff --git a/lib/freadahead.c b/lib/freadahead.c
|
||||
index cfc969b..5e43e13 100644
|
||||
--- a/lib/freadahead.c
|
||||
+++ b/lib/freadahead.c
|
||||
@@ -25,7 +25,7 @@
|
||||
size_t
|
||||
freadahead (FILE *fp)
|
||||
{
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
if (fp->_IO_write_ptr > fp->_IO_write_base)
|
||||
return 0;
|
||||
return (fp->_IO_read_end - fp->_IO_read_ptr)
|
||||
diff --git a/lib/freading.c b/lib/freading.c
|
||||
index 05cb0b8..f1da5b9 100644
|
||||
--- a/lib/freading.c
|
||||
+++ b/lib/freading.c
|
||||
@@ -31,7 +31,7 @@ freading (FILE *fp)
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
return ((fp->_flags & _IO_NO_WRITES) != 0
|
||||
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
|
||||
&& fp->_IO_read_base != NULL));
|
||||
diff --git a/lib/fseeko.c b/lib/fseeko.c
|
||||
index 0c01c4f..0601619 100644
|
||||
--- a/lib/fseeko.c
|
||||
+++ b/lib/fseeko.c
|
||||
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
#endif
|
||||
|
||||
/* These tests are based on fpurge.c. */
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
if (fp->_IO_read_end == fp->_IO_read_ptr
|
||||
&& fp->_IO_write_ptr == fp->_IO_write_base
|
||||
&& fp->_IO_save_base == NULL)
|
||||
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
return -1;
|
||||
}
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_flags &= ~_IO_EOF_SEEN;
|
||||
fp->_offset = pos;
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
|
||||
index 766d693..75fe3ad 100644
|
||||
--- a/lib/stdio-impl.h
|
||||
+++ b/lib/stdio-impl.h
|
||||
@@ -18,6 +18,12 @@
|
||||
the same implementation of stdio extension API, except that some fields
|
||||
have different naming conventions, or their access requires some casts. */
|
||||
|
||||
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
|
||||
+ problem by defining it ourselves. FIXME: Do not rely on glibc
|
||||
+ internals. */
|
||||
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
|
||||
+# define _IO_IN_BACKUP 0x100
|
||||
+#endif
|
||||
|
||||
/* BSD stdio derived implementations. */
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
--- a/include/SDL_keysym.h
|
||||
+++ b/include/SDL_keysym.h
|
||||
@@ -296,6 +296,19 @@
|
||||
SDLK_UNDO = 322, /**< Atari keyboard has Undo */
|
||||
/*@}*/
|
||||
|
||||
+ /** @name RG35XX keys */
|
||||
+ /*@{*/
|
||||
+ SDLK_KATAKANA = 323,
|
||||
+ SDLK_HIRAGANA = 324,
|
||||
+ SDLK_HENKAN = 325,
|
||||
+ SDLK_KATAKANAHIRAGANA = 326,
|
||||
+ SDLK_MUHENKAN = 327,
|
||||
+ SDLK_KP_JPCOMMA = 328,
|
||||
+ SDLK_KP_SLASH = 329,
|
||||
+ SDLK_CURSORBLOCKUP = 330,
|
||||
+ SDLK_CURSORBLOCKDOWN = 331,
|
||||
+ /*@}*/
|
||||
+
|
||||
/* Add any other keys here */
|
||||
|
||||
SDLK_LAST
|
||||
--- a/src/video/fbcon/SDL_fbevents.c
|
||||
+++ b/src/video/fbcon/SDL_fbevents.c
|
||||
@@ -1133,6 +1133,38 @@
|
||||
case 127:
|
||||
keymap[i] = SDLK_MENU;
|
||||
break;
|
||||
+
|
||||
+ /* RG35XX */
|
||||
+ case SCANCODE_KATAKANA:
|
||||
+ keymap[i] = SDLK_KATAKANA;
|
||||
+ break;
|
||||
+ case SCANCODE_HIRAGANA:
|
||||
+ keymap[i] = SDLK_HIRAGANA;
|
||||
+ break;
|
||||
+ case SCANCODE_HENKAN:
|
||||
+ keymap[i] = SDLK_HENKAN;
|
||||
+ break;
|
||||
+ case SCANCODE_KATAKANAHIRAGANA:
|
||||
+ keymap[i] = SDLK_KATAKANAHIRAGANA;
|
||||
+ break;
|
||||
+ case SCANCODE_MUHENKAN:
|
||||
+ keymap[i] = SDLK_MUHENKAN;
|
||||
+ break;
|
||||
+ case SCANCODE_KPJPCOMMA:
|
||||
+ keymap[i] = SDLK_KP_JPCOMMA;
|
||||
+ break;
|
||||
+ case SCANCODE_KEYPADENTER:
|
||||
+ keymap[i] = SDLK_KP_ENTER;
|
||||
+ break;
|
||||
+ case SCANCODE_CURSORBLOCKUP:
|
||||
+ keymap[i] = SDLK_CURSORBLOCKUP;
|
||||
+ break;
|
||||
+ case SCANCODE_CURSORBLOCKDOWN:
|
||||
+ keymap[i] = SDLK_CURSORBLOCKDOWN;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+
|
||||
/* this should take care of all standard ascii keys */
|
||||
default:
|
||||
keymap[i] = KVAL(vga_keymap[0][i]);
|
||||
--- a/src/video/fbcon/SDL_fbkeys.h
|
||||
+++ b/src/video/fbcon/SDL_fbkeys.h
|
||||
@@ -114,6 +114,14 @@
|
||||
#define SCANCODE_F11 87
|
||||
#define SCANCODE_F12 88
|
||||
|
||||
+/* RG35XX */
|
||||
+#define SCANCODE_KATAKANA 90
|
||||
+#define SCANCODE_HIRAGANA 91
|
||||
+#define SCANCODE_HENKAN 92
|
||||
+#define SCANCODE_KATAKANAHIRAGANA 93
|
||||
+#define SCANCODE_MUHENKAN 94
|
||||
+#define SCANCODE_KPJPCOMMA 95
|
||||
+
|
||||
#define SCANCODE_KEYPADENTER 96
|
||||
#define SCANCODE_RIGHTCONTROL 97
|
||||
#define SCANCODE_CONTROL 97
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
--- a/src/video/fbcon/SDL_fbvideo.c
|
||||
+++ b/src/video/fbcon/SDL_fbvideo.c
|
||||
@@ -1907,15 +1907,12 @@
|
||||
static void FB_VideoQuit(_THIS)
|
||||
{
|
||||
int i, j;
|
||||
+ const char *dontClearPixels = SDL_getenv("SDL_FBCON_DONT_CLEAR");
|
||||
|
||||
if ( this->screen ) {
|
||||
- /* Clear screen and tell SDL not to free the pixels */
|
||||
-
|
||||
- const char *dontClearPixels = SDL_getenv("SDL_FBCON_DONT_CLEAR");
|
||||
-
|
||||
/* If the framebuffer is not to be cleared, make sure that we won't
|
||||
* display the previous frame when disabling double buffering. */
|
||||
- if ( dontClearPixels && flip_page == 0 ) {
|
||||
+ if ( dontClearPixels && (this->screen->flags & SDL_DOUBLEBUF) && flip_page == 0 ) {
|
||||
SDL_memcpy(flip_address[0], flip_address[1], this->screen->pitch * this->screen->h);
|
||||
}
|
||||
|
||||
@@ -1969,7 +1966,13 @@
|
||||
|
||||
/* Restore the original video mode and palette */
|
||||
if ( FB_InGraphicsMode(this) ) {
|
||||
- FB_RestorePalette(this);
|
||||
+ if (dontClearPixels) {
|
||||
+ /* Restore only panning, keep current mode */
|
||||
+ ioctl(console_fd, FBIOGET_VSCREENINFO, &saved_vinfo);
|
||||
+ saved_vinfo.yoffset = saved_vinfo.xoffset = 0;
|
||||
+ } else {
|
||||
+ FB_RestorePalette(this);
|
||||
+ }
|
||||
ioctl(console_fd, FBIOPUT_VSCREENINFO, &saved_vinfo);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue