mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 02:01:09 +02:00
Merge bitcoin/bitcoin#32584: depends: hard-code necessary c(xx)flags rather than setting them per-host
9954d6c833
depends: hard-code necessary c(xx)flags rather than setting them per-host (Cory Fields) Pull request description: The per-host flag variables hold platform-specific defaults that are ignored when flag environment variables are set, so it was wrong for them to contain -std options relied on by package definitions. Additionally, these flags (-pipe and -std=xx) will no longer be passed into the CMake build, meaning less duplication in the build summary. Pulled out of #31920. ACKs for top commit: achow101: ACK9954d6c833
ryanofsky: Code review ACK9954d6c833
. No changes since last review other than improving the commit message. Change overall makes sense because it deduplicates host definitions, stops dropping `-std` flags from package builds when custom CFLAGS/CXXFLAGS environment variables are set, and stops passing duplicate flags to cmake that have no effect. theuni: ACK9954d6c833
Tree-SHA512: 62a2a21b741893cf708ca71fb5f0626c30d52685c845f9016f428a5e38fc8515acd4bf2c83635d6505b63830d1c296472026ec3d341c8069f1e490a991b6b5ef
This commit is contained in:
@@ -8,9 +8,11 @@ $(1)_ar=$$($$($(1)_type)_AR)
|
||||
$(1)_ranlib=$$($$($(1)_type)_RANLIB)
|
||||
$(1)_nm=$$($$($(1)_type)_NM)
|
||||
$(1)_cflags=$$($$($(1)_type)_CFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_CFLAGS)
|
||||
$$($$($(1)_type)_$$(release_type)_CFLAGS) \
|
||||
-pipe -std=$(C_STANDARD)
|
||||
$(1)_cxxflags=$$($$($(1)_type)_CXXFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_CXXFLAGS)
|
||||
$$($$($(1)_type)_$$(release_type)_CXXFLAGS) \
|
||||
-pipe -std=$(CXX_STANDARD)
|
||||
$(1)_ldflags=$$($$($(1)_type)_LDFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_LDFLAGS) \
|
||||
-L$$($($(1)_type)_prefix)/lib
|
||||
|
@@ -60,8 +60,8 @@ darwin_CXX=$(clangxx_prog) --target=$(host) \
|
||||
-iwithsysroot/usr/include/c++/v1 \
|
||||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
||||
|
||||
darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION)
|
||||
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION)
|
||||
darwin_CFLAGS=-mmacos-version-min=$(OSX_MIN_VERSION)
|
||||
darwin_CXXFLAGS=-mmacos-version-min=$(OSX_MIN_VERSION)
|
||||
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
|
||||
|
||||
ifneq ($(build_os),darwin)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
freebsd_CFLAGS=
|
||||
freebsd_CXXFLAGS=
|
||||
|
||||
freebsd_release_CFLAGS=-O2
|
||||
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
linux_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
linux_CFLAGS=
|
||||
linux_CXXFLAGS=
|
||||
|
||||
ifneq ($(LTO),)
|
||||
linux_AR = $(host_toolchain)gcc-ar
|
||||
|
@@ -5,8 +5,8 @@ ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
|
||||
mingw32_CXX := $(host)-g++-posix
|
||||
endif
|
||||
|
||||
mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
mingw32_CFLAGS=
|
||||
mingw32_CXXFLAGS=
|
||||
|
||||
ifneq ($(LTO),)
|
||||
mingw32_AR = $(host_toolchain)gcc-ar
|
||||
|
@@ -1,5 +1,5 @@
|
||||
netbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
netbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
netbsd_CFLAGS=
|
||||
netbsd_CXXFLAGS=
|
||||
|
||||
ifneq ($(LTO),)
|
||||
netbsd_AR = $(host_toolchain)gcc-ar
|
||||
|
@@ -1,5 +1,5 @@
|
||||
openbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
openbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
openbsd_CFLAGS=
|
||||
openbsd_CXXFLAGS=
|
||||
|
||||
openbsd_release_CFLAGS=-O2
|
||||
openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS)
|
||||
|
Reference in New Issue
Block a user