mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-22 19:16:32 +01:00
Move tcc 0.9.27 after bzip2.
This also allows to merge two builds of tcc 0.9.27. Drop tcc 0.9.27 git submodule.
This commit is contained in:
parent
f030a3a74e
commit
419cd74d92
29 changed files with 98 additions and 166 deletions
27
sysa/tcc-0.9.27/patches-mes-libc/crt1.patch
Normal file
27
sysa/tcc-0.9.27/patches-mes-libc/crt1.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
|
||||
Fix issue in mes-libc crt where argc was getting truncated to lower byte and
|
||||
prevented programs with more than 255 arguments from working correctly.
|
||||
|
||||
--- lib/linux/x86-mes-gcc/crt1.c
|
||||
+++ lib/linux/x86-mes-gcc/crt1.c
|
||||
@@ -48,7 +48,7 @@ _start ()
|
||||
asm (
|
||||
"mov %%ebp,%%eax\n\t"
|
||||
"add $4,%%eax\n\t"
|
||||
- "movzbl (%%eax),%%eax\n\t"
|
||||
+ "mov (%%eax),%%eax\n\t"
|
||||
"add $3,%%eax\n\t"
|
||||
"shl $2,%%eax\n\t"
|
||||
"add %%ebp,%%eax\n\t"
|
||||
@@ -64,7 +64,7 @@ _start ()
|
||||
|
||||
"mov %ebp,%eax\n\t"
|
||||
"add $4,%eax\n\t"
|
||||
- "movzbl (%eax),%eax\n\t"
|
||||
+ "mov (%eax),%eax\n\t"
|
||||
"push %eax\n\t"
|
||||
|
||||
"call main\n\t"
|
||||
28
sysa/tcc-0.9.27/patches-mes-libc/qsort.patch
Normal file
28
sysa/tcc-0.9.27/patches-mes-libc/qsort.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
|
||||
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
|
||||
@@ -24,10 +25,14 @@
|
||||
void
|
||||
qswap (void *a, void *b, size_t size)
|
||||
{
|
||||
- char *buf[8];
|
||||
- memcpy (buf, a, size);
|
||||
- memcpy (a, b, size);
|
||||
- memcpy (b, buf, size);
|
||||
+ char *pa = a;
|
||||
+ char *pb = b;
|
||||
+ do
|
||||
+ {
|
||||
+ char tmp = *pa;
|
||||
+ *pa++ = *pb;
|
||||
+ *pb++ = tmp;
|
||||
+ } while (--size > 0);
|
||||
}
|
||||
|
||||
size_t
|
||||
Loading…
Add table
Add a link
Reference in a new issue