All of lore.kernel.org
 help / color / mirror / Atom feed
From: rocklee_104@outlook.com (Rock Lee)
To: kernelnewbies@lists.kernelnewbies.org
Subject: cross-compiling kernel using a 32-bit toolchain on a 64-bit machine
Date: Tue, 7 Apr 2015 11:10:07 +0800	[thread overview]
Message-ID: <BLU437-SMTP5550BE083180D1466A2789CFFD0@phx.gbl> (raw)
In-Reply-To: <CAC+QLdSkHNNjWR63dLt4X6ams1mhOBaHtVhLKAnB-qxQ7Rs=fg@mail.gmail.com>



On 2015/4/7 6:50, Mandeep Sandhu wrote:
> 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
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
Edit .config and set  CONFIG_CROSS_COMPILE to the path where your cross 
compiler is located.

  parent reply	other threads:[~2015-04-07  3:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-04-07 16:04   ` Mandeep Sandhu
2015-04-07 16:15 ` Lad, Prabhakar
2015-04-07 16:24   ` Mandeep Sandhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU437-SMTP5550BE083180D1466A2789CFFD0@phx.gbl \
    --to=rocklee_104@outlook.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.