On Mon, 9 Dec 2024 10:30:01 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

> > This needs a name and description change, I'll do so later. @MBaesken does 
> > this fix LTO on your end? Kim also reports that LTO hangs indefinitely 
> > alongside several warning messages, do you have similar issues when you try 
> > to enable LTO?
> 
> When I try to build with this change (with and without lto enabled) I run into
> 
> ```
> /openjdk/tools/devkits/x86_64-linux-gnu-to-x86_64-linux-gnu-fedora27-gcc11.3.0/x86_64-linux-gnu/sysroot/usr/include/unistd.h:520:14:
>  error: conflicting declaration of 'char* get_current_dir_name()' with 'C' 
> linkage
>   520 | extern char *get_current_dir_name (void) __THROW;
>       |              ^~~~~~~~~~~~~~~~~~~~
> ```
> 
> (maybe it is related to the devkit, maybe to pch I don't know)

It's related to the subtle change in FORBID_C_FUNCTION, I think unistd.h is 
being included before compilerWarnings.hpp somewhere. Well, at least I now know 
the current approach has this issue

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22464#issuecomment-2527675965

Reply via email to