From 7fb0482a4645d59068ccefe44a3a022b649e5a3a Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 15 Mar 2012 00:22:00 +0100 Subject: 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. --- libtcc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 5e497c9..f448c34 100644 --- a/libtcc.c +++ b/libtcc.c @@ -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; } -- cgit v1.3.1