mirror of
https://github.com/frida/tinycc
synced 2024-12-24 22:16:49 +03:00
Skip math library if not found when -lm option is used
This only silences "cannot find library" error and allows Makefiles targeting gcc to not complain about missing libraries If there is custom libm then standard handling applies.
This commit is contained in:
parent
e946eb2a41
commit
174d06a3ff
7
tcc.c
7
tcc.c
@ -314,8 +314,11 @@ int main(int argc, char **argv)
|
||||
const char *filename = s->files[i] + 1;
|
||||
if (filename[0] == '-' && filename[1] == 'l') {
|
||||
if (tcc_add_library(s, filename + 2) < 0) {
|
||||
tcc_error_noabort("cannot find library 'lib%s'", filename+2);
|
||||
ret = 1;
|
||||
/* don't fail on -lm as it's harmless to skip math lib */
|
||||
if (strcmp(filename + 2, "m")) {
|
||||
tcc_error_noabort("cannot find library 'lib%s'", filename + 2);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (1 == s->verbose)
|
||||
|
Loading…
Reference in New Issue
Block a user