Skip to content

Commit

Permalink
Merge #6384: backport: merge bitcoin#22380, bitcoin#25838, bitcoin#25917
Browse files Browse the repository at this point in the history
, bitcoin#26059, bitcoin#26578, bitcoin#27798, bitcoin#27676, bitcoin#27999, bitcoin#28337, bitcoin#28422, bitcoin#28630, bitcoin#28783, partial bitcoin#24866, bitcoin#25612 (toolchain backports: part 1)

d7cb92a merge bitcoin#28783: remove `-bind_at_load` usage (Kittywhiskers Van Gogh)
019c9dd partial bitcoin#25612: default to using GCC tool wrappers for LTO (with GCC) (Kittywhiskers Van Gogh)
9e0b935 partial bitcoin#24866: No longer need to hack the `PATH` variable in `config.site` (Kittywhiskers Van Gogh)
5dbc83b merge bitcoin#28630: update `LD64_VERSION` to 711 (Kittywhiskers Van Gogh)
b265352 merge bitcoin#28422: cctools 986, ld64 711 & libtapi 1300.0.6.5 (Kittywhiskers Van Gogh)
fe94154 merge bitcoin#28337: use Clang 15 for macOS cross-compilation (Kittywhiskers Van Gogh)
ba28141 ci: add missing `xorriso` `PACKAGES` entry in macOS environment (Kittywhiskers Van Gogh)
62b0213 merge bitcoin#27999: add macOS test for fixup_chains usage (Kittywhiskers Van Gogh)
be17509 merge bitcoin#27676: Bump minimum required runtime version and prepare for building with upstream LLVM (Kittywhiskers Van Gogh)
9f5d4b3 merge bitcoin#27798: modernize clang flags for Darwin (Kittywhiskers Van Gogh)
54c538d merge bitcoin#26578: install binutils, not binutils-gold in depends (Kittywhiskers Van Gogh)
d0aae2b merge bitcoin#26059: revert "Build depends/qt with our platform definition" (Kittywhiskers Van Gogh)
9d1cd62 merge bitcoin#25917: libnatpmp 07004b97cf691774efebe70404cf22201e4d330d (Kittywhiskers Van Gogh)
fff0f6b merge bitcoin#25838: Use `mkspecs/bitcoin-linux-g++` for all Linux hosts (Kittywhiskers Van Gogh)
8d51bcc merge bitcoin#22380: add and use C_STANDARD and CXX_STANDARD in depends (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on #6383
  * Dependency for #6385
  * [bitcoin#24866](bitcoin#24866) is partial because f3af4f7 alters the way `dsymutil`'s location is reported, which is relevant due to the build target `osx_debug` ([source](https://github.com/dashpay/dash/blob/3aa51d651597ecbdc3a0f16eb8bad39b5d4c1612/src/Makefile.am#L1025-L1026)) using `dsymutil` to generate flat dSYM bundles to ensure that stacktraces work as expected (introduced in [dash#3006](1807c47#diff-4cb884d03ebb901069e4ee5de5d02538c40dd9b39919c615d8eaa9d364bbbd77R668-R669))

    As-is, with the changes, aberrant behaviour is noticeable when running `configure` (see below), where `depends` defines `DSYMUTIL` as being included in the target directory of the `native_clang` package... despite Guix builds using `FORCE_USE_SYSTEM_CLANG` ([source](https://github.com/dashpay/dash/blame/3aa51d651597ecbdc3a0f16eb8bad39b5d4c1612/contrib/guix/libexec/build.sh#L206)), meaning, the `native_clang` is never staged in `depends` because the build environment natively has it.

    Attempting to override it in `build.sh` yielded no results.

    <details>

    <summary>Run:</summary>

    ```
    [...]
    checking whether dsymutil needs -flat... ./configure: line 36201: /dash/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-dsymutil: No such file or directory
    no

    checking that generated files are newer than configure... done
    [...]
    ```

    </details>

    Which eventually results in the build failing

    <details>

    <summary>Failure:</summary>

    ```
    make: Entering directory '/distsrc-base/distsrc-22.0.0-beta.1-79-gb284e4c7cd48-x86_64-apple-darwin/src'
    for i in dashd  dash-cli dash-tx dash-wallet test/test_dash  qt/dash-qt  ; do mkdir -p $i.dSYM/Contents/Resources/DWARF && /dash/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-dsymutil -o $i.dSYM/Contents/Resources/DWARF/$(basename $i) $i &> /dev/null ; done
    make: *** [Makefile:22468: osx_debug] Error 127
    make: Leaving directory '/distsrc-base/distsrc-22.0.0-beta.1-79-gb284e4c7cd48-x86_64-apple-darwin/src'
    ```

    </details>

    To avoid breakage, the commit overriding `DSYMUTIL` and subsequent changes building on it (portions of [bitcoin#25612](bitcoin#25612)) have been skipped.

  ## Breaking Changes

  * The minimum runtime version needed to run Dash Qt is now macOS 11 (Big Sur)

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK d7cb92a

Tree-SHA512: 28c9ea13adc80a00b501afca286bd0b97e14a272bb50f578df7ab1af6ee8139f563bc5d670f0bfe3632bfab769c8228a76b5bcc51cfb727a54e31ac0f9af7a97
  • Loading branch information
PastaPastaPasta committed Nov 14, 2024
2 parents c44ae90 + d7cb92a commit 2625984
Show file tree
Hide file tree
Showing 35 changed files with 176 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"

task:
name: 'macOS 10.12 [gui, no tests] [jammy]'
name: 'macOS 11.0 [gui, no tests] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:jammy
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ $(OSX_DMG): deploydir
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)

deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt
endif !BUILD_DARWIN
Expand Down
7 changes: 5 additions & 2 deletions ci/test/00_setup_env_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_macos_cross
export HOST=x86_64-apple-darwin
export PACKAGES="cmake libz-dev libtinfo5 python3-setuptools"
export PACKAGES="cmake libz-dev python3-setuptools xorriso"
export XCODE_VERSION=12.2
export XCODE_BUILD_ID=12B45b
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export GOAL="all deploy"
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --with-boost-process"

# False-positive warning is fixed with clang 17, remove this when that version
# can be used.
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --with-boost-process LDFLAGS=-Wno-error=unused-command-line-argument"
15 changes: 13 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ case $host in
;;
*)
AC_PATH_TOOL([DSYMUTIL], [dsymutil], dsymutil)
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([OTOOL], [otool], otool)
AC_PATH_PROGS([XORRISOFS], [xorrisofs], xorrisofs)

Expand Down Expand Up @@ -1047,7 +1047,7 @@ dnl "ad_strip" as the symbol for the entry point.
if test x$TARGET_OS = xdarwin; then
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,-fixup_chains]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [[$LDFLAG_WERROR]])
fi

AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
Expand Down Expand Up @@ -1955,6 +1955,17 @@ case ${OS} in
;;
esac

dnl An old hack similar to a98356fee to remove hard-coded
dnl bind_at_load flag from libtool
case $host in
*darwin*)
AC_MSG_RESULT([Removing -Wl,bind_at_load from libtool.])
sed < libtool > libtool-2 '/bind_at_load/d'
mv libtool-2 libtool
chmod 755 libtool
;;
esac

echo
echo "Options used to compile and link:"
echo " boost process = $with_boost_process"
Expand Down
9 changes: 4 additions & 5 deletions contrib/devtools/security-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,11 @@ def check_MACHO_NOUNDEFS(binary) -> bool:
'''
return binary.header.has(lief.MachO.HEADER_FLAGS.NOUNDEFS)

def check_MACHO_LAZY_BINDINGS(binary) -> bool:
def check_MACHO_FIXUP_CHAINS(binary) -> bool:
'''
Check for no lazy bindings.
We don't use or check for MH_BINDATLOAD. See #18295.
Check for use of chained fixups.
'''
return binary.dyld_info.lazy_bind == (0,0)
return binary.has_dyld_chained_fixups

def check_MACHO_Canary(binary) -> bool:
'''
Expand Down Expand Up @@ -214,8 +213,8 @@ def check_MACHO_control_flow(binary) -> bool:

BASE_MACHO = [
('NOUNDEFS', check_MACHO_NOUNDEFS),
('LAZY_BINDINGS', check_MACHO_LAZY_BINDINGS),
('Canary', check_MACHO_Canary),
('FIXUP_CHAINS', check_MACHO_FIXUP_CHAINS),
]

CHECKS = {
Expand Down
8 changes: 7 additions & 1 deletion contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def check_MACHO_libraries(binary) -> bool:
return ok

def check_MACHO_min_os(binary) -> bool:
if binary.build_version.minos == [10,15,0]:
if binary.build_version.minos == [11,0,0]:
return True
return False

Expand All @@ -251,6 +251,11 @@ def check_MACHO_sdk(binary) -> bool:
return True
return False

def check_MACHO_ld64(binary) -> bool:
if binary.build_version.tools[0].version == [711, 0, 0]:
return True
return False

def check_PE_libraries(binary) -> bool:
ok: bool = True
for dylib in binary.libraries:
Expand Down Expand Up @@ -290,6 +295,7 @@ def check_ELF_ABI(binary) -> bool:
('DYNAMIC_LIBRARIES', check_MACHO_libraries),
('MIN_OS', check_MACHO_min_os),
('SDK', check_MACHO_sdk),
('LD64', check_MACHO_ld64),
],
lief.EXE_FORMATS.PE: [
('DYNAMIC_LIBRARIES', check_PE_libraries),
Expand Down
38 changes: 20 additions & 18 deletions contrib/devtools/test-security-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,29 +119,31 @@ def test_MACHO(self):
arch = get_arch(cc, source, executable)

if arch == lief.ARCHITECTURES.X86:
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS Canary PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']),
(1, executable+': failed LAZY_BINDINGS PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']),
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-no_fixup_chains']),
(1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-fixup_chains']),
(1, executable+': failed NOUNDEFS Canary PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all', '-Wl,-fixup_chains']),
(1, executable+': failed NOUNDEFS PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']),
(1, executable+': failed NOUNDEFS PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']),
(1, executable+': failed PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']),
(1, executable+': failed PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
(1, executable+': failed PIE'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
(0, ''))
else:
# arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS'))
self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all']),
(1, executable+': failed LAZY_BINDINGS'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-bind_at_load','-fstack-protector-all']),
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-no_fixup_chains']),
(1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-fixup_chains']),
(1, executable+': failed NOUNDEFS Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']),
(1, executable+': failed NOUNDEFS'))
self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-Wl,-fixup_chains']),
(0, ''))


Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/test-symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_MACHO(self):
}
''')

self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,10.15', '-Wl,11.4']),
self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,11.0', '-Wl,11.4']),
(1, f'{executable}: failed SDK'))

def test_PE(self):
Expand Down
1 change: 0 additions & 1 deletion contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
x86_64_linux_RANLIB=x86_64-linux-gnu-gcc-ranlib \
x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
x86_64_linux_STRIP=x86_64-linux-gnu-strip \
qt_config_opts_x86_64_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
FORCE_USE_SYSTEM_CLANG=1


Expand Down
2 changes: 1 addition & 1 deletion contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ inspecting signatures in Mach-O binaries.")
(list ;; Native GCC 11 toolchain
gcc-toolchain-11
binutils
clang-toolchain-10
clang-toolchain-15
python-signapple
xorriso))
(else '())))))
2 changes: 1 addition & 1 deletion contrib/macdeploy/macdeployqtplus
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]:
return libraries

def runInstallNameTool(action: str, *args):
installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool")
installnametoolbin=os.getenv("INSTALL_NAME_TOOL", "install_name_tool")
run([installnametoolbin, "-"+action] + list(args), check=True)

def changeInstallName(oldName: str, newName: str, binaryPath: str, verbose: int):
Expand Down
5 changes: 5 additions & 0 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ MULTIPROCESS ?=
LTO ?=
FALLBACK_DOWNLOAD_PATH ?= http://dash-depends-sources.s3-website-us-west-2.amazonaws.com

C_STANDARD ?= c11
CXX_STANDARD ?= c++17

BUILD = $(shell ./config.guess)
HOST ?= $(BUILD)
PATCHES_PATH = $(BASEDIR)/patches
Expand Down Expand Up @@ -223,6 +226,8 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
-e 's|@RANLIB@|$(host_RANLIB)|' \
-e 's|@NM@|$(host_NM)|' \
-e 's|@STRIP@|$(host_STRIP)|' \
-e 's|@OTOOL@|$(host_OTOOL)|' \
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
Expand Down
6 changes: 4 additions & 2 deletions depends/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The paths are automatically configured and no other options are needed unless ta

#### For macOS cross compilation

sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools libtinfo5 xorriso
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools xorriso

Note: You must obtain the macOS SDK before proceeding with a cross-compile.
Under the depends directory, create a subdirectory named `SDKs`.
Expand All @@ -62,7 +62,7 @@ For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-ex

Common linux dependencies:

sudo apt-get install make automake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch bison
sudo apt-get install make automake curl g++-multilib libtool binutils bsdmainutils pkg-config python3 patch bison

For linux ARM cross compilation:

Expand Down Expand Up @@ -103,6 +103,8 @@ The following can be set when running make: `make FOO=bar`
- `BASE_CACHE`: Built packages will be placed here
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++17`.
- `NO_QT`: Don't download/build/cache Qt and its dependencies
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
Expand Down
2 changes: 0 additions & 2 deletions depends/builders/default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ default_build_TAR = tar
default_build_RANLIB = ranlib
default_build_STRIP = strip
default_build_NM = nm
default_build_OTOOL = otool
default_build_INSTALL_NAME_TOOL = install_name_tool

define add_build_tool_func
build_$(build_os)_$1 ?= $$(default_build_$1)
Expand Down
17 changes: 17 additions & 0 deletions depends/config.site.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ if test -n "@NM@"; then
ac_cv_path_ac_pt_NM="${NM}"
fi

if test -n "@STRIP@"; then
STRIP="@STRIP@"
ac_cv_path_ac_pt_STRIP="${STRIP}"
fi

if test "@host_os@" = darwin; then
if test -n "@OTOOL@"; then
OTOOL="@OTOOL@"
ac_cv_path_ac_pt_OTOOL="${OTOOL}"
fi

if test -n "@INSTALL_NAME_TOOL@"; then
INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
ac_cv_path_ac_pt_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
fi
fi

if test -n "@debug@"; then
enable_reduce_exports=no
fi
Expand Down
3 changes: 3 additions & 0 deletions depends/hosts/android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
endif

android_CFLAGS=-std=$(C_STANDARD)
android_CXXFLAGS=-std=$(CXX_STANDARD)

ifneq ($(LTO),)
android_CFLAGS += -flto
android_LDFLAGS += -flto
Expand Down
Loading

0 comments on commit 2625984

Please sign in to comment.