This is mainly targeted to the crates using rust-cc, where we want to apply system-wide compiler flags when invoking the compiler. cc supports CFLAGS and CXXFLAGS, but we never set those.
Defining that per project is not possible, as we have no way to inherit any build context from a dependency package.
Possibly also affects: bindgen, cxx, any other crate that invokes the C/C++ compiler and passes the CFLAGSS
You can't see the compiler command cc invokes, so verifying the effect of the change on an arbitrary rust pkg is actually hard. At least I found that %cargo_build -- -vv is able to pass through the output of build.rs, so I did verify that it fixes the flags for rhbz#2028895/rhbz#2028900.
I also confirmed that the variable exported before calling %cargo_build takes precedence over the [env] in a cargo config, so we are still able to override the values.
I did not test if that breaks anything. I guess creating a copr project and sending everything that depends on the aforementioned crates for rebuild would be sufficient; let me know if that is necessary.
This is mainly targeted to the crates using
rust-cc
, where we want to apply system-wide compiler flags when invoking the compiler.cc
supports CFLAGS and CXXFLAGS, but we never set those.Defining that per project is not possible, as we have no way to inherit any build context from a dependency package.
Possibly also affects:
bindgen
,cxx
, any other crate that invokes the C/C++ compiler and passes the CFLAGSSYou can't see the compiler command
cc
invokes, so verifying the effect of the change on an arbitrary rust pkg is actually hard. At least I found that%cargo_build -- -vv
is able to pass through the output of build.rs, so I did verify that it fixes the flags for rhbz#2028895/rhbz#2028900.I also confirmed that the variable exported before calling
%cargo_build
takes precedence over the[env]
in a cargo config, so we are still able to override the values.I did not test if that breaks anything. I guess creating a copr project and sending everything that depends on the aforementioned crates for rebuild would be sufficient; let me know if that is necessary.