Merge remote-tracking branch 'origin/master' into coff - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 8bf178a38c08e806575890b7d97173b996b77d64
 (DIR) parent 0b5f87dcd9ac36f700c7718168e6378e90cb95fe
 (HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
       Date:   Fri, 15 Mar 2024 13:36:14 +0100
       
       Merge remote-tracking branch 'origin/master' into coff
       
       Diffstat:
         A include/bits/linux/arm64/arch/intt… |     181 +++++++++++++++++++++++++++++++
         A include/bits/linux/arm64/arch/siga… |      10 ++++++++++
         M scripts/arm64.mk                    |       6 +++---
         M src/libc/arch/arm64/linux/Makefile  |       2 +-
       
       4 files changed, 195 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/include/bits/linux/arm64/arch/inttypes.h b/include/bits/linux/arm64/arch/inttypes.h
       @@ -0,0 +1,181 @@
       +#define PRId8 "hhd"
       +#define PRIi8 "hhi"
       +#define PRIo8 "hho"
       +#define PRIu8 "hhu"
       +#define PRIx8 "hhx"
       +#define PRIX8 "hhX"
       +
       +#define PRId16 "hd"
       +#define PRIi16 "hi"
       +#define PRIo16 "ho"
       +#define PRIu16 "hu"
       +#define PRIx16 "hx"
       +#define PRIX16 "hX"
       +
       +#define PRId32 "d"
       +#define PRIi32 "i"
       +#define PRIo32 "o"
       +#define PRIu32 "u"
       +#define PRIx32 "x"
       +#define PRIX32 "X"
       +
       +#define PRId64 "ld"
       +#define PRIi64 "li"
       +#define PRIo64 "lo"
       +#define PRIu64 "lu"
       +#define PRIx64 "lx"
       +#define PRIX64 "lX"
       +
       +#define PRIdLEAST8 "hhd"
       +#define PRIiLEAST8 "hhi"
       +#define PRIoLEAST8 "hho"
       +#define PRIuLEAST8 "hhu"
       +#define PRIxLEAST8 "hhx"
       +#define PRIXLEAST8 "hhX"
       +
       +#define PRIdLEAST16 "hd"
       +#define PRIiLEAST16 "hi"
       +#define PRIoLEAST16 "ho"
       +#define PRIuLEAST16 "hu"
       +#define PRIxLEAST16 "hx"
       +#define PRIXLEAST16 "hX"
       +
       +#define PRIdLEAST32 "d"
       +#define PRIiLEAST32 "i"
       +#define PRIoLEAST32 "o"
       +#define PRIuLEAST32 "u"
       +#define PRIxLEAST32 "x"
       +#define PRIXLEAST32 "X"
       +
       +#define PRIdLEAST64 "ld"
       +#define PRIiLEAST64 "li"
       +#define PRIoLEAST64 "lo"
       +#define PRIuLEAST64 "lu"
       +#define PRIxLEAST64 "lx"
       +#define PRIXLEAST64 "lX"
       +
       +#define PRIdFAST8 "hhd"
       +#define PRIiFAST8 "hhi"
       +#define PRIoFAST8 "hho"
       +#define PRIuFAST8 "hhu"
       +#define PRIxFAST8 "hhx"
       +#define PRIXFAST8 "hhX"
       +
       +#define PRIdFAST16 "d"
       +#define PRIiFAST16 "i"
       +#define PRIoFAST16 "o"
       +#define PRIuFAST16 "u"
       +#define PRIxFAST16 "x"
       +#define PRIXFAST16 "X"
       +
       +#define PRIdFAST32 "d"
       +#define PRIiFAST32 "i"
       +#define PRIoFAST32 "o"
       +#define PRIuFAST32 "u"
       +#define PRIxFAST32 "x"
       +#define PRIXFAST32 "X"
       +
       +#define PRIdFAST64 "ld"
       +#define PRIiFAST64 "li"
       +#define PRIoFAST64 "lo"
       +#define PRIuFAST64 "lu"
       +#define PRIxFAST64 "lx"
       +#define PRIXFAST64 "lX"
       +
       +#define PRIdPTR "ld"
       +#define PRIiPTR "li"
       +#define PRIoPTR "lo"
       +#define PRIuPTR "lu"
       +#define PRIxPTR "lx"
       +#define PRIXPTR "lX"
       +
       +#define PRIdMAX "ld"
       +#define PRIiMAX "li"
       +#define PRIoMAX "lo"
       +#define PRIuMAX "lu"
       +#define PRIxMAX "lx"
       +#define PRIXMAX "lX"
       +
       +#define SCNd8 "hhd"
       +#define SCNi8 "hhi"
       +#define SCNo8 "hho"
       +#define SCNu8 "hhu"
       +#define SCNx8 "hhx"
       +
       +#define SCNd16 "hd"
       +#define SCNi16 "hi"
       +#define SCNo16 "ho"
       +#define SCNu16 "hu"
       +#define SCNx16 "hx"
       +
       +#define SCNd32 "d"
       +#define SCNi32 "i"
       +#define SCNo32 "o"
       +#define SCNu32 "u"
       +#define SCNx32 "x"
       +
       +#define SCNd64 "ld"
       +#define SCNi64 "li"
       +#define SCNo64 "lo"
       +#define SCNu64 "lu"
       +#define SCNx64 "lx"
       +
       +#define SCNdLEAST8 "hhd"
       +#define SCNiLEAST8 "hhi"
       +#define SCNoLEAST8 "hho"
       +#define SCNuLEAST8 "hhu"
       +#define SCNxLEAST8 "hhx"
       +
       +#define SCNdLEAST16 "hd"
       +#define SCNiLEAST16 "hi"
       +#define SCNoLEAST16 "ho"
       +#define SCNuLEAST16 "hu"
       +#define SCNxLEAST16 "hx"
       +
       +#define SCNdLEAST32 "d"
       +#define SCNiLEAST32 "i"
       +#define SCNoLEAST32 "o"
       +#define SCNuLEAST32 "u"
       +#define SCNxLEAST32 "x"
       +
       +#define SCNdLEAST64 "ld"
       +#define SCNiLEAST64 "li"
       +#define SCNoLEAST64 "lo"
       +#define SCNuLEAST64 "lu"
       +#define SCNxLEAST64 "lx"
       +
       +#define SCNdFAST8 "hhd"
       +#define SCNiFAST8 "hhi"
       +#define SCNoFAST8 "hho"
       +#define SCNuFAST8 "hhu"
       +#define SCNxFAST8 "hhx"
       +
       +#define SCNdFAST16 "d"
       +#define SCNiFAST16 "i"
       +#define SCNoFAST16 "o"
       +#define SCNuFAST16 "u"
       +#define SCNxFAST16 "x"
       +
       +#define SCNdFAST32 "d"
       +#define SCNiFAST32 "i"
       +#define SCNoFAST32 "o"
       +#define SCNuFAST32 "u"
       +#define SCNxFAST32 "x"
       +
       +#define SCNdFAST64 "ld"
       +#define SCNiFAST64 "li"
       +#define SCNoFAST64 "lo"
       +#define SCNuFAST64 "lu"
       +#define SCNxFAST64 "lx"
       +
       +#define SCNdPTR "ld"
       +#define SCNiPTR "li"
       +#define SCNoPTR "lo"
       +#define SCNuPTR "lu"
       +#define SCNxPTR "lx"
       +
       +#define SCNdMAX "ld"
       +#define SCNiMAX "li"
       +#define SCNoMAX "lo"
       +#define SCNuMAX "lu"
       +#define SCNxMAX "lx"
 (DIR) diff --git a/include/bits/linux/arm64/arch/sigaction.h b/include/bits/linux/arm64/arch/sigaction.h
       @@ -0,0 +1,10 @@
       +#define SA_RESTORER   0x04000000
       +
       +struct sigaction {
       +        void (*sa_handler)(int);
       +        unsigned long sa_flags;
       +        void (*sa_restorer)(void);
       +        unsigned sa_mask[2];
       +};
       +
       +extern int __sigaction(int, struct sigaction *, struct sigaction *, size_t);
 (DIR) diff --git a/scripts/arm64.mk b/scripts/arm64.mk
       @@ -1,8 +1,8 @@
       -arm64:
       +aarch64 arm64:
                +@$(MAKE) `$(SCRIPTDIR)/config` CONF=arm64-linux libc libcrt
        
       -install-arm64: arm64
       +install-arm64 install-aarch64: arm64
                $(SCRIPTDIR)/install -p $(SCRIPTDIR)/proto.arm64 $(ROOT)
        
       -uninstall-arm64:
       +uninstall-arm64 uninstall-arm64:
                $(SCRIPTDIR)/uninstall -p $(SCRIPTDIR)/proto.arm64 $(ROOT)
 (DIR) diff --git a/src/libc/arch/arm64/linux/Makefile b/src/libc/arch/arm64/linux/Makefile
       @@ -14,7 +14,7 @@ GENOBJS =\
                _lseek.$O\
                _openat.$O\
                _read.$O\
       -        _sigaction.$O\
       +        __sigaction.$O\
                _sys_brk.$O\
                _write.$O\
                _wait4.$O\