Be stricter when substituting libraries

This is being replaced by platform.sh.
This commit is contained in:
Pierre Pronchery 2018-03-09 00:11:40 +01:00
parent b9e6fbf0c8
commit 92652fb6e8

View File

@ -720,13 +720,8 @@ static void _binary_ldflags(Makefile * makefile, String const * ldflags)
}
for(i = 0; libs[i] != NULL; i++)
{
snprintf(buf, sizeof(buf), "-l %s", libs[i]);
snprintf(buf, sizeof(buf), "-l%s", libs[i]);
if((q = string_find(p, buf)) == NULL)
{
snprintf(buf, sizeof(buf), "-l%s", libs[i]);
q = string_find(p, buf);
}
if(q == NULL)
continue;
memmove(q, q + strlen(buf), strlen(q) - strlen(buf) + 1);
}