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
|
|
| 1698 | 1698 | fi # icc |
| 1699 | 1699 | test "$cc_fail" = yes && die "unsupported compiler version" |
| 1700 | 1700 | |
| | 1701 | if test -n "$LDFLAGS" ; then |
| | 1702 | extra_ldflags="$extra_ldflags $LDFLAGS" |
| | 1703 | warn_cflags=yes |
| | 1704 | elif test "$cc_vendor" = "intel" ; then |
| | 1705 | extra_ldflags="$extra_ldflags -i-static" |
| | 1706 | fi |
| 1701 | 1707 | echocheck "working compiler" |
| 1702 | 1708 | cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ." |
| 1703 | 1709 | echo "yes" |
| … |
… |
|
| 2617 | 2623 | cflag_check -MD -MP && DEPFLAGS="-MD -MP" |
| 2618 | 2624 | |
| 2619 | 2625 | |
| 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 |
| 2626 | 2626 | if test -n "$CPPFLAGS" ; then |
| 2627 | 2627 | extra_cflags="$extra_cflags $CPPFLAGS" |
| 2628 | 2628 | warn_cflags=yes |