changes made for cosmocc builds

these changes are from attempting builds via

https://github.com/ahgamut/superconfigure

- I had submitted a previous PR where I had removed msg.h from
  sys/socket.h, turns out OpenSSL needs msg.h in sys/socket.h
- libc/thread/semaphore.h uses booleans, so including stdbool.h
- the ifdef around axdx_t is from the gcc build system including CFLAGS
  twice (when building with the intermediate xgcc)
- specifying ARCH=x86_64 in cosmocc when building with the host toolchain
This commit is contained in:
Gautham 2023-08-19 10:33:23 -05:00
parent 820c3599ed
commit d1efd5fdef
7 changed files with 17 additions and 1 deletions

View file

@ -182,7 +182,7 @@ fi
if [ "$1" = "--update" ]; then if [ "$1" = "--update" ]; then
cd $COSMO || exit cd $COSMO || exit
echo "building cosmo host toolchain..." >&2 echo "building cosmo host toolchain..." >&2
make --silent -j toolchain MODE= || exit make --silent -j toolchain MODE= ARCH=x86_64 || exit
echo "building cosmo target (MODE=$MODE) toolchain..." >&2 echo "building cosmo target (MODE=$MODE) toolchain..." >&2
make --silent -j toolchain MODE="$MODE" || exit make --silent -j toolchain MODE="$MODE" || exit
echo "setting up your cosmos..." >&2 echo "setting up your cosmos..." >&2

View file

@ -138,9 +138,14 @@ typedef signed __int128 int128_t;
typedef unsigned __int128 uint128_t; typedef unsigned __int128 uint128_t;
#endif #endif
#endif /* _COSMO_SOURCE */ #endif /* _COSMO_SOURCE */
#ifndef __AXDX_T
#define __AXDX_T
typedef struct { typedef struct {
intptr_t ax, dx; intptr_t ax, dx;
} axdx_t; } axdx_t;
#endif
#ifndef __chibicc__ #ifndef __chibicc__
#define va_list __builtin_va_list #define va_list __builtin_va_list

0
libc/isystem/sys/cdefs.h Normal file
View file

View file

@ -8,6 +8,7 @@
#include "libc/sock/struct/sockaddr.h" #include "libc/sock/struct/sockaddr.h"
#include "libc/sysv/consts/af.h" #include "libc/sysv/consts/af.h"
#include "libc/sysv/consts/limits.h" #include "libc/sysv/consts/limits.h"
#include "libc/sysv/consts/msg.h"
#include "libc/sysv/consts/pf.h" #include "libc/sysv/consts/pf.h"
#include "libc/sysv/consts/scm.h" #include "libc/sysv/consts/scm.h"
#include "libc/sysv/consts/shut.h" #include "libc/sysv/consts/shut.h"

4
libc/isystem/ucontext.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef _UCONTEXT_H
#define _UCONTEXT_H
#include "libc/calls/ucontext.h"
#endif

View file

@ -13,4 +13,9 @@
#include "third_party/getopt/long1.h" #include "third_party/getopt/long1.h"
#include "third_party/musl/crypt.h" #include "third_party/musl/crypt.h"
#include "third_party/musl/lockf.h" #include "third_party/musl/lockf.h"
#ifndef _CS_PATH
#define _CS_PATH 0
#endif
#endif /* _UNISTD_H */ #endif /* _UNISTD_H */

View file

@ -1,6 +1,7 @@
#ifndef COSMOPOLITAN_LIBC_CALLS_SEMAPHORE_H_ #ifndef COSMOPOLITAN_LIBC_CALLS_SEMAPHORE_H_
#define COSMOPOLITAN_LIBC_CALLS_SEMAPHORE_H_ #define COSMOPOLITAN_LIBC_CALLS_SEMAPHORE_H_
#include "libc/calls/struct/timespec.h" #include "libc/calls/struct/timespec.h"
#include "libc/stdbool.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0) #if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_ COSMOPOLITAN_C_START_