[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18468 - NicolasPierron - nixpkgs/branches/stdenv-updates/pkgs/lib

Ludovic Courtès ludo at gnu.org
Fri Nov 20 15:13:24 CET 2009


Saluton!

Lluís Batlle <viriketo at gmail.com> writes:

> An important part of the system.nix expressions developed by Nicolas
> concerns the usage of nixpkgs on cross compiling.

OK.

However, whether an application is cross-compiled or not doesn’t change
the kind of information it needs.  In the cross-compilation case, it
just needs to be able to distinguish between the host and build
platforms.  That means that ‘builtins.currentSystem’ is not enough for
cross-compilation, obviously.

[...]

> For example, some arms and mips can arbitrarily deal with
> little or big endian.

Can it be changed at run time?  (I thought armel != arm and
mipsel != mips, hardware-wise.)

> Arms can run programs compiled with thumb instructions, instead of the
> non-thumb. For PCs, different processors have additional instruction
> sets, and "i686" no more became a full definition for the
> processor. Pentium 2, 3 and 4, fall into i686, although they have sse,
> sse2 and sse3.

glibc, mplayer, etc. all detect this at run time.  (In glibc 2.10, ELF
was even extended with ‘STT_IFUNC’ so that code for all ISA variants can
be compiled in and the right version is chosen by the dynamic linker.)

> Those details have a strong meaning when building the compiler for
> that platform.

For x86 I believe GCC won’t use SSE et al. unless explicitly told to do
so with ‘-msse’ or similar.

Thanks,
Ludo’.




More information about the nix-dev mailing list