Fix some more build issues (#43)
We're now scrubbing environment variables in compile.com since gnu make was not behaving as expected. It also appears there was a regression in recent revisions that caused ASAN to be turned off for most binaries in dbg mode, which has now been fixed. Cosmopolitan is fully ASAN hardened down to the lowest level libraries and it doesn't need any interceptors
This commit is contained in:
@ -39,8 +39,8 @@ wontreturn void exit(int exitcode) {
|
||||
if (weaken(__cxa_finalize)) {
|
||||
weaken(__cxa_finalize)(NULL);
|
||||
}
|
||||
for (p = *weaken(__fini_array_end); p-- > *weaken(__fini_array_start);) {
|
||||
((void (*)(void))p)();
|
||||
for (p = *weaken(__fini_array_end); p > *weaken(__fini_array_start);) {
|
||||
((void (*)(void))(*--p))();
|
||||
}
|
||||
_Exit(exitcode);
|
||||
}
|
||||
|
||||
@ -35,7 +35,9 @@ const char *FindDebugBinary(void) {
|
||||
unsigned i, len;
|
||||
char buf[2][PATH_MAX];
|
||||
static char res[PATH_MAX];
|
||||
const char *bins[4], *pwd;
|
||||
const char *bins[4], *pwd, *comdbg;
|
||||
if (res[0]) return res;
|
||||
if ((comdbg = emptytonull(getenv("COMDBG")))) return comdbg;
|
||||
if (res[0]) return res;
|
||||
bins[0] = program_invocation_name;
|
||||
bins[1] = (const char *)getauxval(AT_EXECFN);
|
||||
|
||||
Reference in New Issue
Block a user