[ruby-core:122638] [Ruby Bug#21496] Fix for gcc-15 `-flto` option

Issue #21496 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #21496: Fix for gcc-15 `-flto` option https://bugs.ruby-lang.org/issues/21496 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED ---------------------------------------- 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.
commit:11fe8b26c14 [ruby/etc] Run `have_func` with the header providing the declarations commit:134bdf2d34a [ruby/io-console] Run `have_func` with the header providing the declarations commit:ac72a25a578 [ruby/io-nonblock] Run `have_func` with the header providing the declarations commit:89031666487 [ruby/io-wait] Run `have_func` with the header providing the declarations commit:5277ca1431a [ruby/openssl] Run `have_func` with the header providing the declarations commit:94803fe9e7b [ruby/strscan] Run `have_func` with the header providing the declarations commit:9d080765cc3 [ruby/json] Run `have_func` with the header providing the declarations

Issue #21496 has been updated by hsbt (Hiroshi SHIBATA). I created https://github.com/ruby/ruby/pull/13892 for Ruby 3.4. ---------------------------------------- Bug #21496: Fix for gcc-15 `-flto` option https://bugs.ruby-lang.org/issues/21496#change-114070 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED ---------------------------------------- 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.
commit:11fe8b26c14 [ruby/etc] Run `have_func` with the header providing the declarations commit:134bdf2d34a [ruby/io-console] Run `have_func` with the header providing the declarations commit:ac72a25a578 [ruby/io-nonblock] Run `have_func` with the header providing the declarations commit:89031666487 [ruby/io-wait] Run `have_func` with the header providing the declarations commit:5277ca1431a [ruby/openssl] Run `have_func` with the header providing the declarations commit:94803fe9e7b [ruby/strscan] Run `have_func` with the header providing the declarations commit:9d080765cc3 [ruby/json] Run `have_func` with the header providing the declarations

Issue #21496 has been updated by nagachika (Tomoyuki Chikanaga). I have created a backporting pull request along with [Bug #21500]. https://github.com/ruby/ruby/pull/13962 ---------------------------------------- Bug #21496: Fix for gcc-15 `-flto` option https://bugs.ruby-lang.org/issues/21496#change-114113 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE ---------------------------------------- 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.
commit:11fe8b26c14 [ruby/etc] Run `have_func` with the header providing the declarations commit:134bdf2d34a [ruby/io-console] Run `have_func` with the header providing the declarations commit:ac72a25a578 [ruby/io-nonblock] Run `have_func` with the header providing the declarations commit:89031666487 [ruby/io-wait] Run `have_func` with the header providing the declarations commit:5277ca1431a [ruby/openssl] Run `have_func` with the header providing the declarations commit:94803fe9e7b [ruby/strscan] Run `have_func` with the header providing the declarations commit:9d080765cc3 [ruby/json] Run `have_func` with the header providing the declarations

Issue #21496 has been updated by hsbt (Hiroshi SHIBATA). Backport changed from 3.2: REQUIRED, 3.3: DONE, 3.4: DONE to 3.2: DONE, 3.3: DONE, 3.4: DONE I merged them at https://github.com/ruby/ruby/pull/14001 I only merged `strscan`, `json` and `io-wait` because other libraries didn't declare affected `have_func`. ---------------------------------------- Bug #21496: Fix for gcc-15 `-flto` option https://bugs.ruby-lang.org/issues/21496#change-114139 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Backport: 3.2: DONE, 3.3: DONE, 3.4: DONE ---------------------------------------- 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.
commit:11fe8b26c14 [ruby/etc] Run `have_func` with the header providing the declarations commit:134bdf2d34a [ruby/io-console] Run `have_func` with the header providing the declarations commit:ac72a25a578 [ruby/io-nonblock] Run `have_func` with the header providing the declarations commit:89031666487 [ruby/io-wait] Run `have_func` with the header providing the declarations commit:5277ca1431a [ruby/openssl] Run `have_func` with the header providing the declarations commit:94803fe9e7b [ruby/strscan] Run `have_func` with the header providing the declarations commit:9d080765cc3 [ruby/json] Run `have_func` with the header providing the declarations
participants (3)
-
hsbt (Hiroshi SHIBATA)
-
nagachika (Tomoyuki Chikanaga)
-
nobu (Nobuyoshi Nakada)