mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Introduce cosmocc flags -mdbg -mtiny -moptlinux
The cosmocc.zip toolchain will now include four builds of the libcosmo.a runtime libraries. You can pass the -mdbg flag if you want to debug your cosmopolitan runtime. You can pass the -moptlinux flag if you don't want windows code lurking in your binary. See tool/cosmocc/README.md for more details on how these flags may be used and their important implications.
This commit is contained in:
parent
59692b0882
commit
642e9cb91a
22 changed files with 404 additions and 56 deletions
|
@ -18,6 +18,9 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/blockcancel.internal.h"
|
||||
#include "libc/calls/cp.internal.h"
|
||||
#include "libc/intrin/describebacktrace.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/nexgen32e/stackframe.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/thread/posixthread.internal.h"
|
||||
|
@ -46,7 +49,11 @@ void end_cancelation_point(int state) {
|
|||
}
|
||||
}
|
||||
|
||||
void report_cancelation_point(void) {
|
||||
void report_cancelation_point(int sysv_ordinal, int xnu_ordinal) {
|
||||
char bt[160];
|
||||
struct StackFrame *bp = __builtin_frame_address(0);
|
||||
kprintf("error: report_cancelation_point(%#x, %#x) %s\n", sysv_ordinal,
|
||||
xnu_ordinal, (DescribeBacktrace)(bt, bp));
|
||||
__builtin_trap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue