Get codebase completely working with LLVM

You can now build Cosmopolitan with Clang:

    make -j8 MODE=llvm
    o/llvm/examples/hello.com

The assembler and linker code is now friendly to LLVM too.
So it's not needed to configure Clang to use binutils under
the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
Justine Tunney 2021-02-08 09:19:00 -08:00
parent 0e36cb3ac4
commit e75ffde09e
4528 changed files with 7776 additions and 11640 deletions

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_aclcheck_fd 0xffffff162fffffff globl
.scall __acl_aclcheck_fd,0xffffff162fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_aclcheck_file 0xffffff161fffffff globl
.scall __acl_aclcheck_file,0xffffff161fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_aclcheck_link 0xffffff1acfffffff globl
.scall __acl_aclcheck_link,0xffffff1acfffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_delete_fd 0xffffff160fffffff globl
.scall __acl_delete_fd,0xffffff160fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_delete_file 0xffffff15ffffffff globl
.scall __acl_delete_file,0xffffff15ffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_delete_link 0xffffff1abfffffff globl
.scall __acl_delete_link,0xffffff1abfffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_get_fd 0xffffff15dfffffff globl
.scall __acl_get_fd,0xffffff15dfffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_get_file 0xffffff15bfffffff globl
.scall __acl_get_file,0xffffff15bfffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_get_link 0xffffff1a9fffffff globl
.scall __acl_get_link,0xffffff1a9fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_set_fd 0xffffff15efffffff globl
.scall __acl_set_fd,0xffffff15efffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_set_file 0xffffff15cfffffff globl
.scall __acl_set_file,0xffffff15cfffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __acl_set_link 0xffffff1aafffffff globl
.scall __acl_set_link,0xffffff1aafffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __bsd_setegid 0xfff0b60b620b6fff globl hidden
.scall __bsd_setegid,0xfff0b60b620b6fff,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __bsd_seteuid 0xfff0b70b720b7fff globl hidden
.scall __bsd_seteuid,0xfff0b70b720b7fff,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __cap_rights_get 0xffffff203fffffff globl
.scall __cap_rights_get,0xffffff203fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __disable_threadsignal 0xfffffffff214bfff globl
.scall __disable_threadsignal,0xfffffffff214bfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __get_tcb 0xfff14affffffffff globl
.scall __get_tcb,0xfff14affffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_execve 0xffffff19f217cfff globl
.scall __mac_execve,0xffffff19f217cfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_get_fd 0xffffff1822184fff globl
.scall __mac_get_fd,0xffffff1822184fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_get_file 0xffffff183217efff globl
.scall __mac_get_file,0xffffff183217efff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_get_link 0xffffff19a2180fff globl
.scall __mac_get_link,0xffffff19a2180fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_get_mount 0xfffffffff21a9fff globl
.scall __mac_get_mount,0xfffffffff21a9fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_get_pid 0xffffff1992186fff globl
.scall __mac_get_pid,0xffffff1992186fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_get_proc 0xffffff1802182fff globl
.scall __mac_get_proc,0xffffff1802182fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_getfsstat 0xfffffffff21aafff globl
.scall __mac_getfsstat,0xfffffffff21aafff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_mount 0xfffffffff21a8fff globl
.scall __mac_mount,0xfffffffff21a8fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_set_fd 0xffffff1842185fff globl
.scall __mac_set_fd,0xffffff1842185fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_set_file 0xffffff185217ffff globl
.scall __mac_set_file,0xffffff185217ffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_set_link 0xffffff19b2181fff globl
.scall __mac_set_link,0xffffff19b2181fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_set_proc 0xffffff1812183fff globl
.scall __mac_set_proc,0xffffff1812183fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __mac_syscall 0xfffffffff217dfff globl
.scall __mac_syscall,0xfffffffff217dfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __old_semwait_signal 0xfffffffff2172fff globl
.scall __old_semwait_signal,0xfffffffff2172fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __old_semwait_signal_nocancel 0xfffffffff2173fff globl
.scall __old_semwait_signal_nocancel,0xfffffffff2173fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __pthread_canceled 0xfffffffff214dfff globl
.scall __pthread_canceled,0xfffffffff214dfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __pthread_chdir 0xfffffffff215cfff globl
.scall __pthread_chdir,0xfffffffff215cfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __pthread_fchdir 0xfffffffff215dfff globl
.scall __pthread_fchdir,0xfffffffff215dfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __pthread_kill 0xfffffffff2148fff globl
.scall __pthread_kill,0xfffffffff2148fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __pthread_markcancel 0xfffffffff214cfff globl
.scall __pthread_markcancel,0xfffffffff214cfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __pthread_sigmask 0xfffffffff2149fff globl
.scall __pthread_sigmask,0xfffffffff2149fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __semwait_signal 0xfffffffff214efff globl
.scall __semwait_signal,0xfffffffff214efff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __semwait_signal_nocancel 0xfffffffff21a7fff globl
.scall __semwait_signal_nocancel,0xfffffffff21a7fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __set_tcb 0xfff149ffffffffff globl
.scall __set_tcb,0xfff149ffffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __setugid 0xffffff176fffffff globl
.scall __setugid,0xffffff176fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sigwait_nocancel 0xfffffffff21a6fff globl
.scall __sigwait_nocancel,0xfffffffff21a6fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_accept 0x01e01e21d201e02b globl hidden
.scall __sys_accept,0x01e01e21d201e02b,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_accept4 0xfff05d21dffff120 globl hidden
.scall __sys_accept4,0xfff05d21dffff120,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_connect 0x062062062206202a globl hidden
.scall __sys_connect,0x062062062206202a,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_dup3 0x1c6066fffffff124 globl hidden
.scall __sys_dup3,0x1c6066fffffff124,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_execve 0x03b03b03b203b03b globl hidden
.scall __sys_execve,0x03b03b03b203b03b,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_fstat 0x1b80352272153005 globl hidden
.scall __sys_fstat,0x1b80352272153005,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_fstatat 0x1d202a22821d6106 globl hidden
.scall __sys_fstatat,0x1d202a22821d6106,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_getpeername 0x01f01f08d201f034 globl hidden
.scall __sys_getpeername,0x01f01f08d201f034,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_getsockname 0x0200200202020033 globl hidden
.scall __sys_getsockname,0x0200200202020033,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_lstat 0x1b90280282154006 globl hidden
.scall __sys_lstat,0x1b90280282154006,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_pipe 0x02a10721e202a016 globl hidden
.scall __sys_pipe,0x02a10721e202a016,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_pipe2 0x1c506521effff125 globl hidden
.scall __sys_pipe2,0x1c506521effff125,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_socket 0x18a0610612061029 globl hidden
.scall __sys_socket,0x18a0610612061029,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_stat 0x1b7026fff2152004 globl hidden
.scall __sys_stat,0x1b7026fff2152004,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sys_utimensat 0x1d3054223ffff118 globl hidden
.scall __sys_utimensat,0x1d3054223ffff118,globl,hidden

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __syscall 0xfff0c6ffffffffff globl
.scall __syscall,0xfff0c6ffffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __sysctl 0xffffff0cafffffff globl
.scall __sysctl,0xffffff0cafffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __tfork 0xfff008ffffffffff globl
.scall __tfork,0xfff008ffffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __threxit 0xfff12effffffffff globl
.scall __threxit,0xfff12effffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __thrsigdivert 0xfff12fffffffffff globl
.scall __thrsigdivert,0xfff12fffffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __thrsleep 0xfff05effffffffff globl
.scall __thrsleep,0xfff05effffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall __thrwakeup 0xfff12dffffffffff globl
.scall __thrwakeup,0xfff12dffffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall _sysctl 0xfffffffffffff09c globl
.scall _sysctl,0xfffffffffffff09c,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall _umtx_op 0xffffff1c6fffffff globl
.scall _umtx_op,0xffffff1c6fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall abort2 0xffffff1cffffffff globl
.scall abort2,0xffffff1cffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall abort_with_payload 0xfffffffff2209fff globl
.scall abort_with_payload,0xfffffffff2209fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall accept_nocancel 0xfffffffff2194fff globl
.scall accept_nocancel,0xfffffffff2194fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall access_extended 0xfffffffff211cfff globl
.scall access_extended,0xfffffffff211cfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall acct 0x03303303320330a3 globl
.scall acct,0x03303303320330a3,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall add_key 0xfffffffffffff0f8 globl
.scall add_key,0xfffffffffffff0f8,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall adjfreq 0xfff131ffffffffff globl
.scall adjfreq,0xfff131ffffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall adjtime 0x1a508c08c208cfff globl
.scall adjtime,0x1a508c08c208cfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall adjtimex 0xfffffffffffff09f globl
.scall adjtimex,0xfffffffffffff09f,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall afs3_syscall 0xffffff179fffffff globl
.scall afs3_syscall,0xffffff179fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_cancel 0x18ffff13c213cfff globl
.scall aio_cancel,0x18ffff13c213cfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_error 0x190fff13d213dfff globl
.scall aio_error,0x190fff13d213dfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_fsync 0x191fff1d12139fff globl
.scall aio_fsync,0x191fff1d12139fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_mlock 0xffffff21ffffffff globl
.scall aio_mlock,0xffffff21ffffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_read 0x192fff13e213efff globl
.scall aio_read,0x192fff13e213efff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_return 0x193fff13a213afff globl
.scall aio_return,0x193fff13a213afff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_suspend 0x1b6fff13b213bfff globl
.scall aio_suspend,0x1b6fff13b213bfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_suspend_nocancel 0xfffffffff21a5fff globl
.scall aio_suspend_nocancel,0xfffffffff21a5fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_waitcomplete 0xffffff167fffffff globl
.scall aio_waitcomplete,0xffffff167fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall aio_write 0x195fff13f213ffff globl
.scall aio_write,0x195fff13f213ffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall audit 0xffffff1bd215efff globl
.scall audit,0xffffff1bd215efff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall audit_session_join 0xfffffffff21adfff globl
.scall audit_session_join,0xfffffffff21adfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall audit_session_port 0xfffffffff21b0fff globl
.scall audit_session_port,0xfffffffff21b0fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall audit_session_self 0xfffffffff21acfff globl
.scall audit_session_self,0xfffffffff21acfff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall auditctl 0xffffff1c52167fff globl
.scall auditctl,0xffffff1c52167fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall auditon 0xffffff1be215ffff globl
.scall auditon,0xffffff1be215ffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall bindat 0xffffff21afffffff globl
.scall bindat,0xffffff21afffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall bpf 0xfffffffffffff141 globl
.scall bpf,0xfffffffffffff141,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall break 0xffffff011fffffff globl
.scall break,0xffffff011fffffff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall bsdthread_create 0xfffffffff2168fff globl
.scall bsdthread_create,0xfffffffff2168fff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall bsdthread_ctl 0xfffffffff21defff globl
.scall bsdthread_ctl,0xfffffffff21defff,globl

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall bsdthread_register 0xfffffffff216efff globl
.scall bsdthread_register,0xfffffffff216efff,globl

Some files were not shown because too many files have changed in this diff Show more