build: Use {CFLAGS,CPPFLAGS,LDFLAGS}_FOR_BUILD for helper programs.

Authored by dkg on Jul 16 2019, 8:01 PM.

Description

build: Use {CFLAGS,CPPFLAGS,LDFLAGS}_FOR_BUILD for helper programs.

* src/Makefile.am: pass distinct build flags to CC_FOR_BUILD.

We don't want to use the standard CFLAGS, CPPFLAGS, and LDFLAGS for
build helper tools because when cross-compiling they might include
choices that only make sense for the platform we are aiming to build
for.

That said, the environment might offer standard build flags for
non-cross-built helper tools too. So we include those flags in the
right place here.

  • Debian-bug-id: #932213
  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
werner added a subscriber: werner.Jul 18 2019, 10:59 AM

I wonder why the flags can't go into CC_FOR_BUILD.

dkg added a comment.Jul 18 2019, 4:35 PM

CC_FOR_BUILD is defined in configure.ac as build system C compiler, not build system C compiler and flags.