Pass critical CFLAGS/CXXFLAGS to more build steps#237
Pass critical CFLAGS/CXXFLAGS to more build steps#237kwsantiago wants to merge 5 commits intobitcoinknots:29.x-knotsfrom
Conversation
3d6400e to
eb8d6f7
Compare
luke-jr
left a comment
There was a problem hiding this comment.
What do you think about taking the hardening logic out of /CMakeLists.txt and putting it into a CMake module that we can just use here too? (Maybe make that a separate PR in case it doesn't work out)
94b19a4 to
2480e4f
Compare
2480e4f to
8f6a14b
Compare
56926e1 to
c0488d3
Compare
c0488d3 to
7a5bd48
Compare
|
With the current PR, guix/depends don't get the hardening options. The point of #159 is to build everything included in the official binaries with full hardening (and source builds by default). The difficulty is using the same hardening decision logic for both the main source as well as dependencies. |
|
Added hardening flag propagation to all depends host configs (linux, darwin, mingw, freebsd, openbsd, netbsd), gated by |
|
The goal isn't to match Hardening.cmake, but to call and use it. Which would also test the usability of compiler-specific flags. |
f7719f0 to
a175f5d
Compare
|
Reworked: depends now probes Hardening.cmake directly instead of duplicating flags per-host. |
a175f5d to
98e4e68
Compare
|
Moved -fstack-reuse=none into Hardening.cmake and pulled target_link_libraries out of the module so the probe skips the dummy library. |
98e4e68 to
5973b09
Compare
5973b09 to
16b28eb
Compare
16b28eb to
91c5809
Compare
91c5809 to
26a7750
Compare
|
Don't we need to update build_id to include the flags? Also, this doesn't seem to actually work. strace'ing the guix build shows many dependencies being built without the hardening flags. |
26a7750 to
5d7e8d9
Compare
|
Fixed build_id to hash host_CFLAGS/CXXFLAGS/LDFLAGS (full flags incl. probe output). Verified under guix: 470/470 compile commands have all hardening flags; prior missing-flags symptom was stale cache not invalidating. |
5d7e8d9 to
0605ecf
Compare
|
Also added build-toolchain probe so native depends packages get hardening. Verified end-to-end under guix: 506/506 compile commands hardened, all 7 output binaries have BIND_NOW/PIE/stack_chk. |
770e500 to
c185ff8
Compare
|
Added host_build: QMAKE_* lines in qt.mk so Qt's native tools (moc, rcc, uic) also get hardening. Verified under guix: 495/495 real compiles hardened (remaining 36 are cmake/autoconf internal probes, which your grep already filters).
|
c185ff8 to
e1f8ef9
Compare
|
Patched qmake's Makefile.unix template so configure's bootstrap also gets hardening. Strace-verified under guix: 0 real build commands missing flags. |
06f1fbe to
7b83d9c
Compare
7b83d9c to
3258633
Compare
3258633 to
b11777b
Compare
Uh oh!
There was an error while loading. Please reload this page.