Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guix: Remove now-unnecessary gcc make flag #18320

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

dongcarl
Copy link
Contributor

Previously, Guix would produce a gcc which did not know to use the SSP
function from glibc, and required a gcc make flag for it to do so, in my
attempt to fix it upstream I realized that this is no longer the case.

This can be verified by performing a Guix build and doing

  readelf -s ... | grep __stack_chk

to check that symbols are coming from glibc, and doing

  readelf -d ... | grep NEEDED | grep ssp

to see that libssp.so is not being depended on

Previously, Guix would produce a gcc which did not know to use the SSP
function from glibc, and required a gcc make flag for it to do so, in my
attempt to fix it upstream I realized that this is no longer the case.

This can be verified by performing a Guix build and doing

  readelf -s ... | grep __stack_chk

to check that symbols are coming from glibc, and doing

  readelf -d ... | grep NEEDED | grep ssp

to see that libssp.so is not being depended on
@practicalswift
Copy link
Contributor

Concept ACK

Nice 8 percent reduction of manifest.scm: less is more.

Very exciting to follow your excellent guix work. Keep trucking!

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0ae42a1 - ran a Guix build (hashes below) and checked all the linux binaries:

# Linux-x86-64:
llvm-readelf -s bitcoind | grep __stack_chk
   183: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4
llvm-readelf -d bitcoind | grep NEEDED
  0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
  0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]

# RISCV64:
llvm-readelf -s bitcoind | grep __stack_chk
    76: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND __stack_chk_guard@GLIBC_2.27
   315: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.27
llvm-readelf -d bitcoind | grep NEEDED
  0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
  0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [ld-linux-riscv64-lp64d.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libatomic.so.1]

# arm-linux-gnueabihf:
llvm-readelf -s bitcoind | grep __stack_chk
    55: 00000000     0 OBJECT  GLOBAL DEFAULT  UND __stack_chk_guard@GLIBC_2.4
   202: 00000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4
llvm-readelf -d bitcoind | grep NEEDED
  0x00000001 (NEEDED)             Shared library: [libpthread.so.0]
  0x00000001 (NEEDED)             Shared library: [librt.so.1]
  0x00000001 (NEEDED)             Shared library: [libm.so.6]
  0x00000001 (NEEDED)             Shared library: [libgcc_s.so.1]
  0x00000001 (NEEDED)             Shared library: [libc.so.6]
  0x00000001 (NEEDED)             Shared library: [ld-linux-armhf.so.3]

# aarch64:
llvm-readelf -s bitcoind | grep __stack_chk
    56: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.17
    72: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND __stack_chk_guard@GLIBC_2.17
llvm-readelf -d bitcoind | grep NEEDED
  0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
  0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [ld-linux-aarch64.so.1]
env PATH="/root/.config/guix/current/bin${PATH:+:}$PATH" guix describe
guix bf8ee1c
  repository URL: https://git.savannah.gnu.org/git/guix.git
  branch: master
  commit: bf8ee1c5046c7011d641e10277984c9bb7dc7c2f

git rev-parse HEAD
0ae42a16c766a7ecb8711bfad6f22b8581ea0258

find output/ -type f -print0 | sort -z | xargs -r0 sha256sum
69e6566ebb91f03dbe76a5fa02ac214e06f36dacb210346f79e73c0c49324251  output/bitcoin-0.19.99-aarch64-linux-gnu-debug.tar.gz
58b29472d729641d28ed4a9a4561ee8498959cb0c02afaf7b3c62f6523420f85  output/bitcoin-0.19.99-aarch64-linux-gnu.tar.gz
18af2395f088e583833a9b6c13a205df1c762952ecf0e8f3fde5f2e11fc74ca5  output/bitcoin-0.19.99-arm-linux-gnueabihf-debug.tar.gz
712f67727e5d6c8c70639fb3a4bd501aeb97461af31de1adcb63fcf31c777c00  output/bitcoin-0.19.99-arm-linux-gnueabihf.tar.gz
c0945466937ed6a325350c9238b5801970e07c9af158f3f9f1043c8f3c7d2d0a  output/bitcoin-0.19.99-riscv64-linux-gnu-debug.tar.gz
3dbae635bebc6e592ae357b6db19ca226959254ce482ae1b730fee6bc1a8c5d9  output/bitcoin-0.19.99-riscv64-linux-gnu.tar.gz
c17ebf034fe9d3f65039e5b9c01bcd8e8412a433d1a67ff1b540688c028aea2b  output/bitcoin-0.19.99-x86_64-linux-gnu-debug.tar.gz
f26bdc9fd67880c68651bb44b0bb756cdc8fbef4299bc25befff7cd5075f4ee7  output/bitcoin-0.19.99-x86_64-linux-gnu.tar.gz
4a8b0c66ade937e645db9d643559819eb7eceac0cf0b7282bf783d1cf24565b6  output/src/bitcoin-0.19.99.tar.gz

@fanquake fanquake merged commit 4c42a13 into bitcoin:master Mar 12, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 13, 2020
0ae42a1 guix: Remove now-unnecessary gcc make flag (Carl Dong)

Pull request description:

  ```
  Previously, Guix would produce a gcc which did not know to use the SSP
  function from glibc, and required a gcc make flag for it to do so, in my
  attempt to fix it upstream I realized that this is no longer the case.

  This can be verified by performing a Guix build and doing

    readelf -s ... | grep __stack_chk

  to check that symbols are coming from glibc, and doing

    readelf -d ... | grep NEEDED | grep ssp

  to see that libssp.so is not being depended on
  ```

ACKs for top commit:
  fanquake:
    ACK 0ae42a1 - ran a Guix build (hashes below) and checked all the linux binaries:

Tree-SHA512: 701b91e7c323b12a29af9539cb2656d10ce0a93af573a02e57f0b7fea05a6e1819798536eadb24d0a17e7f35b503f5e863fee5e7409db1b8a3973c4375e49d4e
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Apr 6, 2020
- Fix gcc 9 warnings bitcoin#16995
- guix: Remove now-unnecessary gcc make flag bitcoin#18320
- build: Remove workaround for ancient libtool bitcoin#17066
- build: Add variable printing target to Makefiles bitcoin#17087
- Disable _FORTIFY_SOURCE when enable-debug bitcoin#17033
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
0ae42a1 guix: Remove now-unnecessary gcc make flag (Carl Dong)

Pull request description:

  ```
  Previously, Guix would produce a gcc which did not know to use the SSP
  function from glibc, and required a gcc make flag for it to do so, in my
  attempt to fix it upstream I realized that this is no longer the case.

  This can be verified by performing a Guix build and doing

    readelf -s ... | grep __stack_chk

  to check that symbols are coming from glibc, and doing

    readelf -d ... | grep NEEDED | grep ssp

  to see that libssp.so is not being depended on
  ```

ACKs for top commit:
  fanquake:
    ACK 0ae42a1 - ran a Guix build (hashes below) and checked all the linux binaries:

Tree-SHA512: 701b91e7c323b12a29af9539cb2656d10ce0a93af573a02e57f0b7fea05a6e1819798536eadb24d0a17e7f35b503f5e863fee5e7409db1b8a3973c4375e49d4e
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants