Cross-compiling 32-bit make help needed

an incubator for software projects


Moderator: Forum moderators

Post Reply
User avatar
peebee
Posts: 1637
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 157 times
Been thanked: 714 times
Contact:

Cross-compiling 32-bit make help needed

Post by peebee »

Can anyone help?

Woof-CE kernels are built on Github
Github only provides 64-bit runners (hosts)
32-bit kernels built via Github Actions are 32-bit but the linux-sources produced contain 64-bit binaries

Woof-CE kernel kit has some (old) mechanisms for doing ARM cross-compiles and examples of config files for same.
However these do not seem to work for 32-bit x86 cross compiles

So......... is there a mechanism to pass to make a request that a 32-bit compile should be done?
By googling I have seen suggestions such as:
make ARCH=i386 CROSS_COMPILE=i686-linux-gnu-

but these don't work giving:
make ARCH=i386 CROSS_COMPILE=i686-linux-gnu- oldconfig
scripts/Kconfig.include:39: C compiler 'i686-linux-gnu-gcc' not found

Any ideas anybody??
Thanks

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

User avatar
Keef
Posts: 278
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 75 times

Re: Cross-compiling make help needed

Post by Keef »

Code: Select all

export CFLAGS=-m32

might do it, but possibly some 32 bit libs as well.

https://stackoverflow.com/questions/127 ... -gcc-cmake

User avatar
peebee
Posts: 1637
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 157 times
Been thanked: 714 times
Contact:

Re: Cross-compiling 32-bit make help needed

Post by peebee »

I have tried everything I can think of ........... and still get 64-bit binaries.

I'm attaching (remove .false.gz or open as text):
the kernel kit config file: build.conf
the kernel kit build script: build.sh
the Makefile - see lines 375 & 633 & 442
and a cut down log produced when attempting to build 32-bit kernel 6.1 at:
https://github.com/peabee/woof-CE/tree/crosstest

Search the log for 'scripts'

Is HOSTCC somehow not getting set to -m32 ?????

Any other advice? (thanks keef)

Attachments
cutdown.log.false.gz
(294.06 KiB) Downloaded 15 times
Makefile.false.gz
(66.06 KiB) Downloaded 14 times

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

ozsouth
Posts: 1570
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 241 times
Been thanked: 704 times

Re: Cross-compiling 32-bit make help needed

Post by ozsouth »

@peebee - Using my kerkit32, which works (pm'd to you), in my build.conf, I enable pae, but don't use SET_MAKE_COMMAND, as my build32.sh says "SET_MAKE_COMMAND is used for cross compiling ARM kernels".

User avatar
peebee
Posts: 1637
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 157 times
Been thanked: 714 times
Contact:

Re: Cross-compiling 32-bit make help needed

Post by peebee »

I found:
https://patchwork.kernel.org/project/li ... omium.org/

Which says:
CC: for building tools that run on the target machine
HOSTCC: for building tools that run on the build machine

and:
most tools are target tools, not host tools.

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

Post Reply

Return to “Development”