* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
From: Fathi Boudra <fathi.boudra@linaro.org>
Relax CC assignment to allow to override CC in the top-level Makefile.
Signed-off-by: Denys Dmytriyenko <denys at ti.com>
---
tools/testing/selftests/lib.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 8b0f16409ed7..0f9c47eaaa6f 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -1,6 +1,6 @@
# This mimics the top-level Makefile. We do it explicitly here so that this
# Makefile can operate with or without the kbuild infrastructure.
-CC := $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
ifeq (0,$(MAKELEVEL))
OUTPUT := $(shell pwd)
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: @ 2019-01-16 17:43 UTC (permalink / raw)
From: Fathi Boudra <fathi.boudra at linaro.org>
Relax CC assignment to allow to override CC in the top-level Makefile.
Signed-off-by: Denys Dmytriyenko <denys at ti.com>
---
tools/testing/selftests/lib.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 8b0f16409ed7..0f9c47eaaa6f 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -1,6 +1,6 @@
# This mimics the top-level Makefile. We do it explicitly here so that this
# Makefile can operate with or without the kbuild infrastructure.
-CC := $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
ifeq (0,$(MAKELEVEL))
OUTPUT := $(shell pwd)
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 2/4] selftests: net: use LDLIBS instead of LDFLAGS
2019-01-16 17:43 `
(?)
@ 2019-01-16 17:43 `
-1 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
To: shuah
Cc: Fathi Boudra, David S. Miller, open list:NETWORKING [GENERAL],
open list:KERNEL SELFTEST FRAMEWORK, open list
From: Fathi Boudra <fathi.boudra@linaro.org>
reuseport_bpf_numa fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc
--sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
-Wl,--no-as-needed -O2 -g -I../../../../usr/include/ -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -lnuma reuseport_bpf_numa.c
-o
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
/tmp/ccfUuExT.o: In function `send_from_node':
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
undefined reference to `numa_run_on_node'
/tmp/ccfUuExT.o: In function `main':
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
undefined reference to `numa_available'
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
undefined reference to `numa_max_node'
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libnuma.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
tools/testing/selftests/net/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index f8f3e90700c0..1e6d14d2825c 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -21,6 +21,6 @@ TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls
KSFT_KHDR_INSTALL := 1
include ../lib.mk
-$(OUTPUT)/reuseport_bpf_numa: LDFLAGS += -lnuma
+$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
$(OUTPUT)/tcp_mmap: LDFLAGS += -lpthread
$(OUTPUT)/tcp_inq: LDFLAGS += -lpthread
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 2/4] selftests: net: use LDLIBS instead of LDFLAGS
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
From: Fathi Boudra <fathi.boudra@linaro.org>
reuseport_bpf_numa fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc
--sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
-Wl,--no-as-needed -O2 -g -I../../../../usr/include/ -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -lnuma reuseport_bpf_numa.c
-o
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
/tmp/ccfUuExT.o: In function `send_from_node':
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
undefined reference to `numa_run_on_node'
/tmp/ccfUuExT.o: In function `main':
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
undefined reference to `numa_available'
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
undefined reference to `numa_max_node'
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libnuma.
Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
tools/testing/selftests/net/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index f8f3e90700c0..1e6d14d2825c 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -21,6 +21,6 @@ TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls
KSFT_KHDR_INSTALL := 1
include ../lib.mk
-$(OUTPUT)/reuseport_bpf_numa: LDFLAGS += -lnuma
+$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
$(OUTPUT)/tcp_mmap: LDFLAGS += -lpthread
$(OUTPUT)/tcp_inq: LDFLAGS += -lpthread
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 2/4] selftests: net: use LDLIBS instead of LDFLAGS
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: @ 2019-01-16 17:43 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2717 bytes --]
From: Fathi Boudra <fathi.boudra at linaro.org>
reuseport_bpf_numa fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc
--sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
-Wl,--no-as-needed -O2 -g -I../../../../usr/include/ -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -lnuma reuseport_bpf_numa.c
-o
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
/tmp/ccfUuExT.o: In function `send_from_node':
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
undefined reference to `numa_run_on_node'
/tmp/ccfUuExT.o: In function `main':
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
undefined reference to `numa_available'
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
undefined reference to `numa_max_node'
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libnuma.
Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
tools/testing/selftests/net/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index f8f3e90700c0..1e6d14d2825c 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -21,6 +21,6 @@ TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls
KSFT_KHDR_INSTALL := 1
include ../lib.mk
-$(OUTPUT)/reuseport_bpf_numa: LDFLAGS += -lnuma
+$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
$(OUTPUT)/tcp_mmap: LDFLAGS += -lpthread
$(OUTPUT)/tcp_inq: LDFLAGS += -lpthread
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
2019-01-16 17:43 `
(?)
@ 2019-01-16 17:43 `
-1 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
To: shuah
Cc: Fathi Boudra, Kees Cook, Andy Lutomirski, Will Drewry,
open list:KERNEL SELFTEST FRAMEWORK, open list
From: Fathi Boudra <fathi.boudra@linaro.org>
seccomp_bpf fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
-O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
/tmp/ccrlR3MW.o: In function `tsync_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
/tmp/ccrlR3MW.o: In function `TSYNC_setup':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
/tmp/ccrlR3MW.o: In function `TSYNC_teardown':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libpthread.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
tools/testing/selftests/seccomp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index fce7f4ce0692..1760b3e39730 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -9,7 +9,7 @@ BINARIES := seccomp_bpf seccomp_benchmark
CFLAGS += -Wl,-no-as-needed -Wall
seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
- $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
TEST_PROGS += $(BINARIES)
EXTRA_CLEAN := $(BINARIES)
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
From: Fathi Boudra <fathi.boudra@linaro.org>
seccomp_bpf fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
-O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
/tmp/ccrlR3MW.o: In function `tsync_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
/tmp/ccrlR3MW.o: In function `TSYNC_setup':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
/tmp/ccrlR3MW.o: In function `TSYNC_teardown':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libpthread.
Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
tools/testing/selftests/seccomp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index fce7f4ce0692..1760b3e39730 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -9,7 +9,7 @@ BINARIES := seccomp_bpf seccomp_benchmark
CFLAGS += -Wl,-no-as-needed -Wall
seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
- $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
TEST_PROGS += $(BINARIES)
EXTRA_CLEAN := $(BINARIES)
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: @ 2019-01-16 17:43 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8329 bytes --]
From: Fathi Boudra <fathi.boudra at linaro.org>
seccomp_bpf fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
-O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
/build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
/tmp/ccrlR3MW.o: In function `tsync_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
/tmp/ccrlR3MW.o: In function `TSYNC_setup':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
/tmp/ccrlR3MW.o: In function `TSYNC_teardown':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
/tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
/tmp/ccrlR3MW.o: In function `tsync_start_sibling':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libpthread.
Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
tools/testing/selftests/seccomp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index fce7f4ce0692..1760b3e39730 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -9,7 +9,7 @@ BINARIES := seccomp_bpf seccomp_benchmark
CFLAGS += -Wl,-no-as-needed -Wall
seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
- $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
TEST_PROGS += $(BINARIES)
EXTRA_CLEAN := $(BINARIES)
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
2019-01-16 17:43 `
(?)
@ 2019-01-16 18:13 ` keescook
-1 siblings, 0 replies; 36+ messages in thread
From: Kees Cook @ 2019-01-16 18:13 UTC (permalink / raw)
To: Daniel Díaz, Shuah Khan
Cc: Fathi Boudra, Andy Lutomirski, Will Drewry,
open list:KERNEL SELFTEST FRAMEWORK, open list
On Wed, Jan 16, 2019 at 9:44 AM Daniel Díaz <daniel.diaz@linaro.org> wrote:
>
> From: Fathi Boudra <fathi.boudra@linaro.org>
>
> seccomp_bpf fails to build due to undefined reference errors:
>
> aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
> -O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
> /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
> /tmp/ccrlR3MW.o: In function `tsync_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
> /tmp/ccrlR3MW.o: In function `TSYNC_setup':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
> /tmp/ccrlR3MW.o: In function `TSYNC_teardown':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>
> It's GNU Make and linker specific.
>
> The default Makefile rule looks like:
>
> $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
>
> When linking is done by gcc itself, no issue, but when it needs to be passed
> to proper ld, only LDLIBS follows and then ld cannot know what libs to link
> with.
>
> More detail:
> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>
> LDFLAGS
> Extra flags to give to compilers when they are supposed to invoke the linker,
> ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
> instead.
>
> LDLIBS
> Library flags or names given to compilers when they are supposed to invoke the
> linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
> LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
> variable.
>
> https://lkml.org/lkml/2010/2/10/362
>
> tools/perf: libraries must come after objects
>
> Link order matters, use LDLIBS instead of LDFLAGS to properly link against
> libpthread.
>
> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Shuah, can you take this?
-Kees
> ---
> tools/testing/selftests/seccomp/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index fce7f4ce0692..1760b3e39730 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -9,7 +9,7 @@ BINARIES := seccomp_bpf seccomp_benchmark
> CFLAGS += -Wl,-no-as-needed -Wall
>
> seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
> - $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
> + $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
>
> TEST_PROGS += $(BINARIES)
> EXTRA_CLEAN := $(BINARIES)
> --
> 2.17.1
>
--
Kees Cook
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
@ 2019-01-16 18:13 ` keescook
0 siblings, 0 replies; 36+ messages in thread
From: Kees Cook @ 2019-01-16 18:13 UTC (permalink / raw)
On Wed, Jan 16, 2019@9:44 AM Daniel Díaz <daniel.diaz@linaro.org> wrote:
>
> From: Fathi Boudra <fathi.boudra at linaro.org>
>
> seccomp_bpf fails to build due to undefined reference errors:
>
> aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
> -O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
> /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
> /tmp/ccrlR3MW.o: In function `tsync_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
> /tmp/ccrlR3MW.o: In function `TSYNC_setup':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
> /tmp/ccrlR3MW.o: In function `TSYNC_teardown':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>
> It's GNU Make and linker specific.
>
> The default Makefile rule looks like:
>
> $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
>
> When linking is done by gcc itself, no issue, but when it needs to be passed
> to proper ld, only LDLIBS follows and then ld cannot know what libs to link
> with.
>
> More detail:
> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>
> LDFLAGS
> Extra flags to give to compilers when they are supposed to invoke the linker,
> ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
> instead.
>
> LDLIBS
> Library flags or names given to compilers when they are supposed to invoke the
> linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
> LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
> variable.
>
> https://lkml.org/lkml/2010/2/10/362
>
> tools/perf: libraries must come after objects
>
> Link order matters, use LDLIBS instead of LDFLAGS to properly link against
> libpthread.
>
> Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
Acked-by: Kees Cook <keescook at chromium.org>
Shuah, can you take this?
-Kees
> ---
> tools/testing/selftests/seccomp/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index fce7f4ce0692..1760b3e39730 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -9,7 +9,7 @@ BINARIES := seccomp_bpf seccomp_benchmark
> CFLAGS += -Wl,-no-as-needed -Wall
>
> seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
> - $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
> + $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
>
> TEST_PROGS += $(BINARIES)
> EXTRA_CLEAN := $(BINARIES)
> --
> 2.17.1
>
--
Kees Cook
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
@ 2019-01-16 18:13 ` keescook
0 siblings, 0 replies; 36+ messages in thread
From: keescook @ 2019-01-16 18:13 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8733 bytes --]
On Wed, Jan 16, 2019 at 9:44 AM Daniel Díaz <daniel.diaz at linaro.org> wrote:
>
> From: Fathi Boudra <fathi.boudra at linaro.org>
>
> seccomp_bpf fails to build due to undefined reference errors:
>
> aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
> -O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
> /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
> /tmp/ccrlR3MW.o: In function `tsync_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
> /tmp/ccrlR3MW.o: In function `TSYNC_setup':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
> /tmp/ccrlR3MW.o: In function `TSYNC_teardown':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>
> It's GNU Make and linker specific.
>
> The default Makefile rule looks like:
>
> $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
>
> When linking is done by gcc itself, no issue, but when it needs to be passed
> to proper ld, only LDLIBS follows and then ld cannot know what libs to link
> with.
>
> More detail:
> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>
> LDFLAGS
> Extra flags to give to compilers when they are supposed to invoke the linker,
> ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
> instead.
>
> LDLIBS
> Library flags or names given to compilers when they are supposed to invoke the
> linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
> LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
> variable.
>
> https://lkml.org/lkml/2010/2/10/362
>
> tools/perf: libraries must come after objects
>
> Link order matters, use LDLIBS instead of LDFLAGS to properly link against
> libpthread.
>
> Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
Acked-by: Kees Cook <keescook at chromium.org>
Shuah, can you take this?
-Kees
> ---
> tools/testing/selftests/seccomp/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index fce7f4ce0692..1760b3e39730 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -9,7 +9,7 @@ BINARIES := seccomp_bpf seccomp_benchmark
> CFLAGS += -Wl,-no-as-needed -Wall
>
> seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
> - $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
> + $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
>
> TEST_PROGS += $(BINARIES)
> EXTRA_CLEAN := $(BINARIES)
> --
> 2.17.1
>
--
Kees Cook
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
2019-01-16 18:13 ` keescook
(?)
@ 2019-01-16 18:26 ` shuah
-1 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-16 18:26 UTC (permalink / raw)
To: Kees Cook, Daniel Díaz
Cc: Fathi Boudra, Andy Lutomirski, Will Drewry,
open list:KERNEL SELFTEST FRAMEWORK, open list, shuah
On 1/16/19 11:13 AM, Kees Cook wrote:
> On Wed, Jan 16, 2019 at 9:44 AM Daniel Díaz <daniel.diaz@linaro.org> wrote:
>>
>> From: Fathi Boudra <fathi.boudra@linaro.org>
>>
>> seccomp_bpf fails to build due to undefined reference errors:
>>
>> aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
>> -O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
>> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
>> /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
>> /tmp/ccrlR3MW.o: In function `tsync_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
>> /tmp/ccrlR3MW.o: In function `TSYNC_setup':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
>> /tmp/ccrlR3MW.o: In function `TSYNC_teardown':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>>
>> It's GNU Make and linker specific.
>>
>> The default Makefile rule looks like:
>>
>> $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
>>
>> When linking is done by gcc itself, no issue, but when it needs to be passed
>> to proper ld, only LDLIBS follows and then ld cannot know what libs to link
>> with.
>>
>> More detail:
>> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>>
>> LDFLAGS
>> Extra flags to give to compilers when they are supposed to invoke the linker,
>> ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
>> instead.
>>
>> LDLIBS
>> Library flags or names given to compilers when they are supposed to invoke the
>> linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
>> LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
>> variable.
>>
>> https://lkml.org/lkml/2010/2/10/362
>>
>> tools/perf: libraries must come after objects
>>
>> Link order matters, use LDLIBS instead of LDFLAGS to properly link against
>> libpthread.
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>
Thanks for the patch.
> Acked-by: Kees Cook <keescook@chromium.org>
>
> Shuah, can you take this?
>
Thanks for Ack. I will get this in for 5.0-rc3 or rc4.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
@ 2019-01-16 18:26 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-16 18:26 UTC (permalink / raw)
On 1/16/19 11:13 AM, Kees Cook wrote:
> On Wed, Jan 16, 2019@9:44 AM Daniel Díaz <daniel.diaz@linaro.org> wrote:
>>
>> From: Fathi Boudra <fathi.boudra at linaro.org>
>>
>> seccomp_bpf fails to build due to undefined reference errors:
>>
>> aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
>> -O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
>> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
>> /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
>> /tmp/ccrlR3MW.o: In function `tsync_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
>> /tmp/ccrlR3MW.o: In function `TSYNC_setup':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
>> /tmp/ccrlR3MW.o: In function `TSYNC_teardown':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>>
>> It's GNU Make and linker specific.
>>
>> The default Makefile rule looks like:
>>
>> $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
>>
>> When linking is done by gcc itself, no issue, but when it needs to be passed
>> to proper ld, only LDLIBS follows and then ld cannot know what libs to link
>> with.
>>
>> More detail:
>> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>>
>> LDFLAGS
>> Extra flags to give to compilers when they are supposed to invoke the linker,
>> ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
>> instead.
>>
>> LDLIBS
>> Library flags or names given to compilers when they are supposed to invoke the
>> linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
>> LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
>> variable.
>>
>> https://lkml.org/lkml/2010/2/10/362
>>
>> tools/perf: libraries must come after objects
>>
>> Link order matters, use LDLIBS instead of LDFLAGS to properly link against
>> libpthread.
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
>
Thanks for the patch.
> Acked-by: Kees Cook <keescook at chromium.org>
>
> Shuah, can you take this?
>
Thanks for Ack. I will get this in for 5.0-rc3 or rc4.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 3/4] selftests: seccomp: use LDLIBS instead of LDFLAGS
@ 2019-01-16 18:26 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-16 18:26 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8324 bytes --]
On 1/16/19 11:13 AM, Kees Cook wrote:
> On Wed, Jan 16, 2019 at 9:44 AM Daniel Díaz <daniel.diaz at linaro.org> wrote:
>>
>> From: Fathi Boudra <fathi.boudra at linaro.org>
>>
>> seccomp_bpf fails to build due to undefined reference errors:
>>
>> aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
>> -O2 -pipe -g -feliminate-unused-debug-types -Wl,-no-as-needed -Wall
>> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread seccomp_bpf.c -o
>> /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf
>> /tmp/ccrlR3MW.o: In function `tsync_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1920: undefined reference to `sem_post'
>> /tmp/ccrlR3MW.o: In function `TSYNC_setup':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1863: undefined reference to `sem_init'
>> /tmp/ccrlR3MW.o: In function `TSYNC_teardown':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1904: undefined reference to `sem_destroy'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1897: undefined reference to `pthread_kill'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1898: undefined reference to `pthread_cancel'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1899: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_siblings_fail_prctl':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1978: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1990: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1992: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_ancestor':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2016: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2032: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2034: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_sibling_want_nnp':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2046: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2058: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2060: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_no_filter':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2073: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2098: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2100: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_with_one_divergence':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2125: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2143: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2145: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>> /tmp/ccrlR3MW.o: In function `TSYNC_two_siblings_not_under_filter':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2169: undefined reference to `sem_wait'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2202: undefined reference to `pthread_join'
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:2227: undefined reference to `pthread_join'
>> /tmp/ccrlR3MW.o: In function `tsync_start_sibling':
>> /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/seccomp/seccomp_bpf.c:1941: undefined reference to `pthread_create'
>>
>> It's GNU Make and linker specific.
>>
>> The default Makefile rule looks like:
>>
>> $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
>>
>> When linking is done by gcc itself, no issue, but when it needs to be passed
>> to proper ld, only LDLIBS follows and then ld cannot know what libs to link
>> with.
>>
>> More detail:
>> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>>
>> LDFLAGS
>> Extra flags to give to compilers when they are supposed to invoke the linker,
>> ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
>> instead.
>>
>> LDLIBS
>> Library flags or names given to compilers when they are supposed to invoke the
>> linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
>> LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
>> variable.
>>
>> https://lkml.org/lkml/2010/2/10/362
>>
>> tools/perf: libraries must come after objects
>>
>> Link order matters, use LDLIBS instead of LDFLAGS to properly link against
>> libpthread.
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
>
Thanks for the patch.
> Acked-by: Kees Cook <keescook at chromium.org>
>
> Shuah, can you take this?
>
Thanks for Ack. I will get this in for 5.0-rc3 or rc4.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 4/4] selftests: timers: use LDLIBS instead of LDFLAGS
2019-01-16 17:43 `
(?)
@ 2019-01-16 17:43 `
-1 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
To: shuah
Cc: Fathi Boudra, Denys Dmytriyenko, John Stultz, Thomas Gleixner,
Stephen Boyd, open list:TIMEKEEPING, CLOCKSOURCE CORE, NTP,
ALARMTIMER, open list:KERNEL SELFTEST FRAMEWORK
From: Fathi Boudra <fathi.boudra@linaro.org>
posix_timers fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
-O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall
-DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread
posix_timers.c
-o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers
/tmp/cc1FTZzT.o: In function `check_timer_create':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:157:
undefined reference to `timer_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:170:
undefined reference to `timer_settime'
collect2: error: ld returned 1 exit status
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libpthread.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
tools/testing/selftests/timers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index c02683cfb6c9..7656c7ce79d9 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -O3 -Wl,-no-as-needed -Wall
-LDFLAGS += -lrt -lpthread -lm
+LDLIBS += -lrt -lpthread -lm
# these are all "safe" tests that don't modify
# system time or require escalated privileges
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 4/4] selftests: timers: use LDLIBS instead of LDFLAGS
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-16 17:43 UTC (permalink / raw)
From: Fathi Boudra <fathi.boudra@linaro.org>
posix_timers fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
-O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall
-DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread
posix_timers.c
-o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers
/tmp/cc1FTZzT.o: In function `check_timer_create':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:157:
undefined reference to `timer_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:170:
undefined reference to `timer_settime'
collect2: error: ld returned 1 exit status
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libpthread.
Signed-off-by: Denys Dmytriyenko <denys at ti.com>
Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
tools/testing/selftests/timers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index c02683cfb6c9..7656c7ce79d9 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -O3 -Wl,-no-as-needed -Wall
-LDFLAGS += -lrt -lpthread -lm
+LDLIBS += -lrt -lpthread -lm
# these are all "safe" tests that don't modify
# system time or require escalated privileges
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 4/4] selftests: timers: use LDLIBS instead of LDFLAGS
@ 2019-01-16 17:43 `
0 siblings, 0 replies; 36+ messages in thread
From: @ 2019-01-16 17:43 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2508 bytes --]
From: Fathi Boudra <fathi.boudra at linaro.org>
posix_timers fails to build due to undefined reference errors:
aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey
-O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall
-DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread
posix_timers.c
-o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers
/tmp/cc1FTZzT.o: In function `check_timer_create':
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:157:
undefined reference to `timer_create'
/usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:170:
undefined reference to `timer_settime'
collect2: error: ld returned 1 exit status
It's GNU Make and linker specific.
The default Makefile rule looks like:
$(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
When linking is done by gcc itself, no issue, but when it needs to be passed
to proper ld, only LDLIBS follows and then ld cannot know what libs to link
with.
More detail:
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
LDFLAGS
Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS
Library flags or names given to compilers when they are supposed to invoke the
linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
variable.
https://lkml.org/lkml/2010/2/10/362
tools/perf: libraries must come after objects
Link order matters, use LDLIBS instead of LDFLAGS to properly link against
libpthread.
Signed-off-by: Denys Dmytriyenko <denys at ti.com>
Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
tools/testing/selftests/timers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index c02683cfb6c9..7656c7ce79d9 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -O3 -Wl,-no-as-needed -Wall
-LDFLAGS += -lrt -lpthread -lm
+LDLIBS += -lrt -lpthread -lm
# these are all "safe" tests that don't modify
# system time or require escalated privileges
--
2.17.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
2019-01-16 17:43 `
(?)
@ 2019-01-16 21:56 ` shuah
-1 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-16 21:56 UTC (permalink / raw)
To: Daniel Díaz
Cc: Fathi Boudra, Denys Dmytriyenko,
open list:KERNEL SELFTEST FRAMEWORK, open list, shuah
On 1/16/19 10:43 AM, Daniel Díaz wrote:
> From: Fathi Boudra <fathi.boudra@linaro.org>
>
> Relax CC assignment to allow to override CC in the top-level Makefile.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
> tools/testing/selftests/lib.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 8b0f16409ed7..0f9c47eaaa6f 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -1,6 +1,6 @@
> # This mimics the top-level Makefile. We do it explicitly here so that this
> # Makefile can operate with or without the kbuild infrastructure.
> -CC := $(CROSS_COMPILE)gcc
> +CC ?= $(CROSS_COMPILE)gcc
>
> ifeq (0,$(MAKELEVEL))
> OUTPUT := $(shell pwd)
>
What problem does this fix?
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-16 21:56 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-16 21:56 UTC (permalink / raw)
On 1/16/19 10:43 AM, Daniel Díaz wrote:
> From: Fathi Boudra <fathi.boudra at linaro.org>
>
> Relax CC assignment to allow to override CC in the top-level Makefile.
>
> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
> ---
> tools/testing/selftests/lib.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 8b0f16409ed7..0f9c47eaaa6f 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -1,6 +1,6 @@
> # This mimics the top-level Makefile. We do it explicitly here so that this
> # Makefile can operate with or without the kbuild infrastructure.
> -CC := $(CROSS_COMPILE)gcc
> +CC ?= $(CROSS_COMPILE)gcc
>
> ifeq (0,$(MAKELEVEL))
> OUTPUT := $(shell pwd)
>
What problem does this fix?
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-16 21:56 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-16 21:56 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
On 1/16/19 10:43 AM, Daniel Díaz wrote:
> From: Fathi Boudra <fathi.boudra at linaro.org>
>
> Relax CC assignment to allow to override CC in the top-level Makefile.
>
> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
> ---
> tools/testing/selftests/lib.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 8b0f16409ed7..0f9c47eaaa6f 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -1,6 +1,6 @@
> # This mimics the top-level Makefile. We do it explicitly here so that this
> # Makefile can operate with or without the kbuild infrastructure.
> -CC := $(CROSS_COMPILE)gcc
> +CC ?= $(CROSS_COMPILE)gcc
>
> ifeq (0,$(MAKELEVEL))
> OUTPUT := $(shell pwd)
>
What problem does this fix?
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
2019-01-16 21:56 ` shuah
(?)
@ 2019-01-18 17:54 `
-1 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-18 17:54 UTC (permalink / raw)
To: shuah
Cc: Fathi Boudra, Denys Dmytriyenko,
open list:KERNEL SELFTEST FRAMEWORK, open list
Hello!
On Wed, 16 Jan 2019 at 15:56, shuah <shuah@kernel.org> wrote:
>
> On 1/16/19 10:43 AM, Daniel Díaz wrote:
> > From: Fathi Boudra <fathi.boudra@linaro.org>
> >
> > Relax CC assignment to allow to override CC in the top-level Makefile.
> >
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > ---
> > tools/testing/selftests/lib.mk | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> > index 8b0f16409ed7..0f9c47eaaa6f 100644
> > --- a/tools/testing/selftests/lib.mk
> > +++ b/tools/testing/selftests/lib.mk
> > @@ -1,6 +1,6 @@
> > # This mimics the top-level Makefile. We do it explicitly here so that this
> > # Makefile can operate with or without the kbuild infrastructure.
> > -CC := $(CROSS_COMPILE)gcc
> > +CC ?= $(CROSS_COMPILE)gcc
> >
> > ifeq (0,$(MAKELEVEL))
> > OUTPUT := $(shell pwd)
> >
>
> What problem does this fix?
Sometimes "$(CROSS_COMPILE)gcc" is not enough: For instance, we need
to pass --sysroot to CC:
CC="aarch64-linaro-linux-gcc
--sysroot=/oe/build/tmp-lkft-glibc/work/hikey-linaro-linux/kselftests-mainline/4.19-r0/recipe-sysroot"
Greetings!
Daniel Díaz
daniel.diaz@linaro.org
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-18 17:54 `
0 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-18 17:54 UTC (permalink / raw)
Hello!
On Wed, 16 Jan 2019@15:56, shuah <shuah@kernel.org> wrote:
>
> On 1/16/19 10:43 AM, Daniel Díaz wrote:
> > From: Fathi Boudra <fathi.boudra at linaro.org>
> >
> > Relax CC assignment to allow to override CC in the top-level Makefile.
> >
> > Signed-off-by: Denys Dmytriyenko <denys at ti.com>
> > ---
> > tools/testing/selftests/lib.mk | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> > index 8b0f16409ed7..0f9c47eaaa6f 100644
> > --- a/tools/testing/selftests/lib.mk
> > +++ b/tools/testing/selftests/lib.mk
> > @@ -1,6 +1,6 @@
> > # This mimics the top-level Makefile. We do it explicitly here so that this
> > # Makefile can operate with or without the kbuild infrastructure.
> > -CC := $(CROSS_COMPILE)gcc
> > +CC ?= $(CROSS_COMPILE)gcc
> >
> > ifeq (0,$(MAKELEVEL))
> > OUTPUT := $(shell pwd)
> >
>
> What problem does this fix?
Sometimes "$(CROSS_COMPILE)gcc" is not enough: For instance, we need
to pass --sysroot to CC:
CC="aarch64-linaro-linux-gcc
--sysroot=/oe/build/tmp-lkft-glibc/work/hikey-linaro-linux/kselftests-mainline/4.19-r0/recipe-sysroot"
Greetings!
Daniel Díaz
daniel.diaz at linaro.org
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-18 17:54 `
0 siblings, 0 replies; 36+ messages in thread
From: @ 2019-01-18 17:54 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
Hello!
On Wed, 16 Jan 2019 at 15:56, shuah <shuah at kernel.org> wrote:
>
> On 1/16/19 10:43 AM, Daniel Díaz wrote:
> > From: Fathi Boudra <fathi.boudra at linaro.org>
> >
> > Relax CC assignment to allow to override CC in the top-level Makefile.
> >
> > Signed-off-by: Denys Dmytriyenko <denys at ti.com>
> > ---
> > tools/testing/selftests/lib.mk | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> > index 8b0f16409ed7..0f9c47eaaa6f 100644
> > --- a/tools/testing/selftests/lib.mk
> > +++ b/tools/testing/selftests/lib.mk
> > @@ -1,6 +1,6 @@
> > # This mimics the top-level Makefile. We do it explicitly here so that this
> > # Makefile can operate with or without the kbuild infrastructure.
> > -CC := $(CROSS_COMPILE)gcc
> > +CC ?= $(CROSS_COMPILE)gcc
> >
> > ifeq (0,$(MAKELEVEL))
> > OUTPUT := $(shell pwd)
> >
>
> What problem does this fix?
Sometimes "$(CROSS_COMPILE)gcc" is not enough: For instance, we need
to pass --sysroot to CC:
CC="aarch64-linaro-linux-gcc
--sysroot=/oe/build/tmp-lkft-glibc/work/hikey-linaro-linux/kselftests-mainline/4.19-r0/recipe-sysroot"
Greetings!
Daniel Díaz
daniel.diaz at linaro.org
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
2019-01-18 17:54 `
(?)
@ 2019-01-28 15:01 ` shuah
-1 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-28 15:01 UTC (permalink / raw)
To: Daniel Díaz
Cc: Fathi Boudra, Denys Dmytriyenko,
open list:KERNEL SELFTEST FRAMEWORK, open list, shuah
Hi Daniel,
On 1/18/19 10:54 AM, Daniel Díaz wrote:
> Hello!
>
> On Wed, 16 Jan 2019 at 15:56, shuah <shuah@kernel.org> wrote:
>>
>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
>>> From: Fathi Boudra <fathi.boudra@linaro.org>
>>>
>>> Relax CC assignment to allow to override CC in the top-level Makefile.
>>>
>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Author signed-off missing on this patch. I am dropping this patch
from rc5 for now. Please fix it resend the patch. In the future,
I would like to see that author sends the patch.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 15:01 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-28 15:01 UTC (permalink / raw)
Hi Daniel,
On 1/18/19 10:54 AM, Daniel Díaz wrote:
> Hello!
>
> On Wed, 16 Jan 2019@15:56, shuah <shuah@kernel.org> wrote:
>>
>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
>>> From: Fathi Boudra <fathi.boudra at linaro.org>
>>>
>>> Relax CC assignment to allow to override CC in the top-level Makefile.
>>>
>>> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
Author signed-off missing on this patch. I am dropping this patch
from rc5 for now. Please fix it resend the patch. In the future,
I would like to see that author sends the patch.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 15:01 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-28 15:01 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
Hi Daniel,
On 1/18/19 10:54 AM, Daniel Díaz wrote:
> Hello!
>
> On Wed, 16 Jan 2019 at 15:56, shuah <shuah at kernel.org> wrote:
>>
>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
>>> From: Fathi Boudra <fathi.boudra at linaro.org>
>>>
>>> Relax CC assignment to allow to override CC in the top-level Makefile.
>>>
>>> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
Author signed-off missing on this patch. I am dropping this patch
from rc5 for now. Please fix it resend the patch. In the future,
I would like to see that author sends the patch.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
2019-01-28 15:01 ` shuah
(?)
@ 2019-01-28 15:42 ` denys
-1 siblings, 0 replies; 36+ messages in thread
From: Denys Dmytriyenko @ 2019-01-28 15:42 UTC (permalink / raw)
To: shuah
Cc: Daniel Díaz, Fathi Boudra,
open list:KERNEL SELFTEST FRAMEWORK, open list
On Mon, Jan 28, 2019 at 08:01:15AM -0700, shuah wrote:
> Hi Daniel,
>
> On 1/18/19 10:54 AM, Daniel Díaz wrote:
> >Hello!
> >
> >On Wed, 16 Jan 2019 at 15:56, shuah <shuah@kernel.org> wrote:
> >>
> >>On 1/16/19 10:43 AM, Daniel Díaz wrote:
> >>>From: Fathi Boudra <fathi.boudra@linaro.org>
> >>>
> >>>Relax CC assignment to allow to override CC in the top-level Makefile.
> >>>
> >>>Signed-off-by: Denys Dmytriyenko <denys@ti.com>
^^^ I am the original author of the patch and this is my signed-off line.
> Author signed-off missing on this patch. I am dropping this patch
> from rc5 for now. Please fix it resend the patch. In the future,
> I would like to see that author sends the patch.
--
Denys
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 15:42 ` denys
0 siblings, 0 replies; 36+ messages in thread
From: Denys Dmytriyenko @ 2019-01-28 15:42 UTC (permalink / raw)
On Mon, Jan 28, 2019@08:01:15AM -0700, shuah wrote:
> Hi Daniel,
>
> On 1/18/19 10:54 AM, Daniel Díaz wrote:
> >Hello!
> >
> >On Wed, 16 Jan 2019@15:56, shuah <shuah@kernel.org> wrote:
> >>
> >>On 1/16/19 10:43 AM, Daniel Díaz wrote:
> >>>From: Fathi Boudra <fathi.boudra at linaro.org>
> >>>
> >>>Relax CC assignment to allow to override CC in the top-level Makefile.
> >>>
> >>>Signed-off-by: Denys Dmytriyenko <denys at ti.com>
^^^ I am the original author of the patch and this is my signed-off line.
> Author signed-off missing on this patch. I am dropping this patch
> from rc5 for now. Please fix it resend the patch. In the future,
> I would like to see that author sends the patch.
--
Denys
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 15:42 ` denys
0 siblings, 0 replies; 36+ messages in thread
From: denys @ 2019-01-28 15:42 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
On Mon, Jan 28, 2019 at 08:01:15AM -0700, shuah wrote:
> Hi Daniel,
>
> On 1/18/19 10:54 AM, Daniel Díaz wrote:
> >Hello!
> >
> >On Wed, 16 Jan 2019 at 15:56, shuah <shuah at kernel.org> wrote:
> >>
> >>On 1/16/19 10:43 AM, Daniel Díaz wrote:
> >>>From: Fathi Boudra <fathi.boudra at linaro.org>
> >>>
> >>>Relax CC assignment to allow to override CC in the top-level Makefile.
> >>>
> >>>Signed-off-by: Denys Dmytriyenko <denys at ti.com>
^^^ I am the original author of the patch and this is my signed-off line.
> Author signed-off missing on this patch. I am dropping this patch
> from rc5 for now. Please fix it resend the patch. In the future,
> I would like to see that author sends the patch.
--
Denys
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
2019-01-28 15:42 ` denys
(?)
@ 2019-01-28 16:28 ` shuah
-1 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-28 16:28 UTC (permalink / raw)
To: Denys Dmytriyenko
Cc: Daniel Díaz, Fathi Boudra,
open list:KERNEL SELFTEST FRAMEWORK, open list, shuah
On 1/28/19 8:42 AM, Denys Dmytriyenko wrote:
> On Mon, Jan 28, 2019 at 08:01:15AM -0700, shuah wrote:
>> Hi Daniel,
>>
>> On 1/18/19 10:54 AM, Daniel Díaz wrote:
>>> Hello!
>>>
>>> On Wed, 16 Jan 2019 at 15:56, shuah <shuah@kernel.org> wrote:
>>>>
>>>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
>>>>> From: Fathi Boudra <fathi.boudra@linaro.org>
This is the problem. It says, it came from Fathi Boudra
<fathi.boudra@linaro.org>
>>>>>
>>>>> Relax CC assignment to allow to override CC in the top-level Makefile.
>>>>>
>>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
>
> ^^^ I am the original author of the patch and this is my signed-off line.
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 16:28 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-28 16:28 UTC (permalink / raw)
On 1/28/19 8:42 AM, Denys Dmytriyenko wrote:
> On Mon, Jan 28, 2019@08:01:15AM -0700, shuah wrote:
>> Hi Daniel,
>>
>> On 1/18/19 10:54 AM, Daniel Díaz wrote:
>>> Hello!
>>>
>>> On Wed, 16 Jan 2019@15:56, shuah <shuah@kernel.org> wrote:
>>>>
>>>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
>>>>> From: Fathi Boudra <fathi.boudra at linaro.org>
This is the problem. It says, it came from Fathi Boudra
<fathi.boudra at linaro.org>
>>>>>
>>>>> Relax CC assignment to allow to override CC in the top-level Makefile.
>>>>>
>>>>> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
>
> ^^^ I am the original author of the patch and this is my signed-off line.
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 16:28 ` shuah
0 siblings, 0 replies; 36+ messages in thread
From: shuah @ 2019-01-28 16:28 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
On 1/28/19 8:42 AM, Denys Dmytriyenko wrote:
> On Mon, Jan 28, 2019 at 08:01:15AM -0700, shuah wrote:
>> Hi Daniel,
>>
>> On 1/18/19 10:54 AM, Daniel Díaz wrote:
>>> Hello!
>>>
>>> On Wed, 16 Jan 2019 at 15:56, shuah <shuah at kernel.org> wrote:
>>>>
>>>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
>>>>> From: Fathi Boudra <fathi.boudra at linaro.org>
This is the problem. It says, it came from Fathi Boudra
<fathi.boudra at linaro.org>
>>>>>
>>>>> Relax CC assignment to allow to override CC in the top-level Makefile.
>>>>>
>>>>> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
>
> ^^^ I am the original author of the patch and this is my signed-off line.
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
2019-01-28 16:28 ` shuah
(?)
@ 2019-01-28 17:01 `
-1 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-28 17:01 UTC (permalink / raw)
To: Denys Dmytriyenko
Cc: Fathi Boudra, open list:KERNEL SELFTEST FRAMEWORK, open list, shuah
Hello!
On Mon, 28 Jan 2019 at 10:28, shuah <shuah@kernel.org> wrote:
> On 1/28/19 8:42 AM, Denys Dmytriyenko wrote:
> > On Mon, Jan 28, 2019 at 08:01:15AM -0700, shuah wrote:
> >> Hi Daniel,
> >>
> >> On 1/18/19 10:54 AM, Daniel Díaz wrote:
> >>> Hello!
> >>>
> >>> On Wed, 16 Jan 2019 at 15:56, shuah <shuah@kernel.org> wrote:
> >>>>
> >>>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
> >>>>> From: Fathi Boudra <fathi.boudra@linaro.org>
>
> This is the problem. It says, it came from Fathi Boudra
> <fathi.boudra@linaro.org>
Denys, apologies for sending this patch as Fathi's. In our Git
repository [1] he's marked as author, probably as it got copied from
repo to repo.
Would you mind sending this patch yourself?
Thanks and greetings!
Daniel Díaz
daniel.diaz@linaro.org
[1] https://github.com/96boards/meta-rpb/blob/master/recipes-overlayed/kselftests/files/0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch
> >>>>> Relax CC assignment to allow to override CC in the top-level Makefile.
> >>>>>
> >>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> >
> > ^^^ I am the original author of the patch and this is my signed-off line.
> >
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 17:01 `
0 siblings, 0 replies; 36+ messages in thread
From: Daniel Díaz @ 2019-01-28 17:01 UTC (permalink / raw)
Hello!
On Mon, 28 Jan 2019@10:28, shuah <shuah@kernel.org> wrote:
> On 1/28/19 8:42 AM, Denys Dmytriyenko wrote:
> > On Mon, Jan 28, 2019@08:01:15AM -0700, shuah wrote:
> >> Hi Daniel,
> >>
> >> On 1/18/19 10:54 AM, Daniel Díaz wrote:
> >>> Hello!
> >>>
> >>> On Wed, 16 Jan 2019@15:56, shuah <shuah@kernel.org> wrote:
> >>>>
> >>>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
> >>>>> From: Fathi Boudra <fathi.boudra at linaro.org>
>
> This is the problem. It says, it came from Fathi Boudra
> <fathi.boudra at linaro.org>
Denys, apologies for sending this patch as Fathi's. In our Git
repository [1] he's marked as author, probably as it got copied from
repo to repo.
Would you mind sending this patch yourself?
Thanks and greetings!
Daniel Díaz
daniel.diaz at linaro.org
[1] https://github.com/96boards/meta-rpb/blob/master/recipes-overlayed/kselftests/files/0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch
> >>>>> Relax CC assignment to allow to override CC in the top-level Makefile.
> >>>>>
> >>>>> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
> >
> > ^^^ I am the original author of the patch and this is my signed-off line.
> >
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/4] selftests: lib: allow to override CC in the top-level Makefile
@ 2019-01-28 17:01 `
0 siblings, 0 replies; 36+ messages in thread
From: @ 2019-01-28 17:01 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]
Hello!
On Mon, 28 Jan 2019 at 10:28, shuah <shuah at kernel.org> wrote:
> On 1/28/19 8:42 AM, Denys Dmytriyenko wrote:
> > On Mon, Jan 28, 2019 at 08:01:15AM -0700, shuah wrote:
> >> Hi Daniel,
> >>
> >> On 1/18/19 10:54 AM, Daniel Díaz wrote:
> >>> Hello!
> >>>
> >>> On Wed, 16 Jan 2019 at 15:56, shuah <shuah at kernel.org> wrote:
> >>>>
> >>>> On 1/16/19 10:43 AM, Daniel Díaz wrote:
> >>>>> From: Fathi Boudra <fathi.boudra at linaro.org>
>
> This is the problem. It says, it came from Fathi Boudra
> <fathi.boudra at linaro.org>
Denys, apologies for sending this patch as Fathi's. In our Git
repository [1] he's marked as author, probably as it got copied from
repo to repo.
Would you mind sending this patch yourself?
Thanks and greetings!
Daniel Díaz
daniel.diaz at linaro.org
[1] https://github.com/96boards/meta-rpb/blob/master/recipes-overlayed/kselftests/files/0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch
> >>>>> Relax CC assignment to allow to override CC in the top-level Makefile.
> >>>>>
> >>>>> Signed-off-by: Denys Dmytriyenko <denys at ti.com>
> >
> > ^^^ I am the original author of the patch and this is my signed-off line.
> >
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 36+ messages in thread