The following removes adding -lieee to the link command when -mieee-fp is specified for GNU targets as suggested by Joseph in the PR. It doesn't touch m32r so the fix may be incomplete depending on the C library used.
I've added a testcase that makes sure we can link but not functional tests of -mieee-fp which I suppose exist already (eh...). Bootstrap and regtest is running on x86_64-unknown-linux-gnu with glibc 2.27 where the testcase fails before the patch. OK for trunk and active branches? Thanks, Richard. >From a71f976df0f17790202c0a692920c9d67e009259 Mon Sep 17 00:00:00 2001 From: Richard Guenther <rguent...@suse.de> Date: Wed, 4 Jul 2018 09:34:14 +0200 Subject: [PATCH] fix-pr84829 2018-07-04 Richard Biener <rguent...@suse.de> PR target/84829 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC): Remove -mieee-fp handling. * gcc.target/i386/pr84829.c: New testcase. diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h index cba3c0b92e3..8620de3e42d 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h @@ -123,7 +123,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC \ "%{shared:-lc} \ - %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" #define GNU_USER_TARGET_LIB_SPEC \ "%{pthread:-lpthread} " \ diff --git a/gcc/testsuite/gcc.target/i386/pr84829.c b/gcc/testsuite/gcc.target/i386/pr84829.c new file mode 100644 index 00000000000..a63a49b1317 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr84829.c @@ -0,0 +1,7 @@ +/* { dg-do link } */ +/* { dg-options "-mieee-fp" } */ + +int main() +{ + return 0; +}