On Sat, Jan 12, 2019 at 10:27 PM Helmut Grohne <hel...@subdivi.de> wrote:

> We ask meson to include -DDEFINED_VIA_CFLAGS via the CFLAGS environment
> variable and it says that it is appending the flag. However, when
> running ninja, we see that the flag goes missing. When dropping the
> --cross-file flag, the flag is correctly propagated. I fact, all
> environment flags (LDFLAGS, CPPFLAGS, ...) go missing.

This is not really a bug in Meson, it is how things should work by
design. All arguments used for cross compilation come from the cross
file only. Envvars are not used for cross compilation, only native
compilation.

I have attached an updated version of the debcrossgen script that
reads the envvars and puts them in the cross file in the proper form.
Can you test if it fixes the issue for you? Note that the script must
be run in the build environment so that CPPFLAGS and all the rest of
the envvars are set to the values used in the final compilation.

Attachment: debcrossgen
Description: Binary data

Reply via email to