Commit 88d6f79a authored by James Almer's avatar James Almer

Merge commit '857e26b6'

* commit '857e26b6':
  build: Add an option for passing linker flags to the shared library build

See e34a3468.

--extra-ldlibflags is left in place for compatibility reasons.
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 7a5a1c8c 857e26b6
......@@ -365,7 +365,7 @@ Toolchain options:
--extra-objcflags=FLAGS add FLAGS to OBJCFLAGS [$CFLAGS]
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
--extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS [$LDEXEFLAGS]
--extra-ldlibflags=ELDFLAGS add ELDFLAGS to LDLIBFLAGS [$LDLIBFLAGS]
--extra-ldsoflags=ELDFLAGS add ELDFLAGS to LDSOFLAGS [$LDSOFLAGS]
--extra-libs=ELIBS add ELIBS [$ELIBS]
--extra-version=STRING version string suffix []
--optflags=OPTFLAGS override optimization-related compiler flags
......@@ -869,8 +869,8 @@ add_ldexeflags(){
append LDEXEFLAGS $($ldflags_filter "$@")
}
add_ldlibflags(){
append LDLIBFLAGS $($ldflags_filter "$@")
add_ldsoflags(){
append LDSOFLAGS $($ldflags_filter "$@")
}
add_stripflags(){
......@@ -3604,8 +3604,13 @@ for opt do
--extra-ldexeflags=*)
add_ldexeflags $optval
;;
--extra-ldsoflags=*)
add_ldsoflags $optval
;;
--extra-ldlibflags=*)
add_ldlibflags $optval
warn "The --extra-ldlibflags option is only provided for compatibility and will be\n"\
"removed in the future. Use --extra-ldsoflags instead."
add_ldsoflags $optval
;;
--extra-libs=*)
add_extralibs $optval
......@@ -6361,8 +6366,7 @@ EOF
# add some linker flags
check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
enabled rpath && add_ldexeflags -Wl,-rpath,$libdir
enabled rpath && add_ldlibflags -Wl,-rpath,$libdir
enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
# add some strip flags
......@@ -6954,7 +6958,7 @@ DEPWINDRES=$dep_cc
DOXYGEN=$doxygen
LDFLAGS=$LDFLAGS
LDEXEFLAGS=$LDEXEFLAGS
LDLIBFLAGS=$LDLIBFLAGS
LDSOFLAGS=$LDSOFLAGS
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
ASMSTRIPFLAGS=$ASMSTRIPFLAGS
X86ASMFLAGS=$X86ASMFLAGS
......
......@@ -48,7 +48,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver
$(SLIB_CREATE_DEF_CMD)
$$(LD) $(SHFLAGS) $(LDFLAGS) $(LDLIBFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
$$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
$(SLIB_EXTRA_CMD)
ifdef SUBDIR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment