public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: David.Woodhouse@intel.com
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: only build arch specific raid6 routines on the arch they run on.
Date: Mon, 12 Mar 2012 13:17:29 -0400	[thread overview]
Message-ID: <20120312171728.GA1343@redhat.com> (raw)

I noticed the altivec routines are being built even on x86.
Also it looks like mmx/sse get built on non-x86.

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile
index 8a38102..8549927 100644
--- a/lib/raid6/Makefile
+++ b/lib/raid6/Makefile
@@ -1,18 +1,23 @@
 obj-$(CONFIG_RAID6_PQ)	+= raid6_pq.o
 
 raid6_pq-y	+= algos.o recov.o tables.o int1.o int2.o int4.o \
-		   int8.o int16.o int32.o altivec1.o altivec2.o altivec4.o \
-		   altivec8.o mmx.o sse1.o sse2.o
-hostprogs-y	+= mktables
+		   int8.o int16.o int32.o
 
-quiet_cmd_unroll = UNROLL  $@
-      cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
-                   < $< > $@ || ( rm -f $@ && exit 1 )
+ifeq ($(CONFIG_X86),y)
+raid6_pq-y	+= mmx.o sse1.o sse2.o
+endif
 
 ifeq ($(CONFIG_ALTIVEC),y)
+raid6_pq-y	+=  altivec1.o altivec2.o altivec4.o altivec8.o
 altivec_flags := -maltivec -mabi=altivec
 endif
 
+hostprogs-y	+= mktables
+
+quiet_cmd_unroll = UNROLL  $@
+      cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
+                   < $< > $@ || ( rm -f $@ && exit 1 )
+
 targets += int1.c
 $(obj)/int1.c:   UNROLL := 1
 $(obj)/int1.c:   $(src)/int.uc $(src)/unroll.awk FORCE

                 reply	other threads:[~2012-03-12 17:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120312171728.GA1343@redhat.com \
    --to=davej@redhat.com \
    --cc=David.Woodhouse@intel.com \
    --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