Ticket #2061: 0001-early-ldflags.patch

File 0001-early-ldflags.patch, 1.0 KB (added by mplayer.8eaf7cd8e5128d8191fe@…, 14 years ago)

Move LDFLAGS handling above the test for a working compiler.

  • configure

    The test for a working compiler assumes that a link can ignore LDFLAGS
    and still work.  This is not a safe assumption.  Move user LDFLAGS up
    before the first compiler test.
    
    a b  
    16981698fi # icc
    16991699test "$cc_fail" = yes && die "unsupported compiler version"
    17001700
     1701if test -n "$LDFLAGS" ; then
     1702  extra_ldflags="$extra_ldflags $LDFLAGS"
     1703  warn_cflags=yes
     1704elif test "$cc_vendor" = "intel" ; then
     1705  extra_ldflags="$extra_ldflags -i-static"
     1706fi
    17011707echocheck "working compiler"
    17021708cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
    17031709echo "yes"
     
    26172623cflag_check -MD -MP && DEPFLAGS="-MD -MP"
    26182624
    26192625
    2620 if test -n "$LDFLAGS" ; then
    2621   extra_ldflags="$extra_ldflags $LDFLAGS"
    2622   warn_cflags=yes
    2623 elif test "$cc_vendor" = "intel" ; then
    2624   extra_ldflags="$extra_ldflags -i-static"
    2625 fi
    26262626if test -n "$CPPFLAGS" ; then
    26272627  extra_cflags="$extra_cflags $CPPFLAGS"
    26282628  warn_cflags=yes