Bug#1143851: hppa-linux-gnu-gcc does not honor -ffreestanding, generating referencs to memset
John David Anglin <[email protected]>
| Newsgroups | gmane.linux.debian.devel.gcc |
|---|---|
| Message-ID | <733b1703-1498-40eb-8eb1-7a5233f7b11f__36527.4390483805$1786569448$gmane$org@bell.net> |
On 2026-08-12 3:45 p.m., Michael Tokarev wrote: >> At the moment, I would say hppa is not compatible with -fwhole-program. The >> simplest fix might be to add "_attribute__((used, externally_visible))" to the memcpy >> declaration in your code. > > And this one helps to finish the build, and it finishes successfully. Excellent! >> This what google said about this: >> [...] > I see. It's a fun stuff. > > So, for the time being, I'm including this workaround. For the future, I > guess something has to be done with the build system to avoid -fwhole-program > (Cc'ing Helge Deller). When I get a chance, I will look at making memcpy and millicode calls externally visible. It would be useful to know what code results in the call to memcpy. This seems a bug in gcc's -fwhole-program support. Avoiding millicode calls is likely tricky as they are used for integer multiplication and division. I'm not sure why -mdisable-fpregs option is used. This will make integer multiplication slower. All machines of interest have floating-point hardware. Dave