[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cross compiling coreutils to 32 bit
From: |
Assaf Gordon |
Subject: |
Re: Cross compiling coreutils to 32 bit |
Date: |
Wed, 14 Feb 2018 14:19:42 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hello,
On Wed, Feb 14, 2018 at 09:59:13AM +0200, Kevin Wilson wrote:
> I am trying to cross compile coreutils-8.27 to 32 bit on
> x86_64 machine under Fedora.
>
I would recommend to following:
First,
Install "multilib" support. In debian/ubuntu, the command is:
apt-get install gcc-multilib g++-multilib
With Fedora it should be something equivalent, see here:
https://www.cyberciti.biz/tips/compile-32bit-application-using-gcc-64-bit-linux.html
Then,
Assuming you are using gcc, use the following command:
./configure CPPFLAGS="-m32" LDFLAGS="-m32" TIME_T_32_BIT_OK=yes
make
The resulting binaries will then be 32-bit.
The TIME_T_32_BIT_OK is needed due to a recent change that checks
for 64-bit time_t variable.
HTH,
- assaf