Hi,

I wanted to reply to this email, but kept forgetting, sorry for that.

Stefan <stefan-g...@vodafonemail.de> writes:

> Hi Rutherther!
>
>> I think it's good idea to move away from C_INCLUDE_PATH,
>> LIBRARY_PATH for the toolchain libraries (glibc, stdlibc++, ...), but
>> what about other libraries? Those, as far as I can tell,
>> have to be provided by a search path, as they cannot be compiled inside
>> the toolchain. Or am I mistaken in this?
>
> These search paths stay.

I know, this was just introduction to need of cross vars to separate them.

>
>> And if this is true, I think it would be good to still keep
>> this CROSS_* convention
>
> For other libraries than the standard ones there will be no real problems, as 
> in Guix the build environments only provide the needed packages, so there 
> shouldn’t be any problems.
>
> For cross-compilers used by guix build --target=… these CROSS… variables 
> anyway collect the same paths, namely <package>/include and <package>/lib.  
> So whatever the name of these variables is, it makes no difference.
>
> I also think that there won’t be many clashes between include files from 
> packages for the host and include files from packages used with an embedded 
> cross-compiler.  I currently don’t see the real need.  Even if you install 
> several compilers into your profile, you certainly won’t install embedded 
> source code packages into your profile.  Or do you?  Even on “usual“ 
> Filesystem-Hierarchy-Standard systems no cross-compiler uses different 
> environment variables for include paths.

While I agree there might not be many of the clashes, there can be some.
That's why I think it's better to separate cross and normal compilers,
even better if different cross compiler versions were separate. I don't
think it's right restricting guix so that it cannot support use cases
where you use libraries for both native and cross compilation toolchain
from Guix itself.

While other distros don't have these env vars separated, other distros
package manager do not rely on env vars installed from system package
manager at all. They put the libraries
to standard locations, namely /lib, /include for native compiler,
and /usr/XXX/include, /usr/XXX/lib, where XXX is the target platform.
And the compilers will look only to these locations.
So they do have a separation, while Guix currently doesn't have that.
They even have separation for each gcc target,
not only native and cross compilation. Guix cannot use this as the
profile's path user makes is always different, that's why env vars are
introduced, so I don't think comparison like this with other distros is fair.
I've tried separating this when I was updating
the gcc arm none eabi, but it's probably the only one with separation
currently, the default --target uses, as you say, /lib, /include, which
is unfortunate in my view.

>
> But to be honest, I'm not really sure about this for embedded cross-compilers 
> yet.  Whatever I did myself so far was all fine without these CROSS… 
> variables.  So I’d like to first try without as far as possible.
>
>
> Bye
>
> Stefan

Regards
Rutherther

Reply via email to