All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Illegal instruction when running some of the cross compiled binaries
Date: Tue, 11 Jan 2011 14:45:03 +0100	[thread overview]
Message-ID: <20110111144503.3bdf7fa4@surf> (raw)
In-Reply-To: <AANLkTi=0q8wUTjBSdVUv2KTVyxYc9NTSumE_+MrN4faf@mail.gmail.com>

Hello Divick,

On Tue, 11 Jan 2011 17:55:15 +0530
Divick Kishore <divick.kishore@gmail.com> wrote:

>     I have built a custom root filesystem using build root, but
> certain binaries (built with the packages selected during menuconfig)
> when run give "Illegal Instruction".
> 
> # sshd
> Illegal instruction
> 
> Having looked at the logs, the compiler flags used to build the binary
> seems fine (-mtune=arm920t -march=armv4t -mabi=aapcs-linux
> -msoft-float ) i.e. right for my H/W (ATMEL AT91RM9200).

During compilation yes, but at the link stage of sshd, the
-march=armv4t flag is missing. Therefore, some ARMv5-only code gets
added to the binary. Maybe we need to add -march=armv4t to the
TARGET_LDFLAGS, or some other trick. I haven't tested anything for the
moment, so feel free to experiment.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2011-01-11 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 12:25 [Buildroot] Illegal instruction when running some of the cross compiled binaries Divick Kishore
2011-01-11 13:45 ` Thomas Petazzoni [this message]

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=20110111144503.3bdf7fa4@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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.