aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
Diffstat (limited to 'depends')
-rw-r--r--depends/README.md2
-rw-r--r--depends/builders/darwin.mk4
-rw-r--r--depends/config.site.in4
-rw-r--r--depends/funcs.mk6
-rw-r--r--depends/hosts/android.mk5
-rw-r--r--depends/hosts/darwin.mk19
-rw-r--r--depends/hosts/freebsd.mk6
-rw-r--r--depends/hosts/linux.mk4
-rw-r--r--depends/hosts/mingw32.mk4
-rw-r--r--depends/hosts/netbsd.mk4
-rw-r--r--depends/hosts/openbsd.mk6
11 files changed, 15 insertions, 49 deletions
diff --git a/depends/README.md b/depends/README.md
index a33037b6a6..a8dfc83e3b 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -120,7 +120,7 @@ The following can be set when running make: `make FOO=bar`
- `LOG`: Use file-based logging for individual packages. During a package build its log file
resides in the `depends` directory, and the log file is printed out automatically in case
of build error. After successful build log files are moved along with package archives
-- `LTO`: Use LTO when building packages.
+- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS.
- `NO_HARDEN=1`: Don't use hardening options when building packages
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk
index 8ed82b276d..eb64c97f64 100644
--- a/depends/builders/darwin.mk
+++ b/depends/builders/darwin.mk
@@ -11,8 +11,8 @@ build_darwin_SHA256SUM=shasum -a 256
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
#darwin host on darwin builder. overrides darwin host preferences.
-darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path)
-darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path)
+darwin_CC=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path)
+darwin_CXX:=$(shell xcrun -f clang++) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path)
darwin_AR:=$(shell xcrun -f ar)
darwin_RANLIB:=$(shell xcrun -f ranlib)
darwin_STRIP:=$(shell xcrun -f strip)
diff --git a/depends/config.site.in b/depends/config.site.in
index 9bc599e7cd..29b2a67ed0 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -78,10 +78,6 @@ if test "@host_os@" = darwin; then
BREW=no
fi
-if test -z "$enable_lto" && test -n "@lto@"; then
- enable_lto=yes
-fi
-
if test -z "$enable_hardening" && test -n "@no_harden@"; then
enable_hardening=no
fi
diff --git a/depends/funcs.mk b/depends/funcs.mk
index 987be4e611..ce87aa579f 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -139,9 +139,9 @@ $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
-$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
-$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
-$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
+$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
+$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
+$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
# Setting a --build type that differs from --host will explicitly enable
# cross-compilation mode. Note that --build defaults to the output of
diff --git a/depends/hosts/android.mk b/depends/hosts/android.mk
index b53966dcf8..a1c8c56dba 100644
--- a/depends/hosts/android.mk
+++ b/depends/hosts/android.mk
@@ -9,11 +9,6 @@ endif
android_CFLAGS=-std=$(C_STANDARD)
android_CXXFLAGS=-std=$(CXX_STANDARD)
-ifneq ($(LTO),)
-android_CFLAGS += -flto
-android_LDFLAGS += -flto
-endif
-
android_AR=$(ANDROID_TOOLCHAIN_BIN)/llvm-ar
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/llvm-ranlib
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index a89c82e408..b94ac7d56f 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -79,28 +79,27 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH \
- $(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
- -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
+ $(clang_prog) --target=$(host) \
+ -B$(build_prefix)/bin \
-isysroot$(OSX_SDK) -nostdlibinc \
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH \
- $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
- -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
+ $(clangxx_prog) --target=$(host) \
+ -B$(build_prefix)/bin \
-isysroot$(OSX_SDK) -nostdlibinc \
-iwithsysroot/usr/include/c++/v1 \
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
-darwin_CFLAGS=-pipe -std=$(C_STANDARD)
-darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
+darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
-ifneq ($(LTO),)
-darwin_CFLAGS += -flto
-darwin_CXXFLAGS += -flto
-darwin_LDFLAGS += -flto
+ifneq ($(build_os),darwin)
+darwin_CFLAGS += -mlinker-version=$(LD64_VERSION)
+darwin_CXXFLAGS += -mlinker-version=$(LD64_VERSION)
endif
darwin_release_CFLAGS=-O2
diff --git a/depends/hosts/freebsd.mk b/depends/hosts/freebsd.mk
index 5351d0b900..055097b03d 100644
--- a/depends/hosts/freebsd.mk
+++ b/depends/hosts/freebsd.mk
@@ -1,12 +1,6 @@
freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
-ifneq ($(LTO),)
-freebsd_CFLAGS += -flto
-freebsd_CXXFLAGS += -flto
-freebsd_LDFLAGS += -flto
-endif
-
freebsd_release_CFLAGS=-O2
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk
index 1f33640c66..8be23be57d 100644
--- a/depends/hosts/linux.mk
+++ b/depends/hosts/linux.mk
@@ -2,10 +2,6 @@ linux_CFLAGS=-pipe -std=$(C_STANDARD)
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
ifneq ($(LTO),)
-linux_CFLAGS += -flto
-linux_CXXFLAGS += -flto
-linux_LDFLAGS += -flto
-
linux_AR = $(host_toolchain)gcc-ar
linux_NM = $(host_toolchain)gcc-nm
linux_RANLIB = $(host_toolchain)gcc-ranlib
diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk
index fc1cc1afbe..15aa7cd25a 100644
--- a/depends/hosts/mingw32.mk
+++ b/depends/hosts/mingw32.mk
@@ -6,10 +6,6 @@ mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
ifneq ($(LTO),)
-mingw32_CFLAGS += -flto
-mingw32_CXXFLAGS += -flto
-mingw32_LDFLAGS += -flto
-
mingw32_AR = $(host_toolchain)gcc-ar
mingw32_NM = $(host_toolchain)gcc-nm
mingw32_RANLIB = $(host_toolchain)gcc-ranlib
diff --git a/depends/hosts/netbsd.mk b/depends/hosts/netbsd.mk
index 14121dca20..f33b2d2889 100644
--- a/depends/hosts/netbsd.mk
+++ b/depends/hosts/netbsd.mk
@@ -2,10 +2,6 @@ netbsd_CFLAGS=-pipe -std=$(C_STANDARD)
netbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
ifneq ($(LTO),)
-netbsd_CFLAGS += -flto
-netbsd_CXXFLAGS += -flto
-netbsd_LDFLAGS += -flto
-
netbsd_AR = $(host_toolchain)gcc-ar
netbsd_NM = $(host_toolchain)gcc-nm
netbsd_RANLIB = $(host_toolchain)gcc-ranlib
diff --git a/depends/hosts/openbsd.mk b/depends/hosts/openbsd.mk
index d330e94d2e..bdd36dc9b3 100644
--- a/depends/hosts/openbsd.mk
+++ b/depends/hosts/openbsd.mk
@@ -1,12 +1,6 @@
openbsd_CFLAGS=-pipe -std=$(C_STANDARD)
openbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
-ifneq ($(LTO),)
-openbsd_CFLAGS += -flto
-openbsd_CXXFLAGS += -flto
-openbsd_LDFLAGS += -flto
-endif
-
openbsd_release_CFLAGS=-O2
openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS)