-
Notifications
You must be signed in to change notification settings - Fork 37.7k
depends: default to using GCC tool wrappers for LTO (with GCC) #25612
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
Conversation
Concept ACK. |
Are |
Guix builds on
|
Guix builds on
|
GUIX hashes x86:
arm64:
|
f060884
to
2bb4c3b
Compare
Rebased, and changed the approach here, so we are no-longer modifying defaults, or need to touch configure. |
Wrt this new approach, why these 3 hosts only are modified? What about other hosts? |
The other HOSTS are all using Clang. |
Guix builds on
|
Guix builds on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the following diff:
--- a/configure.ac
+++ b/configure.ac
@@ -2049,5 +2049,6 @@ echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPP
echo " CXX = $CXX"
echo " CXXFLAGS = $LTO_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CORE_CXXFLAGS $CXXFLAGS"
echo " LDFLAGS = $LTO_LDFLAGS $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
+echo " AR = $AR"
echo " ARFLAGS = $ARFLAGS"
echo
it is easy to see the wrong AR
variable value:
...
LTO = yes
target os = mingw32
build os = linux-gnu
CC = /usr/bin/ccache x86_64-w64-mingw32-gcc
CFLAGS = -pthread -pipe -std=c11 -flto -O2
CPPFLAGS = -fmacro-prefix-map=$(abs_top_srcdir)=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DHAVE_BUILD_INFO -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_FILE_OFFSET_BITS=64 -DPROVIDE_FUZZ_MAIN_FUNCTION -I/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/include/
CXX = /usr/bin/ccache x86_64-w64-mingw32-g++-posix -std=c++17
CXXFLAGS = -flto -fdebug-prefix-map=$(abs_top_srcdir)=. -fstack-reuse=none -Wstack-protector -fstack-protector-all -fcf-protection=full -fno-extended-identifiers -pipe -std=c++17 -flto -O2
LDFLAGS = -flto -lpthread -Wl,--enable-reloc-section -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -pie -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1 -flto -L/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/lib
AR = /usr/bin/x86_64-w64-mingw32-ar
ARFLAGS = cr
Suggesting to rebase this branch on top of the https://github.com/hebasto/bitcoin/commits/220718-pathtool.
2bb4c3b
to
7cd8ea3
Compare
See the `AC_PATH_TOOL` macro implementation.
This improves support for LTO by using gcc wrappers for ar, nm, ranlib, that correctly setup plugin arguments for LTO. Other HOSTS are using clang.
7cd8ea3
to
658685a
Compare
Code Review ACK 658685a |
Guix builds on
|
Guix builds on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 658685a
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 658685a
my hashes match hebasto's
Guix builds
|
…LTO (with GCC) 658685a depends: default to using GCC tool wrappers (with GCC) (fanquake) 6fdc13c build: Fix autoconf variable names for tools found by `AC_PATH_TOOL` (Hennadii Stepanov) Pull request description: This improves support for LTO by using gcc wrappers for `ar`, `nm`, `ranlib`, that correctly setup plugin arguments for LTO, when using GCC. Other HOSTS are using clang. Portion of bitcoin#25391. Guix Build (x86_64): ```bash ``` Guix Build (arm64): ```bash ``` ACKs for top commit: dongcarl: Code Review ACK 658685a hebasto: ACK 658685a jarolrod: ACK 658685a Tree-SHA512: 28d6127c118f74336c97e2523117f8a0d11b32cd565124cd4052baeb7cc53e71909d3037cb080d996ae4e3ce600326fced37ee36adcc53d839ba7dd7974ebcd2
This improves support for LTO by using gcc wrappers for
ar
,nm
,ranlib
,that correctly setup plugin arguments for LTO, when using GCC.
Other HOSTS are using clang.
Portion of #25391.
Guix Build (x86_64):
Guix Build (arm64):