linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: rodolfo <rodolfo@lesc.ufc.br>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Predefined Compiler Flag for CROSS_COMPILE in ELDK
Date: Thu, 08 May 2008 18:38:11 +0200	[thread overview]
Message-ID: <m24p98sqdo.fsf@ohwell.denx.de> (raw)
In-Reply-To: <8b6b0af3278e2fe8a9355b1e053e1419@lesc.ufc.br> (rodolfo@lesc.ufc.br's message of "Thu, 8 May 2008 08:46:17 -0300")

Hi Rodolfo,

> -mcpu is deprecated:
>
> HOSTCC  scripts/basic/fixdep
> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> scripts/basic/fixdep.c:1: error: bad value (405) for -mtune= switch
> make[1]: ** [scripts/basic/fixdep] Erro 1
> make: ** [scripts_basic] Erro 2

Uhu - HOSTCC is the native compiler, which very likely does not know
anything about 405 cpus...

> then I put -march=405 and give this errors:
>
> scripts/basic/fixdep.c:1: error: bad value (405) for -march= switch
> scripts/basic/fixdep.c:1: error: bad value (405) for -mtune= switch
> make[1]: ** [scripts/basic/fixdep] Erro 1
> make: ** [scripts_basic] Erro 2

Still, same problem - you want to use the flag for the cross compiler.

> See a piece of my Makefile:
>
> HOSTCC       = gcc
> HOSTCXX      = g++
> HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
> -march=405
> HOSTCXXFLAGS = -O2

Again, this is the host compiler.

> How can I do this?

If we are only talking about compiling a recent linux kernel, then the
easiest way is to simply override CFLAGS_KERNEL from the commandline,
i.e.:

make CFLAGS_KERNEL=-mcpu=405 uImage

If you want to check that this works, do a

make CFLAGS_KERNEL=-mcpu=405 V=1 uImage

and check the generated command lines.

Cheers
  Detlev

-- 
Alisa Sherer (AMD) suggested that consumer demand will not follow
faster clock speeds. Marketing might help with this problem, she
added.                                            -- 2004/02/20
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

      reply	other threads:[~2008-05-08 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28 11:27 Predefined Compiler Flag for CROSS_COMPILE in ELDK rodolfo
2008-04-30 16:59 ` Detlev Zundel
2008-05-08 11:46   ` rodolfo
2008-05-08 16:38     ` Detlev Zundel [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=m24p98sqdo.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=rodolfo@lesc.ufc.br \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).