Hi Pierre,

Pierre Neidhardt <m...@ambrevar.xyz> skribis:

> Pierre Neidhardt <m...@ambrevar.xyz> writes:
>
>> Hi!
>>
>> I'm trying to define an i686-linux package of gcc.
>> Simply using the
>>
>> --8<---------------cut here---------------start------------->8---
>> #:system "i686-linux"
>> --8<---------------cut here---------------end--------------->8---
>>
>> results in a bunch of
>>
>> --8<---------------cut here---------------start------------->8---
>> configure: error: cannot run C compiled programs.
>> --8<---------------cut here---------------end--------------->8---
>>
>> errors.
>>
>>
>> However,
>>
>> --8<---------------cut here---------------start------------->8---
>> guix build --system=i686-linux -e '(@@ (gnu packages gcc) gcc-9)'
>> --8<---------------cut here---------------end--------------->8---
>>
>> works perfectly.
>>
>> (Note that since recently
>>
>>   guix build --system=i686-linux -e '(@@ (gnu packages gcc) gcc)'
>>
>> produces a hash error.)
>>
>> Any clue?
>
> Friendly ping! :)
>
> Mathieu, I think you've got experience with cross-compilation on Guix,
> any clue about this?

Note that this is not cross-compilation, and indeed, if you’re on
x86_64, you don’t need to cross-compile since you can natively run i686
code.

I think you can do something like:

  (define gcc/i686
    (package
      (inherit gcc)
      (arguments `(#:system "i686-linux"
                   ,@(package-arguments gcc)))))

and that should give you the i686-linux GCC package, regardless of what
platform you’re on (use with care!).

Is it what you tried?

Thanks,
Ludo’.

Reply via email to