Re: [PATCH] In _IEEE_LIBM mode, use weak symbols instead of wrapper funcs [v3]
Craig Howland <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On 09/21/2018 03:53 PM, Keith Packard wrote: > When the math library is compiled to just use bare IEEE_LIBM mode, many > public functions are just wrappers around the __ieee754 version. > Eliminate the extra function by creating a weak alias symbol for the > public name directly from the ieee754 name. > > v2: > Use __weak_reference macro instead of using > '__attribute__((weak, alias' to make this code portable > to non-ELF systems. > > v3: > Use __strong_reference macro instead of __weak_reference to > avoid changing the symbol in the resulting library. Make the > use of this and the un-definition of the wrapper functions > conditional on both the definition of _IEEE_LIBM and > __strong_reference so that systems without the latter will > still compile the wrapper functions and work properly. I don't see anything which makes the definition of __strong_reference dependent upon target. In sys/cdefs.h it is only dependent upon __GNUC__.