[FFmpeg-cvslog] Merge commit '18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad'

James Almer git at videolan.org
Wed Mar 28 21:24:02 EEST 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Mar 28 15:19:35 2018 -0300| [c00b218a8f75ed3eb87c213d95bd5775c0af5e12] | committer: James Almer

Merge commit '18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad'

* commit '18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad':
  configure: Add check_ld() helper function to simplify some expressions

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c00b218a8f75ed3eb87c213d95bd5775c0af5e12
---

 configure | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index b3c5a7dea4..ba283593ba 100755
--- a/configure
+++ b/configure
@@ -1035,6 +1035,15 @@ test_ld(){
     test_cmd $ld $LDFLAGS $LDEXEFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
 }
 
+check_ld(){
+    log check_ld "$@"
+    type=$1
+    name=$2
+    shift 2
+    disable $name
+    test_ld $type $@ && enable $name
+}
+
 print_include(){
     hdr=$1
     test "${hdr%.h}" = "${hdr}" &&
@@ -5468,8 +5477,8 @@ EOF
         :
     elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__" && [ $target_os != darwin ]; then
         case "${cross_prefix:-$cc}" in
-            *hardfloat*)         enable vfp_args;   fpabi=vfp ;;
-            *) test_ld "cc" <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;;
+            *hardfloat*) enable vfp_args; fpabi=vfp ;;
+            *) check_ld "cc" vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
 __asm__ (".eabi_attribute 28, 1");
 int main(void) { return 0; }
 EOF
@@ -6406,7 +6415,7 @@ enabled xmm_clobber_test &&
                   -Wl,--wrap,sws_scale ||
     disable xmm_clobber_test
 
-test_ld "cc" <<EOF && enable proper_dce
+check_ld "cc" proper_dce <<EOF
 extern const int array[512];
 static inline int func(void) { return array[0]; }
 int main(void) { return 0; }


======================================================================

diff --cc configure
index b3c5a7dea4,5e350983dd..ba283593ba
--- a/configure
+++ b/configure
@@@ -1025,16 -842,22 +1025,25 @@@ ld_o()
  
  test_ld(){
      log test_ld "$@"
 -    flags=$(filter_out '-l*' "$@")
 -    libs=$(filter '-l*' "$@")
 -    test_cc $($cflags_filter $flags) || return
 +    type=$1
 +    shift 1
 +    flags=$(filter_out '-l*|*.so' $@)
 +    libs=$(filter '-l*|*.so' $@)
 +    test_$type $($cflags_filter $flags) || return
      flags=$($ldflags_filter $flags)
      libs=$($ldflags_filter $libs)
 -    test_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
 +    test_cmd $ld $LDFLAGS $LDEXEFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
  }
  
+ check_ld(){
+     log check_ld "$@"
 -    name=$1
 -    shift
++    type=$1
++    name=$2
++    shift 2
+     disable $name
 -    test_ld $@ && enable $name
++    test_ld $type $@ && enable $name
+ }
+ 
  print_include(){
      hdr=$1
      test "${hdr%.h}" = "${hdr}" &&
@@@ -5468,8 -4275,8 +5477,8 @@@ EO
          :
      elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__" && [ $target_os != darwin ]; then
          case "${cross_prefix:-$cc}" in
-             *hardfloat*)         enable vfp_args;   fpabi=vfp ;;
-             *) test_ld "cc" <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;;
+             *hardfloat*) enable vfp_args; fpabi=vfp ;;
 -            *) check_ld vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
++            *) check_ld "cc" vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
  __asm__ (".eabi_attribute 28, 1");
  int main(void) { return 0; }
  EOF
@@@ -6406,7 -4875,7 +6415,7 @@@ enabled xmm_clobber_test &
                    -Wl,--wrap,sws_scale ||
      disable xmm_clobber_test
  
- test_ld "cc" <<EOF && enable proper_dce
 -check_ld proper_dce <<EOF
++check_ld "cc" proper_dce <<EOF
  extern const int array[512];
  static inline int func(void) { return array[0]; }
  int main(void) { return 0; }



More information about the ffmpeg-cvslog mailing list