[Pkg-stud-maintainers] Bug#710384: Bug#710384: stud: ftbs with ld --as-needed
Vincent Bernat
bernat at debian.org
Thu May 30 21:43:26 UTC 2013
❦ 30 mai 2013 14:17 CEST, Julian Taylor <jtaylor.debian at googlemail.com> :
> stud fails to build with ld --as-needed.
> With --as-needed libraries need to be placed before objects needing
> their symbols.
>
> Attached patch fixes the issue.
Hi Julian!
Thanks for the patch. I am concerned about the part on libebtree:
> --- a/ebtree/Makefile
> +++ b/ebtree/Makefile
> @@ -1,6 +1,7 @@
> OBJS = ebtree.o eb32tree.o eb64tree.o ebmbtree.o ebsttree.o ebimtree.o ebistree.o
> CFLAGS = -O3
> EXAMPLES = $(basename $(wildcard examples/*.c))
> +LIBS = -lssl -lcrypto -lev
>
> all: libebtree.a
>
> @@ -10,15 +11,15 @@ libebtree.a: $(OBJS)
> $(AR) rv $@ $^
>
> %.o: %.c
> - $(CC) $(CFLAGS) -o $@ -c $^
> + $(CC) $(CFLAGS) -o $@ -c $^ $(LIBS)
When building .o, there is no linker involved, so no need to specify
LIBS, right?
>
> examples/%: examples/%.c libebtree.a
> - $(CC) $(CFLAGS) -I. -o $@ $< -L. -lebtree
> + $(CC) $(CFLAGS) -I. -o $@ $< -L. -lebtree $(LIBS)
>
> test: test32 test64 testst
>
> test%: test%.c libebtree.a
> - $(CC) $(CFLAGS) -o $@ $< -L. -lebtree
> + $(CC) $(CFLAGS) -o $@ $< -L. -lebtree $(LIBS)
Those executables do not make use of libssl and all. So, no need to link
them, I think.
--
Replace repetitive expressions by calls to a common function.
- The Elements of Programming Style (Kernighan & Plauger)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-stud-maintainers/attachments/20130530/4e00af6f/attachment.pgp>
More information about the Pkg-stud-maintainers
mailing list