All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] selftests: powerpc build fixes
@ 2018-10-23  6:16 ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


This series fixes issues I encountered building and running the
selftests on a Ubuntu Cosmic ppc64le system.

Joel Stanley (6):
  selftests: powerpc/ptrace: Make tests build
  selftests: powerpc/ptrace: Remove clean rule
  selftests: powerpc/ptrace: Fix linking against pthread
  selftests: powerpc/signal: Make tests build
  selftests: powerpc/signal: Fix signal_tm CFLAGS
  selftests: powerpc/pmu: Link ebb tests with -no-pie

 tools/testing/selftests/powerpc/pmu/ebb/Makefile |  3 +++
 tools/testing/selftests/powerpc/ptrace/Makefile  | 11 ++++-------
 tools/testing/selftests/powerpc/signal/Makefile  |  9 +++------
 3 files changed, 10 insertions(+), 13 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 0/6] selftests: powerpc build fixes
@ 2018-10-23  6:16 ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


This series fixes issues I encountered building and running the
selftests on a Ubuntu Cosmic ppc64le system.

Joel Stanley (6):
  selftests: powerpc/ptrace: Make tests build
  selftests: powerpc/ptrace: Remove clean rule
  selftests: powerpc/ptrace: Fix linking against pthread
  selftests: powerpc/signal: Make tests build
  selftests: powerpc/signal: Fix signal_tm CFLAGS
  selftests: powerpc/pmu: Link ebb tests with -no-pie

 tools/testing/selftests/powerpc/pmu/ebb/Makefile |  3 +++
 tools/testing/selftests/powerpc/ptrace/Makefile  | 11 ++++-------
 tools/testing/selftests/powerpc/signal/Makefile  |  9 +++------
 3 files changed, 10 insertions(+), 13 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 0/6] selftests: powerpc build fixes
@ 2018-10-23  6:16 ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

This series fixes issues I encountered building and running the
selftests on a Ubuntu Cosmic ppc64le system.

Joel Stanley (6):
  selftests: powerpc/ptrace: Make tests build
  selftests: powerpc/ptrace: Remove clean rule
  selftests: powerpc/ptrace: Fix linking against pthread
  selftests: powerpc/signal: Make tests build
  selftests: powerpc/signal: Fix signal_tm CFLAGS
  selftests: powerpc/pmu: Link ebb tests with -no-pie

 tools/testing/selftests/powerpc/pmu/ebb/Makefile |  3 +++
 tools/testing/selftests/powerpc/ptrace/Makefile  | 11 ++++-------
 tools/testing/selftests/powerpc/signal/Makefile  |  9 +++------
 3 files changed, 10 insertions(+), 13 deletions(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/6] selftests: powerpc/ptrace: Make tests build
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 6ac71b629276..e9a3850aae86 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
+TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
               ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
               ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
               perf-hwbreak ptrace-syscall
@@ -12,7 +12,7 @@ CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
 ptrace-pkey core-pkey: child.h
 ptrace-pkey core-pkey: LDLIBS += -pthread
 
-$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
+$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
 
 clean:
-	rm -f $(TEST_PROGS) *.o
+	rm -f $(TEST_GEN_PROGS) *.o
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 1/6] selftests: powerpc/ptrace: Make tests build
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 6ac71b629276..e9a3850aae86 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
+TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
               ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
               ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
               perf-hwbreak ptrace-syscall
@@ -12,7 +12,7 @@ CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
 ptrace-pkey core-pkey: child.h
 ptrace-pkey core-pkey: LDLIBS += -pthread
 
-$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
+$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
 
 clean:
-	rm -f $(TEST_PROGS) *.o
+	rm -f $(TEST_GEN_PROGS) *.o
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 1/6] selftests: powerpc/ptrace: Make tests build
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 6ac71b629276..e9a3850aae86 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
+TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
               ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
               ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
               perf-hwbreak ptrace-syscall
@@ -12,7 +12,7 @@ CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
 ptrace-pkey core-pkey: child.h
 ptrace-pkey core-pkey: LDLIBS += -pthread
 
-$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
+$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
 
 clean:
-	rm -f $(TEST_PROGS) *.o
+	rm -f $(TEST_GEN_PROGS) *.o
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/6] selftests: powerpc/ptrace: Remove clean rule
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


When running 'make ptrace':

 make[1]: Entering directory 'tools/testing/selftests/powerpc/ptrace'
 Makefile:18: warning: overriding recipe for target 'clean'
 ../../lib.mk:137: warning: ignoring old recipe for target 'clean'

The rule is unnecessary as TEST_GEN_FILES are cleaned up by the rule in
lib.mk.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index e9a3850aae86..58de6d4a0cf4 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -13,6 +13,3 @@ ptrace-pkey core-pkey: child.h
 ptrace-pkey core-pkey: LDLIBS += -pthread
 
 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
-
-clean:
-	rm -f $(TEST_GEN_PROGS) *.o
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/6] selftests: powerpc/ptrace: Remove clean rule
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


When running 'make ptrace':

 make[1]: Entering directory 'tools/testing/selftests/powerpc/ptrace'
 Makefile:18: warning: overriding recipe for target 'clean'
 ../../lib.mk:137: warning: ignoring old recipe for target 'clean'

The rule is unnecessary as TEST_GEN_FILES are cleaned up by the rule in
lib.mk.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index e9a3850aae86..58de6d4a0cf4 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -13,6 +13,3 @@ ptrace-pkey core-pkey: child.h
 ptrace-pkey core-pkey: LDLIBS += -pthread
 
 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
-
-clean:
-	rm -f $(TEST_GEN_PROGS) *.o
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/6] selftests: powerpc/ptrace: Remove clean rule
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

When running 'make ptrace':

 make[1]: Entering directory 'tools/testing/selftests/powerpc/ptrace'
 Makefile:18: warning: overriding recipe for target 'clean'
 ../../lib.mk:137: warning: ignoring old recipe for target 'clean'

The rule is unnecessary as TEST_GEN_FILES are cleaned up by the rule in
lib.mk.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index e9a3850aae86..58de6d4a0cf4 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -13,6 +13,3 @@ ptrace-pkey core-pkey: child.h
 ptrace-pkey core-pkey: LDLIBS += -pthread
 
 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
-
-clean:
-	rm -f $(TEST_GEN_PROGS) *.o
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/6] selftests: powerpc/ptrace: Fix linking against pthread
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


Some of the ptrace tests require -ptrace when linking:

 /usr/bin/ld: /tmp/ccH32S9w.o: in function `init_child_sync':
 core-pkey.c:(.text+0x1d64): undefined reference to `sem_init'

The targets for these tests are modfied in lib.mk to add the $(OUTPUT)
prefix. The makefile needs to specify that modifying those rules, or
else they do not match and we miss out on the extra flags.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 58de6d4a0cf4..8d3f006c98cc 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -9,7 +9,7 @@ include ../../lib.mk
 
 CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
 
-ptrace-pkey core-pkey: child.h
-ptrace-pkey core-pkey: LDLIBS += -pthread
+$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h
+$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
 
 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/6] selftests: powerpc/ptrace: Fix linking against pthread
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


Some of the ptrace tests require -ptrace when linking:

 /usr/bin/ld: /tmp/ccH32S9w.o: in function `init_child_sync':
 core-pkey.c:(.text+0x1d64): undefined reference to `sem_init'

The targets for these tests are modfied in lib.mk to add the $(OUTPUT)
prefix. The makefile needs to specify that modifying those rules, or
else they do not match and we miss out on the extra flags.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 58de6d4a0cf4..8d3f006c98cc 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -9,7 +9,7 @@ include ../../lib.mk
 
 CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
 
-ptrace-pkey core-pkey: child.h
-ptrace-pkey core-pkey: LDLIBS += -pthread
+$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h
+$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
 
 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/6] selftests: powerpc/ptrace: Fix linking against pthread
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

Some of the ptrace tests require -ptrace when linking:

 /usr/bin/ld: /tmp/ccH32S9w.o: in function `init_child_sync':
 core-pkey.c:(.text+0x1d64): undefined reference to `sem_init'

The targets for these tests are modfied in lib.mk to add the $(OUTPUT)
prefix. The makefile needs to specify that modifying those rules, or
else they do not match and we miss out on the extra flags.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/testing/selftests/powerpc/ptrace/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 58de6d4a0cf4..8d3f006c98cc 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -9,7 +9,7 @@ include ../../lib.mk
 
 CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
 
-ptrace-pkey core-pkey: child.h
-ptrace-pkey core-pkey: LDLIBS += -pthread
+$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h
+$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
 
 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/6] selftests: powerpc/signal: Make tests build
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.

The definition must also happen below the inclusion of lib.mk.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/signal/Makefile | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index d34a7c7710db..25d0973df5b3 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -1,7 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-TEST_PROGS := signal signal_tm
-
-$(TEST_PROGS): ../harness.c ../utils.c signal.S
+TEST_GEN_PROGS := signal signal_tm
 
 CFLAGS += -maltivec
 signal_tm: CFLAGS += -mhtm
@@ -9,5 +7,4 @@ signal_tm: CFLAGS += -mhtm
 top_srcdir = ../../../../..
 include ../../lib.mk
 
-clean:
-	rm -f $(TEST_PROGS) *.o
+$(TEST_GEN_PROGS): ../harness.c ../utils.c signal.S
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/6] selftests: powerpc/signal: Make tests build
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.

The definition must also happen below the inclusion of lib.mk.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/signal/Makefile | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index d34a7c7710db..25d0973df5b3 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -1,7 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-TEST_PROGS := signal signal_tm
-
-$(TEST_PROGS): ../harness.c ../utils.c signal.S
+TEST_GEN_PROGS := signal signal_tm
 
 CFLAGS += -maltivec
 signal_tm: CFLAGS += -mhtm
@@ -9,5 +7,4 @@ signal_tm: CFLAGS += -mhtm
 top_srcdir = ../../../../..
 include ../../lib.mk
 
-clean:
-	rm -f $(TEST_PROGS) *.o
+$(TEST_GEN_PROGS): ../harness.c ../utils.c signal.S
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/6] selftests: powerpc/signal: Make tests build
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.

The definition must also happen below the inclusion of lib.mk.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/testing/selftests/powerpc/signal/Makefile | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index d34a7c7710db..25d0973df5b3 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -1,7 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-TEST_PROGS := signal signal_tm
-
-$(TEST_PROGS): ../harness.c ../utils.c signal.S
+TEST_GEN_PROGS := signal signal_tm
 
 CFLAGS += -maltivec
 signal_tm: CFLAGS += -mhtm
@@ -9,5 +7,4 @@ signal_tm: CFLAGS += -mhtm
 top_srcdir = ../../../../..
 include ../../lib.mk
 
-clean:
-	rm -f $(TEST_PROGS) *.o
+$(TEST_GEN_PROGS): ../harness.c ../utils.c signal.S
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/6] selftests: powerpc/signal: Fix signal_tm CFLAGS
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


signal_tm tries to build with -mhtm but it currently does not.

The targets is modified in lib.mk to add the $(OUTPUT) prefix. The
makefile needs to specify that modifying the rules, or else it does
not match and we miss out on the extra flag.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/signal/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index 25d0973df5b3..209a958dca12 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -2,7 +2,7 @@
 TEST_GEN_PROGS := signal signal_tm
 
 CFLAGS += -maltivec
-signal_tm: CFLAGS += -mhtm
+$(OUTPUT)/signal_tm: CFLAGS += -mhtm
 
 top_srcdir = ../../../../..
 include ../../lib.mk
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/6] selftests: powerpc/signal: Fix signal_tm CFLAGS
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


signal_tm tries to build with -mhtm but it currently does not.

The targets is modified in lib.mk to add the $(OUTPUT) prefix. The
makefile needs to specify that modifying the rules, or else it does
not match and we miss out on the extra flag.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/signal/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index 25d0973df5b3..209a958dca12 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -2,7 +2,7 @@
 TEST_GEN_PROGS := signal signal_tm
 
 CFLAGS += -maltivec
-signal_tm: CFLAGS += -mhtm
+$(OUTPUT)/signal_tm: CFLAGS += -mhtm
 
 top_srcdir = ../../../../..
 include ../../lib.mk
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/6] selftests: powerpc/signal: Fix signal_tm CFLAGS
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

signal_tm tries to build with -mhtm but it currently does not.

The targets is modified in lib.mk to add the $(OUTPUT) prefix. The
makefile needs to specify that modifying the rules, or else it does
not match and we miss out on the extra flag.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/testing/selftests/powerpc/signal/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index 25d0973df5b3..209a958dca12 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -2,7 +2,7 @@
 TEST_GEN_PROGS := signal signal_tm
 
 CFLAGS += -maltivec
-signal_tm: CFLAGS += -mhtm
+$(OUTPUT)/signal_tm: CFLAGS += -mhtm
 
 top_srcdir = ../../../../..
 include ../../lib.mk
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/6] selftests: powerpc/pmu: Link ebb tests with -no-pie
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: joel @ 2018-10-23  6:16 UTC (permalink / raw)


When running the ebb tests after building on a ppc64le Ubuntu machine:

 $ pmu/ebb/reg_access_test: error while loading shared libraries:
 R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
 range

This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index bd5dfa509272..23f4caf48ffc 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -5,6 +5,9 @@ noarg:
 # The EBB handler is 64-bit code and everything links against it
 CFLAGS += -m64
 
+# Toolchains may build PIE by default which breaks the assembly
+LDFLAGS += -no-pie
+
 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test	\
 	 cycles_with_freeze_test pmc56_overflow_test		\
 	 ebb_vs_cpu_event_test cpu_event_vs_ebb_test		\
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/6] selftests: powerpc/pmu: Link ebb tests with -no-pie
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)


When running the ebb tests after building on a ppc64le Ubuntu machine:

 $ pmu/ebb/reg_access_test: error while loading shared libraries:
 R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
 range

This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index bd5dfa509272..23f4caf48ffc 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -5,6 +5,9 @@ noarg:
 # The EBB handler is 64-bit code and everything links against it
 CFLAGS += -m64
 
+# Toolchains may build PIE by default which breaks the assembly
+LDFLAGS += -no-pie
+
 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test	\
 	 cycles_with_freeze_test pmc56_overflow_test		\
 	 ebb_vs_cpu_event_test cpu_event_vs_ebb_test		\
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/6] selftests: powerpc/pmu: Link ebb tests with -no-pie
@ 2018-10-23  6:16   ` Joel Stanley
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Stanley @ 2018-10-23  6:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kselftest

When running the ebb tests after building on a ppc64le Ubuntu machine:

 $ pmu/ebb/reg_access_test: error while loading shared libraries:
 R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
 range

This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index bd5dfa509272..23f4caf48ffc 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -5,6 +5,9 @@ noarg:
 # The EBB handler is 64-bit code and everything links against it
 CFLAGS += -m64
 
+# Toolchains may build PIE by default which breaks the assembly
+LDFLAGS += -no-pie
+
 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test	\
 	 cycles_with_freeze_test pmc56_overflow_test		\
 	 ebb_vs_cpu_event_test cpu_event_vs_ebb_test		\
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-10-23  6:34 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23  6:16 [PATCH 0/6] selftests: powerpc build fixes joel
2018-10-23  6:16 ` Joel Stanley
2018-10-23  6:16 ` Joel Stanley
2018-10-23  6:16 ` [PATCH 1/6] selftests: powerpc/ptrace: Make tests build joel
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16 ` [PATCH 2/6] selftests: powerpc/ptrace: Remove clean rule joel
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16 ` [PATCH 3/6] selftests: powerpc/ptrace: Fix linking against pthread joel
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16 ` [PATCH 4/6] selftests: powerpc/signal: Make tests build joel
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16 ` [PATCH 5/6] selftests: powerpc/signal: Fix signal_tm CFLAGS joel
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16 ` [PATCH 6/6] selftests: powerpc/pmu: Link ebb tests with -no-pie joel
2018-10-23  6:16   ` Joel Stanley
2018-10-23  6:16   ` Joel Stanley

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.