From f98161581c6423f53169cfcd4356af6ed9757b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 19 Nov 2023 01:42:07 +0000 Subject: [PATCH] Update to newer bootstrappable tcc snapshot. --- parts.rst | 5 +- rootfs.py | 2 +- sysa/tcc-0.9.26/sources | 2 +- sysa/tcc-0.9.26/tcc-0.9.26.checksums | 13 - sysa/tcc-0.9.26/tcc-0.9.26.kaem | 334 +++++++------------ sysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums | 10 + sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums | 10 + sysa/tcc-0.9.27/tcc-0.9.27.checksums | 2 +- 8 files changed, 148 insertions(+), 230 deletions(-) delete mode 100644 sysa/tcc-0.9.26/tcc-0.9.26.checksums create mode 100644 sysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums create mode 100644 sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums diff --git a/parts.rst b/parts.rst index 9fdbc8d..99044ff 100644 --- a/parts.rst +++ b/parts.rst @@ -190,9 +190,8 @@ non-trivial process and as seen within tcc. kaem has many different parts within it: a. tcc 0.9.26 is first compiled using ``mescc``. b. The mes libc is recompiled using tcc (``mescc`` has a non-standard ``.a`` format), including some additions for later programs. c. tcc 0.9.26 is -recompiled 5(!) times to add new features that are required for other -features, namely ``long long`` and ``float``. Each time, the libc is -also recompiled. +recompiled 3 times to add new features, namely ``long long`` and +``float``. Each time, the libc is also recompiled. tinycc 0.9.27 ============= diff --git a/rootfs.py b/rootfs.py index 3b91551..f4a6d22 100755 --- a/rootfs.py +++ b/rootfs.py @@ -125,7 +125,7 @@ def main(): # Arch validation if args.arch != "x86": - raise ValueError("Only x86 is supported at the moment.") + print("Only x86 is supported at the moment, other arches are for development only.") # Tmp validation if args.bwrap and args.tmpfs: diff --git a/sysa/tcc-0.9.26/sources b/sysa/tcc-0.9.26/sources index 3d341fb..4b02f59 100644 --- a/sysa/tcc-0.9.26/sources +++ b/sysa/tcc-0.9.26/sources @@ -1 +1 @@ -https://lilypond.org/janneke/tcc/tcc-0.9.26-1136-g5bba73cc.tar.gz 23cacd448cff2baf6ed76c2d1e2d654ff4e557046e311dfb6be7e1c631014ef8 tcc-0.9.26.tar.gz +https://lilypond.org/janneke/tcc/tcc-0.9.26-1147-gee75a10c.tar.gz 6b8cbd0a5fed0636d4f0f763a603247bc1935e206e1cc5bda6a2818bab6e819f tcc-0.9.26.tar.gz diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.checksums b/sysa/tcc-0.9.26/tcc-0.9.26.checksums deleted file mode 100644 index ca37046..0000000 --- a/sysa/tcc-0.9.26/tcc-0.9.26.checksums +++ /dev/null @@ -1,13 +0,0 @@ -b7e612fd5f6a15bcfaabe265ee05a34073d1ebd7af9d1728fbfa8a220bf94a0a /usr/bin/mes-tcc -b1cc0b2c465e3ab925b14ef170180e44420f41da3dd91de9339efd591746ba31 /usr/bin/boot0-tcc -edf3572626066eb79325120787a51ab24a6add5d828c36f0131c61041edb5946 /usr/bin/boot1-tcc -b6dd80a0e97d8711e3329874ed29a1d1228e23f1a82b2310df28244d2edbb3fd /usr/bin/boot2-tcc -16030de9c65641ee5869b452b2860e508ef1eb510ef56773c00e7d8ea2a5b702 /usr/bin/boot3-tcc -cda5029eff7c73caae5aad64c756ba06c19efcdf858803060f7e35b5cfee1738 /usr/bin/boot4-tcc -5b71b1c868c787d6c2ecf1223c2b87cb480b32c2ffab53f433f4d47d22b308f1 /usr/bin/tcc -3bfd10dfe347c4fb40fbf5f2f705cd806c77e0f80cf4ad1ecfd4beddada2937c /usr/lib/mes/libc.a -12c07ae103e7e3b390150a79e5c600d88de14e9bb73a066f6342582729ef5a3f /usr/lib/mes/libgetopt.a -76d280e0733f2c84aad180968167d789a825ac56526bddba4f100d6d74851027 /usr/lib/mes/crt1.o -09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /usr/lib/mes/crti.o -461ca1494737fab86fe1c1d3addeaf9d0ece413e353abcdea8674db3f700cda3 /usr/lib/mes/crtn.o -ac11f09698f092ed76ae40ebcd56cf3f2b903ea1333ef7537a00673dd6f73da7 /usr/lib/mes/tcc/libtcc1.a diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.kaem b/sysa/tcc-0.9.26/tcc-0.9.26.kaem index df2cd25..3de99ac 100755 --- a/sysa/tcc-0.9.26/tcc-0.9.26.kaem +++ b/sysa/tcc-0.9.26/tcc-0.9.26.kaem @@ -15,7 +15,7 @@ MES_SOURCE=${MES_PREFIX} MES=${bindir}/mes TCC_TAR=tcc-0.9.26 -TCC_PKG=tcc-0.9.26-1136-g5bba73cc +TCC_PKG=tcc-0.9.26-1147-gee75a10c # Check tarball checksums checksum-transcriber sources @@ -30,7 +30,7 @@ ungz --file ${distfiles}/${MES_PKG}.tar.gz --output ${MES_PKG}.tar cd .. cd build -untar --file ../src/${TCC_TAR}.tar +untar --non-strict --file ../src/${TCC_TAR}.tar simple-patch ${TCC_PKG}/tcctools.c \ ../simple-patches/remove-fileopen.before ../simple-patches/remove-fileopen.after simple-patch ${TCC_PKG}/tcctools.c \ @@ -39,8 +39,9 @@ simple-patch ${TCC_PKG}/tcctools.c \ untar --non-strict --file ../src/${MES_PKG}.tar # Create config.h +catm ${MES_PKG_DIR}/include/mes/config.h +catm ${TCC_PKG}/config.h cd ${TCC_PKG} -catm config.h if match ${ARCH} x86; then MES_ARCH=x86 @@ -48,14 +49,28 @@ if match ${ARCH} x86; then MES_LIBC_SUFFIX=gcc HAVE_LONG_LONG=0 fi +if match ${ARCH} amd64; then + MES_ARCH=x86_64 + TCC_TARGET_ARCH=X86_64 + MES_LIBC_SUFFIX=gcc + HAVE_LONG_LONG=1 +fi +if match ${ARCH} riscv64; then + MES_ARCH=riscv64 + TCC_TARGET_ARCH=RISCV64 + MES_LIBC_SUFFIX=tcc + HAVE_LONG_LONG=1 +fi + ${MES} --no-auto-compile -e main ${bindir}/mescc.scm -- \ -S \ -o tcc.s \ -I ${incdir} \ -D BOOTSTRAP=1 \ + -D HAVE_LONG_LONG=${HAVE_LONG_LONG} \ -I . \ - -D TCC_TARGET_I386=1 \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ -D inline= \ -D CONFIG_TCCDIR=\"${libdir}/mes/tcc\" \ -D CONFIG_SYSROOT=\"/\" \ @@ -67,25 +82,24 @@ ${MES} --no-auto-compile -e main ${bindir}/mescc.scm -- \ -D CONFIG_TCCBOOT=1 \ -D CONFIG_TCC_STATIC=1 \ -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ -D TCC_VERSION=\"0.9.26\" \ -D ONE_SOURCE=1 \ tcc.c ${MES} --no-auto-compile -e main ${bindir}/mescc.scm -- \ --base-address 0x08048000 \ - -o mes-tcc \ + -o tcc-mes \ -L ${libdir} \ tcc.s \ -l c+tcc -cp mes-tcc ${bindir}/ -chmod 755 ${bindir}/mes-tcc +cp tcc-mes ${bindir}/ +chmod 755 ${bindir}/tcc-mes # Install libc into a subdirectory libdir=${libdir}/mes mkdir ${libdir} -# test mes-tcc -mes-tcc -version +# test tcc-mes +tcc-mes -version # Recompile the mes C library cd ../${MES_PKG_DIR} @@ -96,42 +110,53 @@ catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/isc cd .. # crt1.o -mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c +tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c -# crtn.o -mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c +catm ${libdir}/crtn.o +catm ${libdir}/crti.o +if match ${ARCH} x86; then + # crtn.o + tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c -# crti.o -mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c + # crti.o + tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi # libc+gcc.a -mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -mes-tcc -ar cr ${libdir}/libc.a unified-libc.o +tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-mes -ar cr ${libdir}/libc.a unified-libc.o # libtcc1.a mkdir ${libdir}/tcc -mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 lib/libtcc1.c -mes-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o +tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-mes -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-mes -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o +fi # libgetopt.a -mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 lib/posix/getopt.c -mes-tcc -ar cr ${libdir}/libgetopt.a getopt.o +tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} lib/posix/getopt.c +tcc-mes -ar cr ${libdir}/libgetopt.a getopt.o cd ../${TCC_PKG} # boot0 (ref comments here for all boot*) # compile -mes-tcc \ +tcc-mes \ -g \ -v \ -static \ - -o boot0-tcc \ + -o tcc-boot0 \ -D BOOTSTRAP=1 \ - -D HAVE_LONG_LONG_STUB=1 \ + -D HAVE_FLOAT=1 \ + -D HAVE_BITFIELD=1 \ + -D HAVE_LONG_LONG=1 \ -D HAVE_SETJMP=1 \ -I . \ -I ${prefix}/include \ - -D TCC_TARGET_I386=1 \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ -D CONFIG_TCCDIR=\"${libdir}/tcc\" \ -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \ -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ @@ -142,43 +167,51 @@ mes-tcc \ -D CONFIG_TCCBOOT=1 \ -D CONFIG_TCC_STATIC=1 \ -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ -D TCC_VERSION=\"0.9.26\" \ -D ONE_SOURCE=1 \ -L . \ -L ${libdir} \ tcc.c # Install -cp boot0-tcc ${bindir}/ -chmod 755 ${bindir}/boot0-tcc +cp tcc-boot0 ${bindir}/ +chmod 755 ${bindir}/tcc-boot0 cd ../${MES_PKG_DIR} # Recompile libc: crt{1,n,i}, libtcc.a, libc.a -boot0-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c -boot0-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c -boot0-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c -boot0-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG_STUB=1 -I include -I include/linux/x86 lib/libtcc1.c -boot0-tcc -c -D TCC_TARGET_I386=1 ../${TCC_PKG}/lib/libtcc1.c -boot0-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o -boot0-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -boot0-tcc -ar cr ${libdir}/libc.a unified-libc.o +tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c +if match ${ARCH} x86; then + tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +tcc-boot0 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-boot0 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-boot0 -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-boot0 -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o +fi + +tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-boot0 -ar cr ${libdir}/libc.a unified-libc.o cd ../${TCC_PKG} # Test boot0 -boot0-tcc -version +tcc-boot0 -version # boot1 -boot0-tcc \ +tcc-boot0 \ -g \ -v \ -static \ - -o boot1-tcc \ + -o tcc-boot1 \ -D BOOTSTRAP=1 \ + -D HAVE_FLOAT=1 \ -D HAVE_BITFIELD=1 \ -D HAVE_LONG_LONG=1 \ -D HAVE_SETJMP=1 \ -I . \ -I ${prefix}/include \ - -D TCC_TARGET_I386=1 \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ -D CONFIG_TCCDIR=\"${libdir}/tcc\" \ -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \ -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ @@ -189,41 +222,48 @@ boot0-tcc \ -D CONFIG_TCCBOOT=1 \ -D CONFIG_TCC_STATIC=1 \ -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ -D TCC_VERSION=\"0.9.26\" \ -D ONE_SOURCE=1 \ -L . \ tcc.c -cp boot1-tcc ${bindir} -chmod 755 ${bindir}/boot1-tcc +cp tcc-boot1 ${bindir} +chmod 755 ${bindir}/tcc-boot1 cd ../${MES_PKG_DIR} -boot1-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c -boot1-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c -boot1-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c -boot1-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c -boot1-tcc -c -D TCC_TARGET_I386=1 ../${TCC_PKG}/lib/libtcc1.c -boot1-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o -boot1-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -boot1-tcc -ar cr ${libdir}/libc.a unified-libc.o +tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c +if match ${ARCH} x86; then + tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +tcc-boot1 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-boot1 -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-boot1 -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o +fi + +tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-boot1 -ar cr ${libdir}/libc.a unified-libc.o cd ../${TCC_PKG} # Test boot1 -boot1-tcc -version +tcc-boot1 -version # boot2 -boot1-tcc \ +tcc-boot1 \ -g \ -v \ -static \ - -o boot2-tcc \ + -o tcc-boot2 \ -D BOOTSTRAP=1 \ -D HAVE_BITFIELD=1 \ - -D HAVE_FLOAT_STUB=1 \ + -D HAVE_FLOAT=1 \ -D HAVE_LONG_LONG=1 \ -D HAVE_SETJMP=1 \ -I . \ -I ${prefix}/include \ - -D TCC_TARGET_I386=1 \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ -D CONFIG_TCCDIR=\"${libdir}/tcc\" \ -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \ -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ @@ -234,170 +274,45 @@ boot1-tcc \ -D CONFIG_TCCBOOT=1 \ -D CONFIG_TCC_STATIC=1 \ -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ -D TCC_VERSION=\"0.9.26\" \ -D ONE_SOURCE=1 \ -L . \ tcc.c -cp boot2-tcc ${bindir} -chmod 755 ${bindir}/boot2-tcc +cp tcc-boot2 ${bindir} +chmod 755 ${bindir}/tcc-boot2 cd ../${MES_PKG_DIR} -boot2-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c -boot2-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c -boot2-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c -boot2-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT_STUB=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c -boot2-tcc -c -D TCC_TARGET_I386=1 ../${TCC_PKG}/lib/libtcc1.c -boot2-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o -boot2-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -boot2-tcc -ar cr ${libdir}/libc.a unified-libc.o +tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c +if match ${ARCH} x86; then + tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${libdir}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +tcc-boot2 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-boot2 -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-boot2 -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o +fi + +tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-boot2 -ar cr ${libdir}/libc.a unified-libc.o cd ../${TCC_PKG} # Test boot2 -boot2-tcc -version - -# boot3 -boot2-tcc \ - -g \ - -v \ - -static \ - -o boot3-tcc \ - -D BOOTSTRAP=1 \ - -D HAVE_BITFIELD=1 \ - -D HAVE_FLOAT=1 \ - -D HAVE_LONG_LONG=1 \ - -D HAVE_SETJMP=1 \ - -I . \ - -I ${prefix}/include \ - -D TCC_TARGET_I386=1 \ - -D CONFIG_TCCDIR=\"${libdir}/tcc\" \ - -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_LIBPATHS=\"${libdir}:${libdir}/tcc\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${prefix}/include\" \ - -D TCC_LIBGCC=\"${libdir}/libc.a\" \ - -D TCC_LIBTCC1=\"libtcc1.a\" \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - -L . \ - tcc.c -cp boot3-tcc ${bindir} -chmod 755 ${bindir}/boot3-tcc -cd ../${MES_PKG_DIR} -boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c -boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c -boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c -boot3-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c -boot3-tcc -c -D TCC_TARGET_I386=1 ../${TCC_PKG}/lib/libtcc1.c -boot3-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o -boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -boot3-tcc -ar cr ${libdir}/libc.a unified-libc.o -cd ../${TCC_PKG} - -# Test boot3 -boot3-tcc -version - -# boot4 -boot3-tcc \ - -g \ - -v \ - -static \ - -o boot4-tcc \ - -D BOOTSTRAP=1 \ - -D HAVE_BITFIELD=1 \ - -D HAVE_FLOAT=1 \ - -D HAVE_LONG_LONG=1 \ - -D HAVE_SETJMP=1 \ - -I . \ - -I ${prefix}/include \ - -D TCC_TARGET_I386=1 \ - -D CONFIG_TCCDIR=\"${libdir}/tcc\" \ - -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_LIBPATHS=\"${libdir}:${libdir}/tcc\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${prefix}/include\" \ - -D TCC_LIBGCC=\"${libdir}/libc.a\" \ - -D TCC_LIBTCC1=\"libtcc1.a\" \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - -L . \ - tcc.c -cp boot4-tcc ${bindir} -chmod 755 ${bindir}/boot4-tcc -cd ../${MES_PKG_DIR} -boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c -boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c -boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c -boot4-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c -boot4-tcc -c -D TCC_TARGET_I386=1 ../${TCC_PKG}/lib/libtcc1.c -boot4-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o -boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -boot4-tcc -ar cr ${libdir}/libc.a unified-libc.o -cd ../${TCC_PKG} - -# Test boot4 -boot4-tcc -version - -# boot5 -boot4-tcc \ - -g \ - -v \ - -static \ - -o boot5-tcc \ - -D BOOTSTRAP=1 \ - -D HAVE_BITFIELD=1 \ - -D HAVE_FLOAT=1 \ - -D HAVE_LONG_LONG=1 \ - -D HAVE_SETJMP=1 \ - -I . \ - -I ${prefix}/include \ - -D TCC_TARGET_I386=1 \ - -D CONFIG_TCCDIR=\"${libdir}/tcc\" \ - -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_LIBPATHS=\"${libdir}:${libdir}/tcc\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${prefix}/include\" \ - -D TCC_LIBGCC=\"${libdir}/libc.a\" \ - -D TCC_LIBTCC1=\"libtcc1.a\" \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_MES_LIBC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - -L . \ - tcc.c -cp boot5-tcc ${bindir} -chmod 755 ${bindir}/boot5-tcc -cd ../${MES_PKG_DIR} -boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c -boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c -boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crti.o lib/linux/x86-mes-gcc/crti.c -boot5-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c -boot5-tcc -c -D TCC_TARGET_I386=1 ../${TCC_PKG}/lib/libtcc1.c -boot5-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o -boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c -boot5-tcc -ar cr ${libdir}/libc.a unified-libc.o - -# Test boot5 -boot5-tcc -version +tcc-boot2 -version # We have our final tcc 0.9.26! -cp ${bindir}/boot5-tcc ${bindir}/tcc +cp ${bindir}/tcc-boot2 ${bindir}/tcc chmod 755 ${bindir}/tcc +rm ${bindir}/tcc-boot2 cp ${bindir}/tcc ${bindir}/tcc-0.9.26 chmod 755 ${bindir}/tcc-0.9.26 # Also recompile getopt, we don't need to do this during the boot* stages # because nothing is linked against it -tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 lib/posix/getopt.c +cd ../${MES_PKG_DIR} +tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} lib/posix/getopt.c tcc -ar cr ${libdir}/libgetopt.a getopt.o cd ../.. @@ -405,12 +320,9 @@ cd ../.. # Checksums if match x${UPDATE_CHECKSUMS} xTrue; then sha256sum -o ${pkg}.checksums \ - /usr/bin/mes-tcc \ - /usr/bin/boot0-tcc \ - /usr/bin/boot1-tcc \ - /usr/bin/boot2-tcc \ - /usr/bin/boot3-tcc \ - /usr/bin/boot4-tcc \ + /usr/bin/tcc-mes \ + /usr/bin/tcc-boot0 \ + /usr/bin/tcc-boot1 \ /usr/bin/tcc \ /usr/lib/mes/libc.a \ /usr/lib/mes/libgetopt.a \ @@ -421,5 +333,5 @@ if match x${UPDATE_CHECKSUMS} xTrue; then cp ${pkg}.checksums ${srcdir} else - sha256sum -c ${pkg}.checksums + sha256sum -c ${pkg}.${ARCH}.checksums fi diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums b/sysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums new file mode 100644 index 0000000..09d8893 --- /dev/null +++ b/sysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums @@ -0,0 +1,10 @@ +22c74eec2ee1694247fae2958979c2326bab41ecbf5ba279b38417f63bf8892d /usr/bin/tcc-mes +4aff7e61488c03322a682a086405831aa4d99681b2761ddc8b0a76888395a11b /usr/bin/tcc-boot0 +9973b5e730c0b9d65aa0ad2332a51adbb247546478d2e86697bba6de4f2f03fc /usr/bin/tcc-boot1 +5b5b131cc6bb7f62b11bc99092a1e48c2975af00c7d22fb52de5f561dbdc749a /usr/bin/tcc +93fbb5473bfaf2abaf6598a21dd5f0ac3c6237bfa15bc0c85328608233de55bc /usr/lib/mes/libc.a +98e2d2d543a113c82c8de39f32d4d43b1fe7f3159c5956c5e3224e7f4162601f /usr/lib/mes/libgetopt.a +c05ad094fbadc8914806566c4ee512c6deb92b2b8d33325a607c3577826b8a54 /usr/lib/mes/crt1.o +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /usr/lib/mes/crti.o +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /usr/lib/mes/crtn.o +ec63d619a871831066e028e63a5b9e48ceeeffee91d9556bfcc41724d59bd3f8 /usr/lib/mes/tcc/libtcc1.a diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums b/sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums new file mode 100644 index 0000000..be87616 --- /dev/null +++ b/sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums @@ -0,0 +1,10 @@ +df26fbd23970aabf234c4788079a48f12b6ca371edf35108d91b6a48df6123e1 /usr/bin/tcc-mes +bf1740e71fc255b9debb5dc8211ea640c7a7fcf46b20c81657dcfa4fb4de3d07 /usr/bin/tcc-boot0 +627e9263fb7746a0356937d514cf4eb2fb688b36c8a4101a35f62c55e246c3a1 /usr/bin/tcc-boot1 +dca963a46a4b9828bb279201486a90b2f6db8aa6ff2cbb270f2c9838f8af9fdd /usr/bin/tcc +3bfd10dfe347c4fb40fbf5f2f705cd806c77e0f80cf4ad1ecfd4beddada2937c /usr/lib/mes/libc.a +12c07ae103e7e3b390150a79e5c600d88de14e9bb73a066f6342582729ef5a3f /usr/lib/mes/libgetopt.a +76d280e0733f2c84aad180968167d789a825ac56526bddba4f100d6d74851027 /usr/lib/mes/crt1.o +09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /usr/lib/mes/crti.o +461ca1494737fab86fe1c1d3addeaf9d0ece413e353abcdea8674db3f700cda3 /usr/lib/mes/crtn.o +136f97c356445ef95c35ae1b6fb2f7a0546e3cf47b45cb4ee79d0a8f29cd04b4 /usr/lib/mes/tcc/libtcc1.a diff --git a/sysa/tcc-0.9.27/tcc-0.9.27.checksums b/sysa/tcc-0.9.27/tcc-0.9.27.checksums index 70cf870..3610714 100644 --- a/sysa/tcc-0.9.27/tcc-0.9.27.checksums +++ b/sysa/tcc-0.9.27/tcc-0.9.27.checksums @@ -1 +1 @@ -9e510b77307f4d9d97ad56ee58995217aaf0347d3c0f4b03f63da748f6c85d5f /usr/bin/tcc +428251dc2b2de01b9cfe27b3bfd5c8fdc170e442027361e7070f3bc41841a4b7 /usr/bin/tcc