All of lore.kernel.org
 help / color / mirror / Atom feed
* cross-compiling kernel using a 32-bit toolchain on a 64-bit machine
@ 2015-04-06 22:50 Mandeep Sandhu
  2015-04-07  0:27 ` John de la Garza
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mandeep Sandhu @ 2015-04-06 22:50 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I'm having trouble compiling my kernel using a 32-bit toolchain (for
ARM) on a 64-bit host (Ubuntu 14.10). The kernel version is 3.14.17.

I understand that 32-bit binaries require "ia32-libs" (or equivalent)
for compiling on 64-bit hosts. I installed the required packages
(lib32z1 lib32ncurses5 lib32bz2-1.0 for Ubuntu 14.10), but still keep
getting errors:

$ make CROSS_COMPILE=arm-none-linux-gnueabi- all
Makefile:616: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR:
-fstack-protector not supported by compiler
make: arm-none-linux-gnueabi-gcc: Command not found
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2

I've ensured that the PATH to the toolchain binaries is correct.

If I try to export CROSS_COMPILE to my environment, then too I get an
error (although it's for a different reason):

$ make all
Makefile:616: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR:
-fstack-protector not supported by compiler
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
gcc: error: unrecognized argument in option ?-mabi=aapcs-linux?
gcc: note: valid arguments to ?-mabi=? are: ms sysv
gcc: error: unrecognized command line option ?-mlittle-endian?
gcc: error: unrecognized command line option ?-mapcs?
gcc: error: unrecognized command line option ?-mno-sched-prolog?
gcc: error: unrecognized command line option ?-mno-thumb-interwork?
gcc: error: unrecognized command line option ?-mfpu=vfp?
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

It looks like make is starting a new shell which does not have either
PATH (1st case) or  CROSS_COMPILE (2nd case) set.

Any hints on how to get make to use the toolchain?

Thanks,
-mandeep

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-07 16:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-06 22:50 cross-compiling kernel using a 32-bit toolchain on a 64-bit machine Mandeep Sandhu
2015-04-07  0:27 ` John de la Garza
2015-04-07 15:59   ` Mandeep Sandhu
2015-04-07  3:10 ` Rock Lee
2015-04-07 16:04   ` Mandeep Sandhu
2015-04-07 16:15 ` Lad, Prabhakar
2015-04-07 16:24   ` Mandeep Sandhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.