mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-10 21:35:24 +01:00
Split mes libc into a separate source package.
Drop one of the mes git submodules.
This commit is contained in:
parent
419cd74d92
commit
3dfe3dc0f0
21 changed files with 196 additions and 162 deletions
5
sysa/mes-0.23/checksums
Normal file
5
sysa/mes-0.23/checksums
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
920b35eb5ae2fda55348a30aafed7f006a5b86cbe05093df2c75e5d169bd9cb0 /after/lib/libc.a
|
||||
12c07ae103e7e3b390150a79e5c600d88de14e9bb73a066f6342582729ef5a3f /after/lib/libgetopt.a
|
||||
d1168ee9b528e39f0b40e8d51fb7fa3619c4a5ee928137f7faf6d0879b0916b0 /after/lib/crt1.o
|
||||
461ca1494737fab86fe1c1d3addeaf9d0ece413e353abcdea8674db3f700cda3 /after/lib/crtn.o
|
||||
09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /after/lib/crti.o
|
||||
71
sysa/mes-0.23/mes-libc-0.23.sh
Executable file
71
sysa/mes-0.23/mes-libc-0.23.sh
Executable file
|
|
@ -0,0 +1,71 @@
|
|||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_compile() {
|
||||
FILES="ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \
|
||||
ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c \
|
||||
ctype/tolower.c ctype/toupper.c \
|
||||
dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c dirent/readdir.c \
|
||||
linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c \
|
||||
linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c \
|
||||
linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c \
|
||||
linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/kill.c linux/link.c linux/lseek.c \
|
||||
linux/lstat.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c \
|
||||
linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c \
|
||||
linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c \
|
||||
linux/x86-mes-gcc/_exit.c linux/x86-mes-gcc/syscall.c linux/x86-mes-gcc/_write.c \
|
||||
math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/__buffered_read.c \
|
||||
mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c \
|
||||
mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c \
|
||||
mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c \
|
||||
posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c \
|
||||
posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c \
|
||||
posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c \
|
||||
stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c \
|
||||
stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c \
|
||||
stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c \
|
||||
stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c \
|
||||
stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c \
|
||||
stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c \
|
||||
stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/malloc.c \
|
||||
stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c \
|
||||
stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c \
|
||||
string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c \
|
||||
string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c \
|
||||
string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c \
|
||||
string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c \
|
||||
string/strstr.c string/strupr.c \
|
||||
stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c \
|
||||
stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c \
|
||||
stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c \
|
||||
stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c \
|
||||
stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c \
|
||||
stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c \
|
||||
stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c x86-mes-gcc/setjmp.c"
|
||||
|
||||
CFLAGS="-D HAVE_CONFIG_H=1 -I include -I include/linux/x86"
|
||||
|
||||
for f in $FILES; do
|
||||
tcc ${CFLAGS} -c "lib/${f}"
|
||||
done
|
||||
# libc.a
|
||||
tcc -ar cr libc.a *.o
|
||||
|
||||
# crt{1,n,i}.o
|
||||
tcc ${CFLAGS} -c lib/linux/x86-mes-gcc/crt1.c
|
||||
tcc ${CFLAGS} -c lib/linux/x86-mes-gcc/crtn.c
|
||||
tcc ${CFLAGS} -c lib/linux/x86-mes-gcc/crti.c
|
||||
|
||||
# libgetopt.a
|
||||
tcc ${CFLAGS} -c lib/posix/getopt.c
|
||||
tcc -ar cr libgetopt.a getopt.o
|
||||
}
|
||||
|
||||
src_install() {
|
||||
install -m 644 libc.a "${DESTDIR}${PREFIX}/lib/"
|
||||
install -m 644 libgetopt.a "${DESTDIR}${PREFIX}/lib/"
|
||||
install -m 644 crt1.o "${DESTDIR}${PREFIX}/lib/"
|
||||
install -m 644 crtn.o "${DESTDIR}${PREFIX}/lib/"
|
||||
install -m 644 crti.o "${DESTDIR}${PREFIX}/lib/"
|
||||
}
|
||||
27
sysa/mes-0.23/patches/crt1.patch
Normal file
27
sysa/mes-0.23/patches/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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue