build: Support executable only ldflags

The options is useful to build position-independent executables on
hardened systems (e.g. Android L and Gentoo Hardened).
This commit is contained in:
Luca Barbato
2014-07-16 17:00:11 +02:00
parent b396bbad10
commit bb0babd705
4 changed files with 15 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ FF_DEP_LIBS := $(DEP_LIBS)
all: $(AVPROGS)
$(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
$(LD) $(LDFLAGS) $(LD_O) $^ $(ELIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS)
tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
@@ -149,7 +149,7 @@ endef
$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(EXESUF)=))))
$(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
OBJDIRS += tools