Skip to contentSkip to conversation

rt-tests - allow build without NUMA

PATCH In review Frank Rowand 3 participants 6 messages Sep 23, 2011 – Sep 26, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt-tests - allow build without NUMA

"NUMA=0 make" does not remove numa from the build. Fix.

---
Makefile | 2 1 + 1 - 0 !

 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
Index: b/Makefile
===================================================================
@@ -26,7 +26,7 @@ else
 	CFLAGS	+= -O0 -g
 endif
 
-ifdef NUMA
+ifeq ($(NUMA),"1")
 	CFLAGS += -DNUMA
 	NUMA_LIBS = -lnuma
 endif
#1 lore raw
Quoted 14 lines · Frank Rowand

"NUMA=0 make" does not remove numa from the build. Fix.

---
Makefile | 2 1 + 1 - 0 !

 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/Makefile
===================================================================

Makefile else · line 32

Quoted 8 lines
Makefile +1 -1
@@ -26,7 +26,7 @@ else
 	CFLAGS	+= -O0 -g
 endif
 
-ifdef NUMA
+ifeq ($(NUMA),"1")
 	CFLAGS += -DNUMA
 	NUMA_LIBS = -lnuma
 endif

can we please addionally get something like:

	machinetype = $(shell uname -m | sed -e s/i.86/i386;s/mips.*/mips/;s/ppc.*/powerpc)
	ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
	NUMA = 1
	endif

instead of the unconditional NUMA=1 we currently have?

Best regards
Uwe

Signature · 6 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 3 lines · On Fri, 23 Sep 2011 21:46:32 +0200 Uwe Kleine-König…
Quoted 2 lines · Frank Rowand

How about this?

Makefile +6 -2
index 4f51154..4776391 100644
@@ -14,7 +14,11 @@ bindir  ?= $(prefix)/bin
 mandir ?= $(prefix)/share/man
 srcdir ?= $(prefix)/src
 
-NUMA   := 1
+machinetype = $(shell uname -m | \
+    sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+NUMA   := 1
+endif
 
 CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
 
@@ -26,7 +30,7 @@ else
        CFLAGS  += -O0 -g
 endif
 
-ifdef NUMA
+ifeq ($(NUMA),1)
        CFLAGS += -DNUMA
        NUMA_LIBS = -lnuma
 endif
#3 lore raw
Quoted 28 lines · Clark Williams
Quoted 3 lines · On Fri, 23 Sep 2011 21:46:32 +0200 Uwe Kleine-König…
Quoted 2 lines · Frank Rowand

How about this?

Makefile +5 -1
index 4f51154..4776391 100644
@@ -14,7 +14,11 @@ bindir  ?= $(prefix)/bin
 mandir ?= $(prefix)/share/man
 srcdir ?= $(prefix)/src
 
-NUMA   := 1
+machinetype = $(shell uname -m | \
+    sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+NUMA   := 1
+endif
 
 CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
 

Makefile else · line 36

Quoted 8 lines
Makefile +1 -1
@@ -26,7 +30,7 @@ else
        CFLAGS  += -O0 -g
 endif
 
-ifdef NUMA
+ifeq ($(NUMA),1)
        CFLAGS += -DNUMA
        NUMA_LIBS = -lnuma
 endif

Looks good.

Uwe

Signature · 6 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to Clark Williams
Quoted 28 lines · Clark Williams
Quoted 3 lines · On Fri, 23 Sep 2011 21:46:32 +0200 Uwe Kleine-König…
Quoted 2 lines · Frank Rowand

How about this?

Makefile +5 -1
index 4f51154..4776391 100644
@@ -14,7 +14,11 @@ bindir  ?= $(prefix)/bin
 mandir ?= $(prefix)/share/man
 srcdir ?= $(prefix)/src
 
-NUMA   := 1
+machinetype = $(shell uname -m | \
+    sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+NUMA   := 1
+endif
 
 CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
 

Makefile else · line 36

Quoted 8 lines
Makefile +1 -1
@@ -26,7 +30,7 @@ else
        CFLAGS  += -O0 -g
 endif
 
-ifdef NUMA
+ifeq ($(NUMA),1)
        CFLAGS += -DNUMA
        NUMA_LIBS = -lnuma
 endif

That works for me.

The change from Uwe doesn't solve the NUMA issue for me because I cross-compile, but I am quite happy to type:

   make NUMA=0 CC="${CROSS_COMPILE}gcc"

which does solve the NUMA issue for me.

-Frank

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 40 lines · Frank Rowand
Quoted 28 lines · Clark Williams
Quoted 3 lines · On Fri, 23 Sep 2011 21:46:32 +0200 Uwe Kleine-König…
Quoted 2 lines · Frank Rowand

How about this?

Makefile +5 -1
index 4f51154..4776391 100644
@@ -14,7 +14,11 @@ bindir  ?= $(prefix)/bin
 mandir ?= $(prefix)/share/man
 srcdir ?= $(prefix)/src
 
-NUMA   := 1
+machinetype = $(shell uname -m | \
+    sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+NUMA   := 1
+endif
 
 CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
 

Makefile else · line 36

Quoted 8 lines
Makefile +1 -1
@@ -26,7 +30,7 @@ else
        CFLAGS  += -O0 -g
 endif
 
-ifdef NUMA
+ifeq ($(NUMA),1)
        CFLAGS += -DNUMA
        NUMA_LIBS = -lnuma
 endif

That works for me.

Quoted 2 lines

The change from Uwe doesn't solve the NUMA issue for me because I cross-compile, but I am quite happy to type:

Yeah, my patch was meant on top of your's. So I get exactly what I wanted by Clark :-)

Uwe

Signature · 6 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html