All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Dimitrov <picmaster@mail.bg>
To: Matt Madison <matt@madison.systems>
Cc: meta-freescale@yoctoproject.org, ad me <adolphs@gmail.com>
Subject: Re: Yocto dizzy version 1.7.1 cross compiling meta-toolchain BROKEN for weeks now!
Date: Tue, 31 Mar 2015 18:40:47 +0300	[thread overview]
Message-ID: <551ABFFF.5050508@mail.bg> (raw)
In-Reply-To: <CAGgRHJpJ4kWeZBN+_6m_Xbv5aGNRFL3Z8h5cg5o+6mhfD7CRDA@mail.gmail.com>

Hi Matt, others,

On 03/31/2015 05:46 PM, Matt Madison wrote:
> On Tue, Mar 31, 2015 at 7:26 AM, ad me <adolphs@gmail.com> wrote:
>>
>> On Mar 31, 2015 5:19 AM, "Matt Madison" <matt@madison.systems> wrote:
> [...]
>>> You probably aren't invoking the compiler with the set of command-line
>>> options you need to get the desired output.  See the definition of the
>>> CC environment variable in the environment-setup script in the SDK, and
>>> make sure you use the same set of flags to invoke gcc.
>>>
>>> -Matt
>>
>> Please see the step by step in the document attached/linked.
>> The same one you highlighted on.
>>
>> I source this script just before invoking the compiler. Which means the CC
>> parameters are passed in as shown.
>>
>> Unless if you are suggesting that doing a "source" of the environment script
>> is not enough?
>>
>> If so, then I would not be able to invoke the correct compiler as the PATH
>> to it is setup by the same environment script I source.
>
>
> Sourcing the environment script is not enough; as I said, you have to
> run the compiler with the right set of options.
>
> So instead of:
>
> arm-poky-linux-gnueabi-gcc hello_arm_world.c
>
> You could do:
>
> $CC hello_arm_world.c
>
> to use the CC environment variable directly to invoke the compiler
> with the options you need.
>
> -Matt

That was a good remark. I just checked a Makefile I've written for a 
customer project, here's how I use gcc for the cross-compiled recipe:

CC=$(CROSS_COMPILE)gcc

This works for me both in Yocto builds and during stand-alone 
development with "whatever cross-toolchain is around".

Regards,
Nikolay


      parent reply	other threads:[~2015-03-31 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  7:21 Yocto dizzy version 1.7.1 cross compiling meta-toolchain BROKEN for weeks now! ad me
2015-03-31 12:19 ` Matt Madison
2015-03-31 14:26   ` ad me
2015-03-31 14:46     ` Matt Madison
2015-03-31 15:02       ` ad me
2015-03-31 15:26         ` ad me
2015-03-31 15:40       ` Nikolay Dimitrov [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=551ABFFF.5050508@mail.bg \
    --to=picmaster@mail.bg \
    --cc=adolphs@gmail.com \
    --cc=matt@madison.systems \
    --cc=meta-freescale@yoctoproject.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.