From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 2149A384B13D for ; Thu, 9 Jul 2020 18:08:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2149A384B13D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sebastian.huber@embedded-brains.de Received: from sslproxy03.your-server.de ([88.198.220.132]) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jtaxi-0001Po-C8; Thu, 09 Jul 2020 20:07:58 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy03.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jtaxi-000WeW-7D; Thu, 09 Jul 2020 20:07:58 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 309852A1610; Thu, 9 Jul 2020 20:08:22 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id s8P96sBKaGnF; Thu, 9 Jul 2020 20:08:19 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id C0B782A165B; Thu, 9 Jul 2020 20:08:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AaV1-vQ3jjKN; Thu, 9 Jul 2020 20:08:19 +0200 (CEST) Received: from shuber-nb-linux.eb.localhost (unknown [10.10.171.22]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 11F742A1610; Thu, 9 Jul 2020 20:08:19 +0200 (CEST) Subject: Re: fenv() support broken with GCC 10 on ARM To: Newlib References: <43f454a5-b427-bdcf-b58e-698917f1c290@embedded-brains.de> From: Sebastian Huber Message-ID: <2846ae61-be97-6fba-6eef-58563a0378de@embedded-brains.de> Date: Thu, 9 Jul 2020 20:07:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.102.3/25868/Thu Jul 9 15:58:00 2020) X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 18:08:01 -0000 On 09/07/2020 19:16, Eshan Dhawan wrote: > Hi=C2=A0Sebastian, > Could you please tell the steps to recreate the error :) You have to build a GCC 10 for ARM. For example using the latest RTEMS=20 Source Builder: arm-rtems6-gcc --version arm-rtems6-gcc (GCC) 10.1.1 20200703 (RTEMS 6, RSB=20 5ab61d2e8c7ced8c685541509a7ac4eba704e69e, Newlib f095752) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS= E. Then compile the following test program: #include int main() { =C2=A0=C2=A0=C2=A0 return fesetenv( FE_DFL_ENV ); } arm-rtems6-gcc init.c -mthumb -mcpu=3Dcortex-m3 -lm -Wl,-Map,map.txt /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rte= ms/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/a= rm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61= :=20 multiple definition of `__softfloat_float_rounding_mode';=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/= rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/buil= d/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h= :61:=20 first defined here /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rte= ms/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/a= rm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60= :=20 multiple definition of `__softfloat_float_exception_mask';=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/= rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/buil= d/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h= :60:=20 first defined here /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rte= ms/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/a= rm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59= :=20 multiple definition of `__softfloat_float_exception_flags';=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/= rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/buil= d/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h= :59:=20 first defined here /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:=20 warning: cannot find entry symbol _start; defaulting to 0000000000008000 In the linker map file you will find this dependency chain: /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv.o) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 /tmp/cclZauID.o (fesetenv) /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-softfp.o) /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv.o)=20 (__softfp_feclearexcept) /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv-vfp.o) /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a(lib_a-fenv.o)=20 (__vfp_feclearexcept) You have the following symbols: nm=20 /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb= /cortex-m3/libm.a=20 --defined-only | grep -C 3 __soft lib_a-feholdexcept.o: lib_a-fenv-softfp.o: 00000000 B __softfloat_float_exception_flags 00000000 B __softfloat_float_exception_mask 00000000 B __softfloat_float_rounding_mode 00000000 T __softfp_feclearexcept 00000000 T __softfp_fedisableexcept 00000000 T __softfp_feenableexcept 00000000 T __softfp_fegetenv 00000000 T __softfp_fegetexcept 00000000 T __softfp_fegetexceptflag 00000000 T __softfp_fegetround 00000000 T __softfp_feholdexcept 00000000 T __softfp_feraiseexcept 00000000 T __softfp_fesetenv 00000000 T __softfp_fesetexceptflag 00000000 T __softfp_fesetround 00000000 T __softfp_fetestexcept 00000000 T __softfp_feupdateenv lib_a-fenv-vfp.o: 00000000 B __softfloat_float_exception_flags 00000000 B __softfloat_float_exception_mask 00000000 B __softfloat_float_rounding_mode 00000000 T __vfp_feclearexcept 00000000 T __vfp_fedisableexcept 00000000 T __vfp_feenableexcept