linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Stefan Nickl <Stefan.Nickl@kontron.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: gcc for ppc/predefined macros
Date: Mon, 2 Feb 2004 11:49:39 -0700	[thread overview]
Message-ID: <20040202184939.GC932@smtp.west.cox.net> (raw)
In-Reply-To: <1075715340.19857.14.camel@lucy.pep-kaufbeuren.de>


On Mon, Feb 02, 2004 at 10:49:01AM +0100, Stefan Nickl wrote:

>
> I just had to find out very painfully that
> my cross-gcc-3.3.2 doesn't have __powerpc__
> as a predefined macro anymore:
>
> (SuSE-built-) gcc 2.95.3:
> .../powerpc-linux-cpp -dM ~/foo.h |grep -i pc
>
> #define powerpc 1
> #define __PPC__ 1
> #define PPC 1
> #define _ARCH_PPC 1
> #define __PPC 1
> #define __powerpc__ 1
> #define __powerpc 1
>
>
> (gentoo-crossdev-build-) gcc 3.3.2:
> .../powerpc-unknown-eabi-cpp -dM ~/foo.h |grep -i pc
>
> #define _ARCH_PPC 1
> #define __PPC 1
> #define PPC 1
> #define __PPC__ 1
>
> The kernel relies on __powerpc__ in some places,
> in fact, the serial console won't work anymore
> since the LCR gets setup incorrectly in
> serial_console_setup located in serial.c.

I belive the problem is that you did not compile your cross-compiler
correctly:
$ ppc_7xx-cpp -dM /tmp/foo.h  | grep pc
#define __powerpc__ 1
#define __powerpc 1
#define powerpc 1

Make sure you do --target=powerpc-foo-linux when configuring gcc.

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2004-02-02 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02  9:49 gcc for ppc/predefined macros Stefan Nickl
2004-02-02 18:49 ` Tom Rini [this message]
2004-02-05  9:22   ` Stefan Nickl

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=20040202184939.GC932@smtp.west.cox.net \
    --to=trini@kernel.crashing.org \
    --cc=Stefan.Nickl@kontron.com \
    --cc=linuxppc-embedded@lists.linuxppc.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 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).