dependency environment issue
Closed this issue · 4 comments
hey,
this is working for host-toolchain
(compat), but not for target-toolchain
(cross):
depends:
- environment:
CXXFLAGS: "$CXXFLAGS something"
depends:
- libs....
I guess this issue is for the basement project, isn't it?
The culprit looks to be that recipes/devel/cross-toolchain.yaml
sets a fixed CXXFLAGS
that is picked up by every package that uses the tool. Because the variable is defined by the tool environment, it overrides any inherited value of CXXFLAGS
. In contrast, the host compat toolchain does not define any CXXFLAGS
so you can set it freely.
AFAICT we have no provisions in the recipes to inject CXXFLAGS for dependencies that use a cross-toolchain.
I guess this issue is for the basement project, isn't it?
Not sure, because of:
AFAICT we have no provisions in the recipes to inject CXXFLAGS for dependencies that use a cross-toolchain.
so maybe we need a way to inject environment stuff? the cross toolchain does not have the -fPIC
flag, but i want to build python3 with something like this:
depends:
- environment:
BASEMENT_LIBS: "static"
CXXFLAGS: "$CXXFLAGS -fPIC"
depends:
- libs....
i realized that my use-case was wrong by design. so i do not need this feature (request) anymore. i guess we could close this ticket, if u don't think, that this would be a great new feature 😉
The problem is not that Bob lacks a feature but the handling of the C/CXX/LD-FLAGS in the basement project. They are defined by the toolchain and cannot be overridden. I'll move the issue there because we should rework that.