On Wed, 2017-05-17 at 15:54 +0200, Martin Wilck wrote: > +# $(call TEST_CC_OPTION,option,fallback) > +# Test if the C compiler supports the option. > +# Evaluates to "option" if yes, and "fallback" otherwise. > +TEST_CC_OPTION = $(shell \ > + if $(CC) -o /dev/null -c "$(1)" -xc - <<<'int main(void){return 0;}' &>/dev/null; \ > + then \ > + echo "$(1)"; \ > + else \ > + echo "$(2)"; \ > + fi) Since '<<<' is nonstandard, please consider to use 'echo' and a pipe instead. See also http://pubs.opengroup.org/onlinepubs/9699919799/. > +STACKPROT = $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) Please consider to use ":=" instead of "=" such that TEST_CC_OPTION gets called once per "make" invocation instead of once per C file that is built. Thanks, Bart. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel