public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Andi Kleen <ak@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: unify x86 Makefile(s)
Date: Sat, 29 Dec 2007 09:07:34 +0100	[thread overview]
Message-ID: <20071229080734.GA16931@uranus.ravnborg.org> (raw)
In-Reply-To: <200712290322.35471.ak@suse.de>

On Sat, Dec 29, 2007 at 03:22:35AM +0100, Andi Kleen wrote:
> On Friday 28 December 2007 22:23:41 Sam Ravnborg wrote:
> > - For 64 bit the sub architecture stuff is not used but structure
> >  is kept to make it easy to introduce.
> 
> I hope not. subarch is one of the main disaster areas in the i386 port.
The Makefile part looks reasonably ok - the implementation I have not looked at.

> 
> > +        # gcc doesn't support -march=core2 yet as of gcc 4.3, but I hope it
> > +        # will eventually. Use -mtune=generic as fallback
> 
> The comment is out of date, 4.3 has a -march=core2 now.
OK
 
> 
> > +        cflags-$(CONFIG_MCORE2) += \
> > +                $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
> > +        cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
> > +        KBUILD_CFLAGS += $(cflags-y)
> > +
> > +        KBUILD_CFLAGS += -mno-red-zone
> > +        KBUILD_CFLAGS += -mcmodel=kernel
> > +
> > +        KBUILD_CFLAGS += -Wno-sign-compare
> 
> That one should be on for i386 too. It was a workaround for a gcc prelease
> that unfortunately was shipped in a suse release.
OK
> 
> > +        KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
> 
> And that too should be on for i386 too.
OK
> 
> > +        ifneq ($(CONFIG_DEBUG_INFO),y)
> > +                # -fweb shrinks the kernel a bit, but the difference is very small
> > +                # it also messes up debugging, so don't use it for now.
> > +                #KBUILD_CFLAGS += $(call cc-option,-fweb)
> > +        endif
> 
> Can be dropped completely now.
OK - I was tempted to do so as it is a noop anyway.

> 
> > +        # -funit-at-a-time shrinks the kernel .text considerably
> > +        # unfortunately it makes reading oopses harder.
> > +        KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> 
> Should be on for i386 too (see other mail)
OK
> > +
> > +        # prevent gcc from generating any FP code by mistake
> > +        KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
> 
> Should be on for i386 too (in fact i thought it was already, surprised) 
OK
> 
> > +        # this works around some issues with generating unwind tables in older gccs
> > +        # newer gccs do it by default
> > +        KBUILD_CFLAGS += -maccumulate-outgoing-args
> 
> That is only needed for the unwinder; I readd it on i386 too in the out of tree
> unwinder patch. Strictly without it it's not needed, although it can be useful
> for kgdb or fireproxy or crash for the gdb unwinder. But that applies to i386 too.
> So probably it should be either dropped on both or readded to i386. I would
> be for readding. iirc it was dropped because it increased code size slightly,
> but code size is not everything. debuggability is more important.

Thanks for the feedback Andi.
I will prepare a small patch serie so we have the additional options applied for
i386 in individual patches and the original patch will only be slightly updated.

	Sam

      reply	other threads:[~2007-12-29  8:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-28 21:23 [PATCH] x86: unify x86 Makefile(s) Sam Ravnborg
2007-12-28 22:13 ` Adrian Bunk
2007-12-29  2:14   ` Andi Kleen
2007-12-29  8:07     ` Adrian Bunk
2007-12-29  9:39   ` Sam Ravnborg
2007-12-29  9:52     ` Adrian Bunk
2007-12-29 12:16       ` Andi Kleen
2007-12-29 12:54         ` Adrian Bunk
2007-12-29 18:22           ` Sam Ravnborg
2007-12-29 18:24             ` Andi Kleen
2007-12-29 18:58               ` Sam Ravnborg
2007-12-29 21:17                 ` Andi Kleen
2007-12-29 21:45                   ` Adrian Bunk
2007-12-30  2:00                     ` Andi Kleen
2007-12-30 11:01                       ` Adrian Bunk
2007-12-29  2:22 ` Andi Kleen
2007-12-29  8:07   ` Sam Ravnborg [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=20071229080734.GA16931@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=ak@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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