mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-29 06:58:03 +03:00
CCommandLine::CheckParm Fix undefined behavior
Add flag -no-pie to linker for executable files
This commit is contained in:
parent
3317627359
commit
cc90106339
@ -65,6 +65,7 @@ void setupToolchain(NativeBinarySpec b) {
|
|||||||
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp'
|
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cfg.linkerOptions.args '-no-pie'
|
||||||
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
||||||
cfg.extraLibs 'dl'
|
cfg.extraLibs 'dl'
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,8 @@ const char *CCommandLine::CheckParm(const char *psz, char **ppszValue) const
|
|||||||
if (p2[i] == '\0' || p2[i] == ' ')
|
if (p2[i] == '\0' || p2[i] == ' ')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
sz[i++] = p2[i];
|
sz[i] = p2[i];
|
||||||
|
i++;
|
||||||
} while (i < sizeof(sz));
|
} while (i < sizeof(sz));
|
||||||
|
|
||||||
sz[i] = '\0';
|
sz[i] = '\0';
|
||||||
|
@ -65,6 +65,7 @@ void setupToolchain(NativeBinarySpec b) {
|
|||||||
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp'
|
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cfg.linkerOptions.args '-no-pie'
|
||||||
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
||||||
cfg.extraLibs 'dl'
|
cfg.extraLibs 'dl'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user