Link with --as-needed option fails

Florian Lohoff f at zz.de
Mon Aug 16 13:38:22 CEST 2010


Hi Vitaly,

On Sun, Aug 15, 2010 at 07:18:45PM +0900, Vitaliy Tomin wrote:
> Current getstream fails to link when compiling with --as-needed gcc
> option. This happens because libraries to link defined before objects,
> but --as-needed requires  objects then libraries to link.
> 
> I suggest small patch for Makefile:
> 
>  all: getstream tsdecode
> 
>  tsdecode: $(OBJ-tsdecode)
> -       gcc $(LDFLAGS) -o $@ $+
> +       gcc  -o $@ $+ $(LDFLAGS)
> 
>  getstream: $(OBJ-getstream)
> -       gcc $(LDFLAGS) -o $@ $+
> +       gcc  -o $@ $+ $(LDFLAGS)
> 
>  clean:

Thanks for the hint - its in the repository ...

Flo
-- 
Florian Lohoff                                                 f at zz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://gt.owl.de/pipermail/getstream/attachments/20100816/912ef43e/attachment.pgp>


More information about the Getstream mailing list