diff options
author | laanwj <126646+laanwj@users.noreply.github.com> | 2022-06-16 22:08:50 +0200 |
---|---|---|
committer | laanwj <126646+laanwj@users.noreply.github.com> | 2022-06-16 23:53:48 +0200 |
commit | 874529665c1c326fc86fc0d0d6c3512fab087ab8 (patch) | |
tree | 7234673f81ae4177fd71ef75d071c3bb720fcf40 /depends/Makefile | |
parent | 7f2c983e1cfdb58b6f84eabe5ff6a16f143f39aa (diff) | |
parent | f7595f1354f4618436fdab232000dc152bff315a (diff) |
Merge bitcoin/bitcoin#22380: build: add and use C_STANDARD and CXX_STANDARD in depends
f7595f1354f4618436fdab232000dc152bff315a build: add and use CXX_STANDARD in depends (fanquake)
7e7b3e42fa98b584ae60513a6774037bf677b8ce build: add and use C_STANDARD in depends (fanquake)
Pull request description:
By explicitly setting a C standard version we avoid any potential for issues/differences in libraries that may come about due to C STD version, as well as avoid potentially being opted into newer code / features in libraries when compiler defaults change (i.e as of 11.0.0, Clang now defaults to gnu17 over gnu11).
This should be a no-op for our release builds, because it's just explicitly setting the default that is [already being used](https://github.com/fanquake/core-review/blob/master/compiler-defaults.md). However this is relevant for anyone building depends with a newer compiler.
I found [one broken `__STDC_VERSION__` check in the](https://github.com/miniupnp/miniupnp/pull/552) miniupnpc header.
At the same time, add `CXX_STANDARD` for setting our C++ standard, and use that over setting `-std=c++17` for cxx packages.
Guix builds:
```bash
```
ACKs for top commit:
dongcarl:
Code Review ACK f7595f1354f4618436fdab232000dc152bff315a
laanwj:
Code review ACK f7595f1354f4618436fdab232000dc152bff315a
Tree-SHA512: 9255190d91ba3de20762b1d6af35c59d64f3d77a52bbe9a3f1dfb6bcf16daef66054ebef96b58e7285cd01bf613e69a78bd5e8681c21293e254f23d1fa7b0f71
Diffstat (limited to 'depends/Makefile')
-rw-r--r-- | depends/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/depends/Makefile b/depends/Makefile index 76f84b1a34..5a1c472a15 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -45,6 +45,9 @@ MULTIPROCESS ?= LTO ?= FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources +C_STANDARD ?= c11 +CXX_STANDARD ?= c++17 + BUILD = $(shell ./config.guess) HOST ?= $(BUILD) PATCHES_PATH = $(BASEDIR)/patches |