guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: i686-linux GCC package on x86_64


From: Mathieu Othacehe
Subject: Re: i686-linux GCC package on x86_64
Date: Fri, 04 Oct 2019 17:16:38 +0200
User-agent: mu4e 1.2.0; emacs 26.3

> Works for me to, but I'd like to write a package that depends on GCC 
> i686-linux.

You mean a package that uses a compiler able to generate code for
i686-linux? In that case you can have a look to (gnu packages firmware),
where "cross-gcc" packages are used (ovmf-aarch64 package for instance).

You would have to write something like:

--8<---------------cut here---------------start------------->8---
    (native-inputs
     `(,@(if (not (string-prefix? "i686" (%current-system)))
           `(("cross-gcc" ,(cross-gcc "i686-unknown-linux-gnu"))
             ("cross-binutils" ,(cross-binutils "i686-unknown-linux-gnu")))
           '())))
--8<---------------cut here---------------end--------------->8---

that uses the current gcc if you're already building on an i686 system,
or define and use a cross-gcc targeting i686 systems otherwise.

Mathieu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]