Difference between revisions of "Packaging/32bit Applications"
From NixOS Wiki
(Add warning about the new wiki) |
m (rollback unauthorized mass edits) Tag: Rollback |
||
Line 1: | Line 1: | ||
− | |||
− | |||
== Building software with 32bit <tt>gcc</tt> == | == Building software with 32bit <tt>gcc</tt> == | ||
Latest revision as of 10:56, 6 April 2024
Building software with 32bit gcc
Question: I'm invoking gcc with -m32 and it fails to find `gnu/stubs-32.h`
Answer (clever): you want to use pkgsi686Linux
instead of pkgs, so things like pkgsi686Linux.stdenv.mkDerivation
or pkgsi686Linux.callPackage
then nix will give you 32bit everything[1]
Building software with both 32- and 64-bit executables
If a package wants to compile both 32/64-bit executables, you need a compiler with multilib support.
Nixpkgs provides multiStdenv.mkDerivation
that should be used instead stdenv.mkDerivation
.
This is equivalent to using gcc-multilib
in debian derivatives.