mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Add MODE=optlinux build mode (#141)
This commit is contained in:
parent
226aaf3547
commit
67b5200a0b
111 changed files with 934 additions and 854 deletions
|
@ -139,6 +139,7 @@ bool wantrecord;
|
|||
bool fulloutput;
|
||||
bool touchtarget;
|
||||
bool inarticulate;
|
||||
bool wantnoredzone;
|
||||
bool stdoutmustclose;
|
||||
bool no_sanitize_null;
|
||||
bool no_sanitize_alignment;
|
||||
|
@ -749,6 +750,10 @@ int main(int argc, char *argv[]) {
|
|||
wantframe = true;
|
||||
} else if (!strcmp(argv[i], "-fomit-frame-pointer")) {
|
||||
wantframe = false;
|
||||
} else if (!strcmp(argv[i], "-mno-red-zone")) {
|
||||
wantnoredzone = true;
|
||||
} else if (!strcmp(argv[i], "-mred-zone")) {
|
||||
wantnoredzone = false;
|
||||
} else if (!strcmp(argv[i], "-mno-vzeroupper")) {
|
||||
if (isgcc) {
|
||||
AddArg("-Wa,-msse2avx");
|
||||
|
@ -864,8 +869,13 @@ int main(int argc, char *argv[]) {
|
|||
if (no_sanitize_pointer_overflow) {
|
||||
AddArg("-fno-sanitize=pointer-overflow");
|
||||
}
|
||||
if (wantnoredzone) {
|
||||
AddArg("-mno-red-zone");
|
||||
AddArg("-D__MNO_RED_ZONE__");
|
||||
}
|
||||
if (wantframe) {
|
||||
AddArg("-fno-omit-frame-pointer");
|
||||
AddArg("-D__FNO_OMIT_FRAME_POINTER__");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ const char *getargs_next(struct GetArgs *ga) {
|
|||
}
|
||||
}
|
||||
k = 0;
|
||||
#if defined(__x86__) && defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
#if defined(__SSE2__) && defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
typedef unsigned char xmm_t
|
||||
__attribute__((__vector_size__(16), __aligned__(1)));
|
||||
for (; ga->j + k + 16 <= ga->mapsize; k += 16) {
|
||||
|
|
|
@ -160,8 +160,10 @@
|
|||
"__MNO_VZEROUPPER__"
|
||||
"__FSANITIZE_ADDRESS__"
|
||||
"__FSANITIZE_UNDEFINED__"
|
||||
"__MNO_RED_ZONE__"
|
||||
"__MNOP_MCOUNT__"
|
||||
"__MRECORD_MCOUNT__"))
|
||||
"__MRECORD_MCOUNT__"
|
||||
"__FNO_OMIT_FRAME_POINTER__"))
|
||||
|
||||
(defconst cosmo-cpp-constants
|
||||
(append cosmo-cpp-constants-c11
|
||||
|
|
|
@ -1847,7 +1847,7 @@ static bool OpenZip(bool force) {
|
|||
if ((m = mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) !=
|
||||
MAP_FAILED) {
|
||||
n = st.st_size;
|
||||
if (endswith(zpath, ".com.dbg") && (p = memmem(m, n, "MZqFpD", 6))) {
|
||||
if ((p = FindEmbeddedApe(m, n))) {
|
||||
b = p;
|
||||
n -= p - m;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue