Implement more toolchain fixes

This commit is contained in:
Justine Tunney 2023-06-18 05:39:31 -07:00
parent 0409096658
commit 226375933a
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
35 changed files with 69 additions and 31 deletions

View file

@ -139,6 +139,7 @@ int pipe(int[hasatleast 2]);
int pipe2(int[hasatleast 2], int); int pipe2(int[hasatleast 2], int);
int posix_fadvise(int, int64_t, int64_t, int); int posix_fadvise(int, int64_t, int64_t, int);
int posix_madvise(void *, uint64_t, int); int posix_madvise(void *, uint64_t, int);
int prctl(int, ...);
int raise(int); int raise(int);
int reboot(int); int reboot(int);
int remove(const char *); int remove(const char *);
@ -211,7 +212,6 @@ int memfd_create(const char *, unsigned int);
int personality(uint64_t); int personality(uint64_t);
int pivot_root(const char *, const char *); int pivot_root(const char *, const char *);
int pledge(const char *, const char *); int pledge(const char *, const char *);
int prctl(int, ...);
int seccomp(unsigned, unsigned, void *); int seccomp(unsigned, unsigned, void *);
int sys_iopl(int); int sys_iopl(int);
int sys_mlock(const void *, size_t); int sys_mlock(const void *, size_t);

View file

@ -30,6 +30,7 @@
#include "libc/dce.h" #include "libc/dce.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/kprintf.h" #include "libc/intrin/kprintf.h"
#include "libc/intrin/strace.internal.h" #include "libc/intrin/strace.internal.h"
#include "libc/macros.internal.h" #include "libc/macros.internal.h"

View file

@ -86,9 +86,6 @@ libcesque nosideeffect;
cosmopolitan § conversion » manipulation cosmopolitan § conversion » manipulation
*/ */
char *dirname(char *);
char *basename(char *);
#ifdef COSMO #ifdef COSMO
char *stripext(char *); char *stripext(char *);
char *stripexts(char *); char *stripexts(char *);

11
libc/fmt/libgen.h Normal file
View file

@ -0,0 +1,11 @@
#ifndef COSMOPOLITAN_LIBC_FMT_LIBGEN_H_
#define COSMOPOLITAN_LIBC_FMT_LIBGEN_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
char *dirname(char *);
char *basename(char *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_FMT_LIBGEN_H_ */

View file

@ -89,23 +89,21 @@
#endif #endif
#ifndef __cplusplus #ifndef __cplusplus
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Wc++-compat"
#define HAVE_STDBOOL_H 1 #define HAVE_STDBOOL_H 1
#if __STDC_VERSION__ + 0 >= 201112 #if __STDC_VERSION__ + 0 >= 201112
typedef _Bool bool; typedef _Bool bool;
#define true ((bool)+1)
#define false ((bool)+0)
#else #else
#define bool int #define bool int
#endif
#define true 1 #define true 1
#define false 0 #define false 0
#endif
#endif
#ifndef __cplusplus
typedef __WCHAR_TYPE__ wchar_t; typedef __WCHAR_TYPE__ wchar_t;
typedef __CHAR16_TYPE__ char16_t; typedef __CHAR16_TYPE__ char16_t;
typedef __CHAR32_TYPE__ char32_t; typedef __CHAR32_TYPE__ char32_t;
#endif #pragma GCC pop_options
#endif /* __cplusplus */
#define _LIBCPP_STDINT_H #define _LIBCPP_STDINT_H

View file

@ -396,6 +396,13 @@ privileged static size_t kformat(char *b, size_t n, const char *fmt,
*p++ = 'm'; *p++ = 'm';
ansi = 1; ansi = 1;
} }
#ifdef __x86_64__
} else if (IsLinux()) {
asm volatile("syscall"
: "=a"(x)
: "0"(__NR_getpid)
: "rcx", "rdx", "r11", "memory");
#endif
} else { } else {
x = 666; x = 666;
} }

View file

@ -1,5 +1,4 @@
#ifndef _LIBGEN_H #ifndef _LIBGEN_H
#define _LIBGEN_H #define _LIBGEN_H
#include "libc/fmt/conv.h" #include "libc/fmt/libgen.h"
#endif /* _LIBGEN_H */ #endif /* _LIBGEN_H */

View file

@ -24,7 +24,6 @@ o/$(MODE)/libc: o/$(MODE)/libc/calls \
o/$(MODE)/libc/sock \ o/$(MODE)/libc/sock \
o/$(MODE)/libc/stdio \ o/$(MODE)/libc/stdio \
o/$(MODE)/libc/str \ o/$(MODE)/libc/str \
o/$(MODE)/libc/stubs \
o/$(MODE)/libc/sysv \ o/$(MODE)/libc/sysv \
o/$(MODE)/libc/testlib \ o/$(MODE)/libc/testlib \
o/$(MODE)/libc/thread \ o/$(MODE)/libc/thread \

View file

@ -18,13 +18,13 @@
*/ */
#include "libc/calls/blockcancel.internal.h" #include "libc/calls/blockcancel.internal.h"
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/calls/struct/timeval.h" #include "libc/calls/struct/timeval.h"
#include "libc/dce.h" #include "libc/dce.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/intrin/strace.internal.h" #include "libc/intrin/strace.internal.h"
@ -33,6 +33,7 @@
#include "libc/math.h" #include "libc/math.h"
#include "libc/nexgen32e/nexgen32e.h" #include "libc/nexgen32e/nexgen32e.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/lock.internal.h" #include "libc/stdio/lock.internal.h"
#include "libc/stdio/stdio.h" #include "libc/stdio/stdio.h"
#include "libc/str/str.h" #include "libc/str/str.h"

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/libgen.h"
#include "libc/mem/gc.internal.h" #include "libc/mem/gc.internal.h"
#include "libc/mem/mem.h" #include "libc/mem/mem.h"
#include "libc/x/x.h" #include "libc/x/x.h"

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/libgen.h"
#include "libc/mem/mem.h" #include "libc/mem/mem.h"
#include "libc/x/x.h" #include "libc/x/x.h"

View file

@ -17,8 +17,8 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/log/check.h" #include "libc/log/check.h"
#include "libc/macros.internal.h" #include "libc/macros.internal.h"
#include "libc/mem/gc.internal.h" #include "libc/mem/gc.internal.h"

View file

@ -16,10 +16,10 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/fmt/conv.h"
#include "libc/mem/mem.h"
#include "libc/mem/gc.internal.h" #include "libc/mem/gc.internal.h"
#include "libc/mem/mem.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#define BASENAME(x) basename(gc(strdup(x))) #define BASENAME(x) basename(gc(strdup(x)))

View file

@ -16,11 +16,9 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/libgen.h"
#include "libc/fmt/fmt.h"
#include "libc/log/log.h"
#include "libc/mem/mem.h"
#include "libc/mem/gc.internal.h" #include "libc/mem/gc.internal.h"
#include "libc/mem/mem.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
TEST(dirname, test) { TEST(dirname, test) {

View file

@ -18,6 +18,7 @@
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/mem/gc.internal.h" #include "libc/mem/gc.internal.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#include "libc/x/x.h" #include "libc/x/x.h"

View file

@ -1,12 +1,13 @@
#include "third_party/chibicc/chibicc.h"
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/sigaction.h" #include "libc/calls/struct/sigaction.h"
#include "libc/calls/struct/siginfo.h" #include "libc/calls/struct/siginfo.h"
#include "libc/calls/ucontext.h" #include "libc/calls/ucontext.h"
#include "libc/fmt/libgen.h"
#include "libc/mem/gc.internal.h" #include "libc/mem/gc.internal.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/sysv/consts/sig.h" #include "libc/sysv/consts/sig.h"
#include "libc/x/xasprintf.h" #include "libc/x/xasprintf.h"
#include "third_party/chibicc/chibicc.h"
asm(".ident\t\"\\n\\n\ asm(".ident\t\"\\n\\n\
chibicc (MIT/ISC License)\\n\ chibicc (MIT/ISC License)\\n\

View file

@ -22,6 +22,7 @@
// standard's wording: // standard's wording:
// https://github.com/rui314/chibicc/wiki/cpp.algo.pdf // https://github.com/rui314/chibicc/wiki/cpp.algo.pdf
#include "libc/fmt/libgen.h"
#include "libc/log/libfatal.internal.h" #include "libc/log/libfatal.internal.h"
#include "libc/mem/arena.h" #include "libc/mem/arena.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"

View file

@ -17,6 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/log/libfatal.internal.h" #include "libc/log/libfatal.internal.h"
#include "libc/mem/gc.h" #include "libc/mem/gc.h"

View file

@ -37,6 +37,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h" #include "libc/fmt/itoa.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/promises.internal.h" #include "libc/intrin/promises.internal.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"

View file

@ -4,10 +4,12 @@
Python 3 Python 3
https://docs.python.org/3/license.html │ https://docs.python.org/3/license.html │
*/ */
#include "third_party/python/Include/import.h"
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/calls/struct/stat.macros.h" #include "libc/calls/struct/stat.macros.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/macros.internal.h" #include "libc/macros.internal.h"
#include "libc/mem/alg.h" #include "libc/mem/alg.h"
@ -27,7 +29,6 @@
#include "third_party/python/Include/eval.h" #include "third_party/python/Include/eval.h"
#include "third_party/python/Include/fileutils.h" #include "third_party/python/Include/fileutils.h"
#include "third_party/python/Include/frameobject.h" #include "third_party/python/Include/frameobject.h"
#include "third_party/python/Include/import.h"
#include "third_party/python/Include/listobject.h" #include "third_party/python/Include/listobject.h"
#include "third_party/python/Include/longobject.h" #include "third_party/python/Include/longobject.h"
#include "third_party/python/Include/marshal.h" #include "third_party/python/Include/marshal.h"

View file

@ -35,6 +35,7 @@
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/log/bsd.h" #include "libc/log/bsd.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h" #include "libc/stdio/stdio.h"

View file

@ -25,6 +25,7 @@
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/itoa.h" #include "libc/fmt/itoa.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/log/check.h" #include "libc/log/check.h"

View file

@ -32,6 +32,7 @@
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/itoa.h" #include "libc/fmt/itoa.h"
#include "libc/fmt/libgen.h"
#include "libc/fmt/magnumstrs.internal.h" #include "libc/fmt/magnumstrs.internal.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/kprintf.h" #include "libc/intrin/kprintf.h"

View file

@ -22,6 +22,7 @@
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/fmt/magnumstrs.internal.h" #include "libc/fmt/magnumstrs.internal.h"
#include "libc/mem/gc.h" #include "libc/mem/gc.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"

View file

@ -21,6 +21,7 @@
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h" #include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/fmt/magnumstrs.internal.h" #include "libc/fmt/magnumstrs.internal.h"
#include "libc/mem/gc.h" #include "libc/mem/gc.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"

View file

@ -25,6 +25,7 @@
#include "libc/dns/dns.h" #include "libc/dns/dns.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/limits.h" #include "libc/limits.h"

View file

@ -23,6 +23,7 @@
#include "libc/dce.h" #include "libc/dce.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/log/check.h" #include "libc/log/check.h"
#include "libc/log/log.h" #include "libc/log/log.h"

View file

@ -20,6 +20,7 @@
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/elf/def.h" #include "libc/elf/def.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/kprintf.h" #include "libc/intrin/kprintf.h"
#include "libc/limits.h" #include "libc/limits.h"
#include "libc/log/check.h" #include "libc/log/check.h"

View file

@ -24,6 +24,7 @@
#include "libc/elf/struct/shdr.h" #include "libc/elf/struct/shdr.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/log/check.h" #include "libc/log/check.h"

View file

@ -20,6 +20,7 @@
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/macho.internal.h" #include "libc/macho.internal.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"

View file

@ -19,6 +19,7 @@
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/mem/gc.h" #include "libc/mem/gc.h"

View file

@ -19,6 +19,7 @@
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h" #include "libc/calls/struct/stat.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h" #include "libc/intrin/bits.h"
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/log/check.h" #include "libc/log/check.h"

View file

@ -67,6 +67,7 @@ EOF
exit 0 exit 0
fi fi
ORIGINAL="$0 $*"
PLATFORM="-D__COSMOPOLITAN__" PLATFORM="-D__COSMOPOLITAN__"
PREDEF="-include libc/integral/normalize.inc" PREDEF="-include libc/integral/normalize.inc"
CCFLAGS="-fdata-sections -ffunction-sections -fno-pie -mno-tls-direct-seg-refs -mno-red-zone -fportcosmo" CCFLAGS="-fdata-sections -ffunction-sections -fno-pie -mno-tls-direct-seg-refs -mno-red-zone -fportcosmo"
@ -131,6 +132,10 @@ for x; do
# this toolchain is intended for building other people's code # this toolchain is intended for building other people's code
# we don't need the compiler's assistance to be more portable # we don't need the compiler's assistance to be more portable
continue continue
elif [ x"$x" = x"-static-libstdc++" ]; then
continue
elif [ x"$x" = x"-static-libgcc" ]; then
continue
elif [ x"$x" != x"${x#-O}" ]; then elif [ x"$x" != x"${x#-O}" ]; then
OPT=$x OPT=$x
elif [ x"$x" = x"-c" ]; then elif [ x"$x" = x"-c" ]; then
@ -160,8 +165,8 @@ for x; do
set -- "$@" "$x" set -- "$@" "$x"
done done
if [ $RELOCATABLE -eq 0 ]; then if [ $RELOCATABLE -eq 1 ]; then
APEFLAGS= APEFLAGS="-r"
fi fi
if [ x"$MODE" = x"nox87" ]; then if [ x"$MODE" = x"nox87" ]; then
@ -183,7 +188,7 @@ else
fi fi
set -- "$CXX" "$@" set -- "$CXX" "$@"
printf '(cd %s; %s)\n' "$PWD" "$*" >>/tmp/build.log printf '# %s\n(cd %s; %s)\n' "$ORIGINAL" "$PWD" "$*" >>/tmp/build.log
"$@" || exit "$@" || exit
if [ -n "$OUTPUT" ] && [ -f "$OUTPUT" ]; then if [ -n "$OUTPUT" ] && [ -f "$OUTPUT" ]; then

View file

@ -67,6 +67,7 @@ EOF
exit 0 exit 0
fi fi
ORIGINAL="$0 $*"
PLATFORM="-D__COSMOPOLITAN__" PLATFORM="-D__COSMOPOLITAN__"
PREDEF="-include libc/integral/normalize.inc" PREDEF="-include libc/integral/normalize.inc"
CCFLAGS="-fdata-sections -ffunction-sections -fno-pie -mno-tls-direct-seg-refs -mno-red-zone -fportcosmo" CCFLAGS="-fdata-sections -ffunction-sections -fno-pie -mno-tls-direct-seg-refs -mno-red-zone -fportcosmo"
@ -131,6 +132,8 @@ for x; do
# this toolchain is intended for building other people's code # this toolchain is intended for building other people's code
# we don't need the compiler's assistance to be more portable # we don't need the compiler's assistance to be more portable
continue continue
elif [ x"$x" = x"-static-libgcc" ]; then
continue
elif [ x"$x" != x"${x#-O}" ]; then elif [ x"$x" != x"${x#-O}" ]; then
OPT=$x OPT=$x
elif [ x"$x" = x"-c" ]; then elif [ x"$x" = x"-c" ]; then
@ -161,7 +164,7 @@ for x; do
done done
if [ $RELOCATABLE -eq 1 ]; then if [ $RELOCATABLE -eq 1 ]; then
APEFLAGS= APEFLAGS="-r"
fi fi
if [ x"$MODE" = x"nox87" ]; then if [ x"$MODE" = x"nox87" ]; then
@ -183,7 +186,7 @@ else
fi fi
set -- "$CC" "$@" set -- "$CC" "$@"
printf '(cd %s; %s)\n' "$PWD" "$*" >>/tmp/build.log printf '# %s\n(cd %s; %s)\n' "$ORIGINAL" "$PWD" "$*" >>/tmp/build.log
"$@" || exit "$@" || exit
if [ -n "$OUTPUT" ] && [ -f "$OUTPUT" ]; then if [ -n "$OUTPUT" ] && [ -f "$OUTPUT" ]; then

View file

@ -21,6 +21,7 @@
#include "libc/calls/struct/winsize.h" #include "libc/calls/struct/winsize.h"
#include "libc/calls/termios.h" #include "libc/calls/termios.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bsr.h" #include "libc/intrin/bsr.h"
#include "libc/log/libfatal.internal.h" #include "libc/log/libfatal.internal.h"
#include "libc/log/log.h" #include "libc/log/log.h"