Get GCC to mostly build with Cosmo

This commit is contained in:
Justine Tunney 2023-06-09 06:41:34 -07:00
parent 2eb7148474
commit 9b55dbe417
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
54 changed files with 113 additions and 132 deletions

View file

@ -45,9 +45,8 @@
* @param st is open symbol table for current executable
* @return -1 w/ errno if error happened
*/
noinstrument noasan int PrintBacktraceUsingSymbols(int fd,
const struct StackFrame *bp,
struct SymbolTable *st) {
dontinstrument noasan int PrintBacktraceUsingSymbols(
int fd, const struct StackFrame *bp, struct SymbolTable *st) {
bool ok;
size_t gi;
intptr_t addr;

View file

@ -19,6 +19,6 @@
#include "libc/errno.h"
#include "libc/log/log.h"
noinstrument int _log_get_errno(void) {
dontinstrument int _log_get_errno(void) {
return errno;
}

View file

@ -19,6 +19,6 @@
#include "libc/log/log.h"
#include "libc/runtime/runtime.h"
noinstrument void _log_retrace(void) {
dontinstrument void _log_retrace(void) {
ftrace_enabled(+1);
}

View file

@ -19,6 +19,6 @@
#include "libc/errno.h"
#include "libc/log/log.h"
noinstrument void _log_set_errno(int e) {
dontinstrument void _log_set_errno(int e) {
errno = e;
}

View file

@ -19,6 +19,6 @@
#include "libc/log/log.h"
#include "libc/runtime/runtime.h"
noinstrument void _log_untrace(void) {
dontinstrument void _log_untrace(void) {
ftrace_enabled(-1);
}

View file

@ -22,6 +22,6 @@
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
noinstrument void _log_errno(const char *file, int line, const char *form) {
dontinstrument void _log_errno(const char *file, int line, const char *form) {
flogf(kLogWarn, file, line, NULL, PFLINK("%s → %s"), form, strerror(errno));
}

View file

@ -254,10 +254,10 @@ relegated void ShowCrashReport(int err, int sig, struct siginfo *si,
kprintf("\n");
}
static wontreturn relegated noinstrument void __minicrash(int sig,
struct siginfo *si,
ucontext_t *ctx,
const char *kind) {
static wontreturn relegated dontinstrument void __minicrash(int sig,
struct siginfo *si,
ucontext_t *ctx,
const char *kind) {
kprintf("\n"
"\n"
"CRASHED %s WITH %G\n"

View file

@ -33,14 +33,14 @@ static char __watch_last[4096];
void __watch_hook(void);
static noinstrument inline void Copy(char *p, char *q, size_t n) {
static dontinstrument inline void Copy(char *p, char *q, size_t n) {
size_t i;
for (i = 0; i < n; ++i) {
p[i] = q[i];
}
}
static noinstrument inline int Cmp(char *p, char *q, size_t n) {
static dontinstrument inline int Cmp(char *p, char *q, size_t n) {
int c;
if (n == 8) return READ64LE(p) != READ64LE(q);
if (n == 4) return READ32LE(p) != READ32LE(q);
@ -52,7 +52,7 @@ static noinstrument inline int Cmp(char *p, char *q, size_t n) {
return 0;
}
noinstrument void __watcher(void) {
dontinstrument void __watcher(void) {
if (__watch_busy) return;
__watch_busy = true;
if (Cmp(__watch_last, __watch_addr, __watch_size)) {