mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
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:
parent
3e1fd1d962
commit
e85aeda4ba
8 changed files with 132 additions and 91 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue