All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Subject: Re: [5/5] include tuning options into Makefile
Date: Mon, 21 Jul 2008 11:55:59 +0200	[thread overview]
Message-ID: <200807211156.00312.arnd@arndb.de> (raw)
In-Reply-To: <200807210900.58839.marvin24@gmx.de>

On Monday 21 July 2008, Marvin wrote:

> +# optimize for specific cpu
> +ifeq ($(CONFIG_TUNE_RS64),y)
> + =A0 =A0KBUILD_CFLAGS +=3D $(call cc-option,-mcpu=3Drs64)
> +else ifeq ($(CONFIG_TUNE_POWER3),y)
> + =A0 =A0KBUILD_CFLAGS +=3D $(call cc-option,-mcpu=3Dpower3)
> +else ifeq ($(CONFIG_TUNE_POWER4),y)
> + =A0 =A0KBUILD_CFLAGS +=3D $(call cc-option,-mcpu=3D$(P4CPU))
> +else ifeq ($(CONFIG_TUNE_CELL),y)
> + =A0 =A0KBUILD_CFLAGS +=3D $(call cc-option,-mcpu=3Dcell,-mtune=3Dcell)
> +else ifeq ($(CONFIG_TUNE_POWER5),y)
> + =A0 =A0KBUILD_CFLAGS +=3D $(call cc-option,-mcpu=3Dpower5,-mtune=3Dpowe=
r5)
> +else ifeq ($(CONFIG_TUNE_POWER6),y)
> + =A0 =A0KBUILD_CFLAGS +=3D $(call cc-option,-mcpu=3Dpower6,-mtune=3Dpowe=
r6)
> =A0endif
> -else
> -LDFLAGS_MODULE=A0+=3D arch/powerpc/lib/crtsavres.o

I think it would be easier to express this logic in Kconfig than in
Makefile.

> +
> +ifneq ($(CONFIG_OPT_EXCLUSIVE),y)
> + =A0 =A0KBUILD_CFLAGS :=3D $(subst mcpu,mtune,$(KBUILD_CFLAGS))
> =A0endif
> =A0

This still doesn't allow the most interesting case where you want to
optimize for a modern CPU but still allow older ones, e.g.
"-mcpu=3Dpower4 -mtune=3Dpower6".

	Arnd <><

      reply	other threads:[~2008-07-21  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200807210857.08892.marvin24@gmx.de>
2008-07-21  7:00 ` [5/5] include tuning options into Makefile Marvin
2008-07-21  9:55   ` Arnd Bergmann [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=200807211156.00312.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linuxppc-dev@ozlabs.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.