From: Mikael Pettersson <mikpe@csd.uu.se>
To: Adrian Bunk <bunk@stusta.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.4.30-pre1] preliminary fixes for gcc-4.0
Date: Wed, 23 Feb 2005 22:33:09 +0100 [thread overview]
Message-ID: <16924.63125.283356.769192@alkaid.it.uu.se> (raw)
In-Reply-To: <20050223212559.GC3432@stusta.de>
Adrian Bunk writes:
> On Thu, Feb 10, 2005 at 04:28:58PM +0100, Mikael Pettersson wrote:
> > Here is a preliminary set of patches to allow gcc-4.0 (20050130)
> > to compile the 2.4.30-pre1 kernel. I make no claim that the patches
> > are complete, but they have been tested successfully on i386 (multiple
> > boxes), x86-64, and ppc32.
> >
> > The changes fall into these categories:
> >...
> > - Add -Wno-pointer-sign to silence lots of compiler warnings.
> >...
> > /Mikael
> >...
> > --- linux-2.4.30-pre1/arch/i386/Makefile 2004-11-17 18:36:41.000000000 +0100
> > +++ linux-2.4.30-pre1.gcc4-fixes-v5/arch/i386/Makefile 2005-02-10 14:35:01.000000000 +0100
> > @@ -98,6 +98,9 @@ endif
> > # due to the lack of sharing of stacklots.
> > CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
> >
> > +# disable pointer signedness warnings in gcc 4.0
> > +CFLAGS += $(call check_gcc,-Wno-pointer-sign,)
> > +
> > HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
> >
> > SUBDIRS += arch/i386/kernel arch/i386/mm arch/i386/lib
> > diff -rupN linux-2.4.30-pre1/arch/ppc/Makefile linux-2.4.30-pre1.gcc4-fixes-v5/arch/ppc/Makefile
> > --- linux-2.4.30-pre1/arch/ppc/Makefile 2004-04-14 20:22:20.000000000 +0200
> > +++ linux-2.4.30-pre1.gcc4-fixes-v5/arch/ppc/Makefile 2005-02-10 14:35:01.000000000 +0100
> > @@ -25,6 +25,11 @@ CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(
> > HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH)
> > CPP = $(CC) -E $(CFLAGS)
> >
> > +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
> > +
> > +# disable pointer signedness warnings in gcc 4.0
> > +CFLAGS += $(call check_gcc,-Wno-pointer-sign,)
> > +
> > ifdef CONFIG_4xx
> > CFLAGS := $(CFLAGS) -Wa,-m405
> > endif
> >...
> > --- linux-2.4.30-pre1/arch/x86_64/Makefile 2004-04-14 20:22:20.000000000 +0200
> > +++ linux-2.4.30-pre1.gcc4-fixes-v5/arch/x86_64/Makefile 2005-02-10 14:35:01.000000000 +0100
> > @@ -56,6 +56,9 @@ endif
> > # this is needed right now for the 32bit ioctl code
> > CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
> >
> > +# disable pointer signedness warnings in gcc 4.0
> > +CFLAGS += $(call check_gcc,-Wno-pointer-sign,)
> > +
> > ifdef CONFIG_MK8
> > CFLAGS += $(call check_gcc,-march=k8,)
> > endif
> >...
>
> Shouldn't the first part of these three patches (adding
> -Wno-pointer-sign to the main Makefile be enough)?
>
> That's also how it's handled in 2.6 .
No, because in 2.4 it's up to the arch Makefiles to define check_gcc
if they want it, and not all of them do. That's why I had to put the
CFLAGS adjustment in the arch Makefiles.
Maybe I should just unconditionally add check_gcc in the top Makefile
and nuke the ones in the arch Makefiles.
/Mikael
next prev parent reply other threads:[~2005-02-23 21:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-10 15:28 Mikael Pettersson
2005-02-23 21:25 ` Adrian Bunk
2005-02-23 21:33 ` Mikael Pettersson [this message]
[not found] <BFECAF9E178F144FAEF2BF4CE739C668024C279C@exmail1.se.axis.com>
2005-03-10 8:50 ` Mikael Starvik
2005-03-16 14:24 ` Mikael Starvik
2005-03-16 14:30 ` Mikael Pettersson
2005-03-10 9:51 Mikael Pettersson
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=16924.63125.283356.769192@alkaid.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®