Re: Cross compiling coreutils to 32 bit
Hi Assaf, Thanks! This worked for me IB On Wed, Feb 14, 2018 at 11:19 PM, Assaf Gordonwrote: > 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
Re: Cross compiling coreutils to 32 bit
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
Cross compiling coreutils to 32 bit
Hi, I am trying to cross compile coreutils-8.27 to 32 bit on x86_64 machine under Fedora. What I am running is: untar the tar file. ./configure --target=i686-pc-linux-gn and then "make". It builds succesfully. However, when I am runing: file src/stty I am getting: src/stty: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), . ... And likewise for all other generated binaries under src. I would expect that the generated binary will be 32 bits, as I am trying to cross compile to 32 bits. I also tried with to play with: ./configure --host= but got the same. What am I doing wrong ? it could be that I am missing something trivial? Regards, KV