mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-16 00:28:20 +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.linkerOptions.args '-no-pie'
|
||||
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
||||
cfg.extraLibs 'dl'
|
||||
}
|
||||
|
@ -340,7 +340,8 @@ const char *CCommandLine::CheckParm(const char *psz, char **ppszValue) const
|
||||
if (p2[i] == '\0' || p2[i] == ' ')
|
||||
break;
|
||||
|
||||
sz[i++] = p2[i];
|
||||
sz[i] = p2[i];
|
||||
i++;
|
||||
} while (i < sizeof(sz));
|
||||
|
||||
sz[i] = '\0';
|
||||
|
@ -65,6 +65,7 @@ void setupToolchain(NativeBinarySpec b) {
|
||||
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp'
|
||||
}
|
||||
|
||||
cfg.linkerOptions.args '-no-pie'
|
||||
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
||||
cfg.extraLibs 'dl'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user