mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit 'bb0babd7054bed7edfd9f4d6b20cdba864de1830'
* commit 'bb0babd7054bed7edfd9f4d6b20cdba864de1830': build: Support executable only ldflags Conflicts: Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
dac096cf39
4
Makefile
4
Makefile
@ -63,7 +63,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)
|
||||
tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
|
||||
@ -117,7 +117,7 @@ $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
|
||||
$(STRIP) $@
|
||||
|
||||
%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
|
||||
|
||||
OBJDIRS += tools
|
||||
|
||||
|
9
configure
vendored
9
configure
vendored
@ -299,6 +299,7 @@ Toolchain options:
|
||||
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
|
||||
--extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
|
||||
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
|
||||
--extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS [$LDEXEFLAGS]
|
||||
--extra-libs=ELIBS add ELIBS [$ELIBS]
|
||||
--extra-version=STRING version string suffix []
|
||||
--optflags=OPTFLAGS override optimization-related compiler flags
|
||||
@ -758,6 +759,10 @@ add_ldflags(){
|
||||
append LDFLAGS $($ldflags_filter "$@")
|
||||
}
|
||||
|
||||
add_ldexeflags(){
|
||||
append LDEXEFLAGS $($ldflags_filter "$@")
|
||||
}
|
||||
|
||||
add_stripflags(){
|
||||
append ASMSTRIPFLAGS "$@"
|
||||
}
|
||||
@ -2829,6 +2834,9 @@ for opt do
|
||||
--extra-ldflags=*)
|
||||
add_ldflags $optval
|
||||
;;
|
||||
--extra-ldexeflags=*)
|
||||
add_ldexeflags $optval
|
||||
;;
|
||||
--extra-libs=*)
|
||||
add_extralibs $optval
|
||||
;;
|
||||
@ -5419,6 +5427,7 @@ WINDRES=$windres
|
||||
DEPWINDRES=$dep_cc
|
||||
DOXYGEN=$doxygen
|
||||
LDFLAGS=$LDFLAGS
|
||||
LDEXEFLAGS=$LDEXEFLAGS
|
||||
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
|
||||
ASMSTRIPFLAGS=$ASMSTRIPFLAGS
|
||||
YASMFLAGS=$YASMFLAGS
|
||||
|
@ -35,6 +35,9 @@ to your project LDFLAGS:
|
||||
-Wl,-Bsymbolic
|
||||
@end example
|
||||
|
||||
If your target platform requires position independent binaries, you should
|
||||
pass the correct linking flag (e.g. @code{-pie}) to @code{--extra-ldexeflags}.
|
||||
|
||||
@section BSD
|
||||
|
||||
BSD make will not build FFmpeg, you need to install and use GNU Make
|
||||
|
@ -46,7 +46,7 @@ $(TOOLS): THISLIB = $(FULLNAME:%=$(LD_LIB))
|
||||
$(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME)
|
||||
|
||||
$(TESTPROGS) $(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
|
||||
$$(LD) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS)
|
||||
$$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS)
|
||||
|
||||
$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
|
||||
$(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
|
||||
|
Loading…
Reference in New Issue
Block a user