NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/55837 (GCC 9.3 g++ generates wrong codes for hard-float arm)



The following reply was made to PR toolchain/55837; it has been noted by GNATS.

From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc: 
Subject: Re: toolchain/55837 (GCC 9.3 g++ generates wrong codes for hard-float
 arm)
Date: Fri, 30 Apr 2021 21:29:36 +0900

 I tried to compile sys/lib/libunwind with VFP instructions being disabled
 forcibly with this patch:
 
 http://www.netbsd.org/~rin/arm_unwind_20210430.patch
 
 But the situation does not change unfortunately...
 
 Note that patch for GCC is necessary because -mgeneral-regs-only does not
 work for some C++ headers like:
 
 ----
 /build/gcc9/dest/evbarm-earmv6hfeb/usr/include/g++/bits/std_abs.h: In function 'constexpr double std::abs(double)':
 /build/gcc9/dest/evbarm-earmv6hfeb/usr/include/g++/bits/std_abs.h:71:17: error: argument of type 'double' not permitted with -mgeneral-regs-only
     71 |   abs(double __x)
 ----
 
 We may need more -mgeneral-regs-only for libstdc++, c.f.:
 
 ---
 % find /usr/src/external/gpl3/gcc/dist/libstdc++-v3 -name '*.cc' | \
 xargs grep general-regs-only
 /usr/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_personality.cc:__attribute__((target ("general-regs-only")))
 /usr/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_personality.cc:__attribute__((target ("general-regs-only")))
 ---
 
 Thanks,
 rin
 


Home | Main Index | Thread Index | Old Index