Merge bitcoin/bitcoin#27153: guix: pass --enable-initfini-array to release GCC

127c637cf0a80e0ea68a7c5aaa088e5ccc9d3d13 guix: pass --enable-initfini-array to release GCC (fanquake)

Pull request description:

  This returns us to pre-Guix behaviour, where the compilers we were using to build releases, were configured with this option.

  > [--enable-initfini-array](https://gcc.gnu.org/install/configure.html)
  > Force the use of sections .init_array and .fini_array (instead of .init and .fini) for constructors and destructors. Option --disable-initfini-array has the opposite effect. If neither option is specified, the configure script will try to guess whether the .init_array and .fini_array sections are supported and, if they are, use them.

ACKs for top commit:
  TheCharlatan:
    ACK 127c637cf0a80e0ea68a7c5aaa088e5ccc9d3d13
  vincenzopalazzo:
    utACK 127c637cf0

Tree-SHA512: fa61227054d52d4dfb4524af3888203a501f680661bdef00bb0970d4e8f7c96cf7f592686c4795be5a0debca267b8e564a4960859297c31f6b261c0729238382
This commit is contained in:
fanquake 2023-03-15 08:36:44 +01:00 committed by pasta
parent a0f5596cf1
commit 12afe0c995
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -139,9 +139,11 @@ chain for " target " development."))
;; https://gcc.gnu.org/install/configure.html
(define (hardened-gcc gcc)
(package-with-extra-configure-variable (
package-with-extra-configure-variable gcc
"--enable-default-ssp" "yes")
"--enable-default-pie" "yes"))
package-with-extra-configure-variable (
package-with-extra-configure-variable gcc
"--enable-initfini-array" "yes")
"--enable-default-ssp" "yes")
"--enable-default-pie" "yes"))
(define* (make-bitcoin-cross-toolchain target
#:key