use HOST_{CC,CFLAGS} for icons generator#2144
Conversation
|
HOST_CC is for the cross-compiler, binary is run on the target system |
Is there any convention for this? I looked it up and both of these say |
As you pointed out, not really. From Debian: |
|
That’s why I propose a proper target for the native tools and let the distribution set the correct native compiler environment. |
|
The linux kernel also seems to use
Both cases will require the builder to know that cross-compilation requires some special steps. Since neither will work "automatically" I'd rather be explicit. |
|
android keeped the kernel terms, it seems consistent to me. |
|
Please refer to: https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html |
when cross compiling the icons generator need to be built and run on the host machine and not the target one. there isn't any widely agreed upon convention for this, but linux kernel uses `HOSTCC` so adopt that here. also drop LDFLAGS from generator, shouldn't really be needed. Closes: jarun#2142
|
Ok so gnu uses the same term to mean different thing than linux. We can go with the linux terms. |
|
@jarun this should be good to merge. |
|
So you decide to ignore what is the common practice ? |
Except that there is no common practice. Different projects use different vars for the same thing.
I see no benefit separating the header and the generator. If you build the generator with If you insist on doing it in two steps, you can still do it. You'd just target the header file instead of the generator: $ make O_NERD=1 CC=${host-cc} src/icons-generated-nerd.h
$ make O_NERD=1 CC=${cross-cc}But with an explicit host cc variable it becomes one step: |
build is native, and host is the machine where the binary will run. That is standard practice. Comparing this to the Linux kernel doesn’t make sense. |
when cross compiling the icons generator need to be built and run on the host machine and not the target one.
HOST_CCseems to be a somewhat common convention so use this and be explicit about the host vs target compiler.also drop LDFLAGS from generator.
Closes: #2142