Bug #21496
closedFix for gcc-15 `-flto` option
Description
Even no prototype information is available, gcc-15 seems retrieve something when LTO is enabled.
As the result, have_func
method may fail due to the inconsistency between the info and the default old-style declaration.
Possible fixes are:
- Specify the header file providing its proper prototype.
- Add the argument list to the first argument.
By the following commits, the extconf.h files generated with -flto
option became same as without the option.
11fe8b26c14 [ruby/etc] Run
have_func
with the header providing the declarations
134bdf2d34a [ruby/io-console] Runhave_func
with the header providing the declarations
ac72a25a578 [ruby/io-nonblock] Runhave_func
with the header providing the declarations
89031666487 [ruby/io-wait] Runhave_func
with the header providing the declarations
5277ca1431a [ruby/openssl] Runhave_func
with the header providing the declarations
94803fe9e7b [ruby/strscan] Runhave_func
with the header providing the declarations
9d080765cc3 [ruby/json] Runhave_func
with the header providing the declarations
Updated by nobu (Nobuyoshi Nakada) about 11 hours ago
- Is duplicate of Bug #21497: building issue when using gcc15, because C23 is default added