mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 20:40:28 +00:00
Fix breakages in Linux-only build modes
- compile.com now polyfills -march=native which gcc/clang removed - Guarantee zero Windows code is linked into non-Windows binaries - MODE=tinylinux binaries are now back to being as tiny as ~4kb - Improve the runtime's stack allocation / alignment hack - GitHub Actions now tests Linux modes for assurance
This commit is contained in:
parent
0e4c828a8e
commit
3dc86ce154
32 changed files with 283 additions and 104 deletions
|
@ -22,6 +22,8 @@
|
|||
#include "libc/nt/enum/consolemodeflags.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#if defined(__x86_64__) && SupportsWindows()
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (!IsWindows()) {
|
||||
|
@ -40,3 +42,11 @@ int main(int argc, char *argv[]) {
|
|||
kNtEnableVirtualTerminalProcessing);
|
||||
_Exit(0);
|
||||
}
|
||||
|
||||
#else
|
||||
int main(int argc, char *argv[]) {
|
||||
fprintf(stderr,
|
||||
"fixconsole not supported on this cpu arch or build config\n");
|
||||
return 1;
|
||||
}
|
||||
#endif /* __x86_64__ && SupportsWindows() */
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "libc/time/time.h"
|
||||
#include "tool/decode/lib/flagger.h"
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#ifdef __x86_64__
|
||||
#if defined(__x86_64__) && SupportsWindows()
|
||||
|
||||
char *GetString(struct NtUnicodeString *s) {
|
||||
static char buf[1024];
|
||||
|
@ -538,4 +538,9 @@ int main(int argc, char *argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
#else
|
||||
int main(int argc, char *argv[]) {
|
||||
fprintf(stderr, "printpeb not supported on this cpu arch or build config\n");
|
||||
return 1;
|
||||
}
|
||||
#endif /* __x86_64__ && SupportsWindows() */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#if defined(__x86_64__) && SupportsWindows()
|
||||
|
||||
/**
|
||||
* @fileoverview WIN32 Virtual Memory Layout Dump Utility
|
||||
|
@ -73,3 +74,11 @@ int main(int argc, char *argv[]) {
|
|||
(DescribeNtPageFlags)(b[4], mi.Protect));
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
int main(int argc, char *argv[]) {
|
||||
fprintf(stderr,
|
||||
"virtualquery not supported on this cpu arch or build config\n");
|
||||
return 1;
|
||||
}
|
||||
#endif /* __x86_64__ && SupportsWindows() */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue