From 95124cacbef5bc178f056ed130a3285fba40aeca Mon Sep 17 00:00:00 2001 From: Gautham <41098605+ahgamut@users.noreply.github.com> Date: Sun, 12 Nov 2023 00:11:11 -0600 Subject: [PATCH] Fixes for building superconfigure (#948) --- libc/isystem/cxxabi.h | 0 libc/isystem/future | 4 ++++ libc/libc.mk | 2 ++ tool/cosmocc/bin/cosmocross | 7 ++++++- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 libc/isystem/cxxabi.h create mode 100644 libc/isystem/future diff --git a/libc/isystem/cxxabi.h b/libc/isystem/cxxabi.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libc/isystem/future b/libc/isystem/future new file mode 100644 index 00000000000..7f8f9afa0f4 --- /dev/null +++ b/libc/isystem/future @@ -0,0 +1,4 @@ +#ifndef COSMOPOLITAN_LIBC_ISYSTEM_FUTURE_ +#define COSMOPOLITAN_LIBC_ISYSTEM_FUTURE_ +#include "third_party/libcxx/future" +#endif /* COSMOPOLITAN_LIBC_ISYSTEM_FUTURE_ */ diff --git a/libc/libc.mk b/libc/libc.mk index 15bfc4e7f13..e28e59a3bf0 100644 --- a/libc/libc.mk +++ b/libc/libc.mk @@ -57,6 +57,7 @@ libc/isystem/ctime \ libc/isystem/ctype.h \ libc/isystem/cwchar \ libc/isystem/cwctype \ +libc/isystem/cxxabi.h \ libc/isystem/deque \ libc/isystem/dirent.h \ libc/isystem/dlfcn.h \ @@ -77,6 +78,7 @@ libc/isystem/forward_list \ libc/isystem/fstream \ libc/isystem/ftw.h \ libc/isystem/functional \ +libc/isystem/future \ libc/isystem/getopt.h \ libc/isystem/glob.h \ libc/isystem/grp.h \ diff --git a/tool/cosmocc/bin/cosmocross b/tool/cosmocc/bin/cosmocross index 5e61985bb17..01e088389ae 100755 --- a/tool/cosmocc/bin/cosmocross +++ b/tool/cosmocc/bin/cosmocross @@ -63,7 +63,12 @@ fi CC="$BIN/$ARCH-linux-cosmo-gcc" CRT="$BIN/../$ARCH-linux-cosmo/lib/crt.o" LDLIBS="-lcosmo" -LDFLAGS="$LDFLAGS -L$BIN/../$ARCH-linux-cosmo/lib" +if [ -z "$COSMOS" ]; then + LDFLAGS="$LDFLAGS -L$BIN/../$ARCH-linux-cosmo/lib" +else + LDFLAGS="$LDFLAGS -L$COSMOS/lib -L$BIN/../$ARCH-linux-cosmo/lib" + CPPFLAGS="$CPPFLAGS -I$COSMOS/include" +fi if [ x"$PROG" != x"${PROG%++}" ]; then CC="$BIN/$ARCH-linux-cosmo-g++" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -fuse-cxa-atexit"