configure: Set the initial ldflags to match the cflags
authorLuca Barbato <lu_zero at gentoo.org>
Fri, 25 Sep 2015 06:56:25 +0000 (08:56 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 29 Sep 2015 16:02:14 +0000 (18:02 +0200)
Some gcc-based toolchain would fail to link if the abi set by the
cpuflags does not match the default.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 678f788fea3380e5cbbf75baac5cc0ce07a56a42)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
configure

index dd97ddf..5a7c602 100755 (executable)
--- a/configure
+++ b/configure
@@ -3309,6 +3309,7 @@ fi
 if [ "$cpu" != generic ]; then
     add_cflags  $cpuflags
     add_asflags $cpuflags
+    test "$cc_type" = "$ld_type" && add_ldflags $cpuflags
 fi
 
 # compiler sanity check