Support linker options passed in several -Wl param

ld support arguments to multiple-letter options being passed in two
ways:
* -opt=arg
* -opt arg

libtool generate command line of the second form. This commit add
support for the second form so that libtool works with tcc. The way it
is done is to concatenate all -Wl options into one and then pass it to
set_linker.
This commit is contained in:
Thomas Preud'homme
2012-03-15 00:22:00 +01:00
parent 1736a71b71
commit 7fb0482a46
2 changed files with 19 additions and 2 deletions

View File

@ -1566,6 +1566,9 @@ PUB_FUNC const char * tcc_set_linker(TCCState *s, char *option, int multi)
s->text_addr = strtoull(p, &end, 16);
s->has_text_addr = 1;
} else {
char *comma_ptr = strchr(option, ',');
if (comma_ptr)
*comma_ptr = '\0';
return option;
}