[syslinux] [syslinux:elflink] elflink: fix dependency problem in cmenu/ Makefile

Matt Fleming matt.fleming at intel.com
Fri Jun 29 07:57:34 PDT 2012


On Fri, 2012-06-29 at 07:42 -0700, syslinux-bot for H. Peter Anvin
wrote:
> elflink: fix dependency problem in cmenu/Makefile
> 
> Instead of adding library dependencies implicitly, make them explicit
> and use --as-needed to avoid bogus DT_NEEDED entries from being
> generated.

This is fine, but...

> diff --git a/com32/cmenu/Makefile b/com32/cmenu/Makefile
> index 40a09d1..c6e0cae 100644
> --- a/com32/cmenu/Makefile
> +++ b/com32/cmenu/Makefile
> @@ -17,26 +17,15 @@
>  
>  NOGPL := 1
>  
> -# This must be defined before com32.mk is included
> -LIBS   = libmenu/libmenu.c32
> -
>  topdir = ../..
>  MAKEDIR = $(topdir)/mk
>  include $(MAKEDIR)/elf.mk
>  
>  CFLAGS	  += -I./libmenu
>  
> -LDFLAGS_complex.o = $(com32)/cmenu/libmenu/libmenu.c32 \
> -		    $(com32)/libutil/libutil_com.c32 \
> -		    $(com32)/lib/libcom32.c32
> -LDFLAGS_display.o = $(com32)/cmenu/libmenu/libmenu.c32 \
> -		$(com32)/libutil/libutil_com.c32 \
> -		$(com32)/lib/libcom32.c32
> -LDFLAGS_simple.o = $(com32)/cmenu/libmenu/libmenu.c32 \
> -		   $(com32)/libutil/libutil_com.c32 \
> -		   $(com32)/lib/libcom32.c32
> -LDFLAGS_test.o = $(com32)/cmenu/libmenu/libmenu.c32
> -LDFLAGS_test2.o = $(com32)/cmenu/libmenu/libmenu.c32
> +LIBS  = libmenu/libmenu.c32 \
> +        $(com32)/libutil/libutil_com.c32 \
> +        $(com32)/lib/libcom32.c32

I was hoping to avoid a situation where we just pull in the same
libraries for all *.c32 modules in a directory, even when they're not
required.

For instance, with this change libcom32.c32 and libutil_com.c32 will be
loaded when executing test.c32, even though those additional modules
aren't required to fixup any unresolved symbols.




More information about the Syslinux mailing list