[Bug ada/56271] GCC build errors when building ada and using LDFLAGS

k2k at narod dot ru gcc-bugzilla@gcc.gnu.org
Wed Feb 20 21:29:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56271

--- Comment #4 from Karlson2k <k2k at narod dot ru> 2013-02-20 21:29:06 UTC ---
While this fix is OK in most cases, there is more correct fix.
'filter-out' use first argument as space separated list. Consider that
WARN_CFLAGS is "-Wall -pedantic" (including double quotes). If any other
variable has same words, for example CFLAGS was set to "-O3 -pedantic", that
those words will be filtered out with quotes ( -pedantic" ) and 'make' will
lose opening or closing quote.
Better to use $(subst $(WARN_CFLAGS),,$(FLAGS_TO_PASS)) as it will replace
whole string, not word by word.



More information about the Gcc-bugs mailing list