Get llama.com building as an aarch64 native binary

This commit is contained in:
Justine Tunney 2023-05-09 12:14:57 -07:00
parent d04430f4ef
commit 4c093155a3
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
40 changed files with 7842 additions and 11683 deletions

View file

@ -26,6 +26,8 @@
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#ifdef __x86_64__
static double GetTotal(const struct countbranch *p) {
return p->total;
}
@ -101,3 +103,5 @@ static textstartup void countbranch_init() {
const void *const countbranch_ctor[] initarray = {
countbranch_init,
};
#endif /* __x86_64__ */

View file

@ -26,6 +26,8 @@
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"
#ifdef __x86_64__
static long GetLongSum(const long *h, size_t n) {
long t;
size_t i;
@ -80,3 +82,5 @@ static textstartup void countexpr_init() {
const void *const countexpr_ctor[] initarray = {
countexpr_init,
};
#endif /* __x86_64__ */

View file

@ -43,6 +43,7 @@ LIBC_LOG_A_DIRECTDEPS = \
LIBC_TIME \
LIBC_TINYMATH \
LIBC_ZIPOS \
THIRD_PARTY_COMPILER_RT \
THIRD_PARTY_DLMALLOC \
THIRD_PARTY_GDTOA

View file

@ -47,6 +47,8 @@
#include "libc/thread/tls.h"
#include "third_party/libcxx/math.h"
#ifdef __x86_64__
/**
* @fileoverview Abnormal termination handling & GUI debugging.
* @see libc/onkill.c
@ -361,3 +363,5 @@ ItsATrap:
strace_enabled(+1);
ftrace_enabled(+1);
}
#endif /* __x86_64__ */

View file

@ -34,6 +34,8 @@
#include "libc/sysv/consts/sig.h"
#include "libc/sysv/consts/ss.h"
#ifdef __x86_64__
STATIC_YOINK("zipos"); // for symtab
STATIC_YOINK("__die"); // for backtracing
STATIC_YOINK("ShowBacktrace"); // for backtracing
@ -123,3 +125,8 @@ void ShowCrashReports(void) {
}
GetSymbolTable();
}
#else
void ShowCrashReports(void) {
}
#endif /* __x86_64__ */

View file

@ -24,6 +24,8 @@
#include "libc/runtime/symbols.internal.h"
#include "libc/sysv/errfuns.h"
#ifdef __x86_64__
static bool __watch_busy;
static void *__watch_addr;
static size_t __watch_size;
@ -85,3 +87,5 @@ int __watch(void *addr, size_t size) {
Copy(__watch_last, __watch_addr, __watch_size);
return 0;
}
#endif /* __x86_64__ */