Browse Source
Don't let make pollute subprojects' environment with our own `CFLAGS`, which are quite strict because that breaks at least libwally-core: ```sh $ ./configure ... $ CFLAGS=whatever_this_is_irrelevant make ... cd external/libwally-core-build && ../libwally-core/configure ... ... CFLAGS = -DBINTOPKGLIBEXECDIR="\"../libexec/c-lightning\"" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -std=gnu11 -g -fstack-protector -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/libbacktrace-build -I . -I/usr/local/include -DCCAN_TAKE_DEBUG=1 -DCCAN_TAL_DEBUG=1 -DCCAN_JSON_OUT_DEBUG=1 -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DBUILD_ELEMENTS=1 -W -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings -fvisibility=hidden -O3 ... In file included from ../../libwally-core/src/base58.c:4: ../../libwally-core/src/ccan/ccan/endian/endian.h:71:24: error: unused function 'bswap_16' [-Werror,-Wunused-function] static inline uint16_t bswap_16(uint16_t val) ^ ``` If `CFLAGS` is set in its environment, then `make` would export our own `CFLAGS` to any subprocesses it starts, which means subprojects would inherit our `CFLAGS="-Wall -Werror"` in their environments. GNU Make's documentation: https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html#Variables_002fRecursion > make exports a variable only if it is either defined in the environment initially... Example: ```make A = x default: echo $$A ``` then: ```sh $ make # prints nothing, A is not exported to the subprocess $ A=y make # prints "x", our A=x is exported to the subprocess ``` Changelog-Nonetravis-debug
Vasil Dimov
5 years ago
committed by
Rusty Russell
1 changed files with 6 additions and 0 deletions
Loading…
Reference in new issue