This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
libm -fno-builtin
- From: "Jon Beniston" <jon at beniston dot com>
- To: <newlib at sourceware dot org>
- Date: Tue, 19 Jun 2018 12:36:00 +0100
- Subject: libm -fno-builtin
Hi,
libm is currently built with -fno-builtin. This results in sub-optimal code
for uses of functions such as fabs & floor. Without -fno-builtin, gcc can
inline these to single instructions on many targets. As is, we end up with
function calls, to slower generic code.
Can -fno-builtin therefore be removed? If there are specific builtins that
need to be prevented from being used, these can prevented with
-fno-builtin-function, perhaps even on a per file basis rather than
globally.
Are there any known traps before I give it a try?
Cheers,
Jon