mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Get GCC to mostly build with Cosmo
This commit is contained in:
parent
2eb7148474
commit
9b55dbe417
54 changed files with 113 additions and 132 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue