diff options
author | Tomasz Figa | 2017-01-27 01:21:19 -0600 |
---|---|---|
committer | Emil Velikov | 2017-01-27 10:18:02 -0600 |
commit | 8ef7e5b7026d06a803f0bf75fe323c14f142db3a (patch) | |
tree | 4980e7fa9fea6b7ed8da1884be60e2fcace34312 | |
parent | 58459a57fa7202ca2c1f10607ac2d91c6c05f55f (diff) | |
download | external-libdrm-8ef7e5b7026d06a803f0bf75fe323c14f142db3a.tar.gz external-libdrm-8ef7e5b7026d06a803f0bf75fe323c14f142db3a.tar.xz external-libdrm-8ef7e5b7026d06a803f0bf75fe323c14f142db3a.zip |
tests: Use -pthread in CFLAGS instead of -lpthread
-lpthread is not always a valid flag to pull pthread support, especially
on Android it will fail to link due to a missing libpthread.so. The more
generic way to build-in pthread support is to use the -pthread CFLAG, so
let's use it instead.
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: rebase on top of previous commit]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | tests/exynos/Makefile.am | 4 | ||||
-rw-r--r-- | tests/modetest/Makefile.am | 4 | ||||
-rw-r--r-- | tests/nouveau/Makefile.am | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/tests/exynos/Makefile.am b/tests/exynos/Makefile.am index 357d6b8c..b6361727 100644 --- a/tests/exynos/Makefile.am +++ b/tests/exynos/Makefile.am | |||
@@ -1,4 +1,5 @@ | |||
1 | AM_CFLAGS = \ | 1 | AM_CFLAGS = \ |
2 | -pthread \ | ||
2 | $(WARN_CFLAGS)\ | 3 | $(WARN_CFLAGS)\ |
3 | -I $(top_srcdir)/include/drm \ | 4 | -I $(top_srcdir)/include/drm \ |
4 | -I $(top_srcdir)/libkms/ \ | 5 | -I $(top_srcdir)/libkms/ \ |
@@ -34,8 +35,7 @@ exynos_fimg2d_perf_LDADD = \ | |||
34 | 35 | ||
35 | exynos_fimg2d_event_LDADD = \ | 36 | exynos_fimg2d_event_LDADD = \ |
36 | $(top_builddir)/libdrm.la \ | 37 | $(top_builddir)/libdrm.la \ |
37 | $(top_builddir)/exynos/libdrm_exynos.la \ | 38 | $(top_builddir)/exynos/libdrm_exynos.la |
38 | -lpthread | ||
39 | 39 | ||
40 | exynos_fimg2d_test_LDADD = \ | 40 | exynos_fimg2d_test_LDADD = \ |
41 | $(top_builddir)/libdrm.la \ | 41 | $(top_builddir)/libdrm.la \ |
diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am index 9686ccb9..4b296c83 100644 --- a/tests/modetest/Makefile.am +++ b/tests/modetest/Makefile.am | |||
@@ -3,6 +3,7 @@ include Makefile.sources | |||
3 | AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS)) | 3 | AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS)) |
4 | 4 | ||
5 | AM_CFLAGS += \ | 5 | AM_CFLAGS += \ |
6 | -pthread \ | ||
6 | -I$(top_srcdir)/include/drm \ | 7 | -I$(top_srcdir)/include/drm \ |
7 | -I$(top_srcdir)/tests \ | 8 | -I$(top_srcdir)/tests \ |
8 | -I$(top_srcdir) | 9 | -I$(top_srcdir) |
@@ -20,5 +21,4 @@ modetest_SOURCES = $(MODETEST_FILES) | |||
20 | modetest_LDADD = \ | 21 | modetest_LDADD = \ |
21 | $(top_builddir)/libdrm.la \ | 22 | $(top_builddir)/libdrm.la \ |
22 | $(top_builddir)/tests/util/libutil.la \ | 23 | $(top_builddir)/tests/util/libutil.la \ |
23 | $(CAIRO_LIBS) \ | 24 | $(CAIRO_LIBS) |
24 | -lpthread | ||
diff --git a/tests/nouveau/Makefile.am b/tests/nouveau/Makefile.am index 225d6e64..3c799a81 100644 --- a/tests/nouveau/Makefile.am +++ b/tests/nouveau/Makefile.am | |||
@@ -1,4 +1,5 @@ | |||
1 | AM_CFLAGS = \ | 1 | AM_CFLAGS = \ |
2 | -pthread \ | ||
2 | $(WARN_CFLAGS) \ | 3 | $(WARN_CFLAGS) \ |
3 | -I$(top_srcdir)/include/drm \ | 4 | -I$(top_srcdir)/include/drm \ |
4 | -I$(top_srcdir)/nouveau \ | 5 | -I$(top_srcdir)/nouveau \ |
@@ -7,7 +8,7 @@ AM_CFLAGS = \ | |||
7 | LDADD = \ | 8 | LDADD = \ |
8 | ../../nouveau/libdrm_nouveau.la \ | 9 | ../../nouveau/libdrm_nouveau.la \ |
9 | ../../libdrm.la \ | 10 | ../../libdrm.la \ |
10 | -ldl -lpthread | 11 | -ldl |
11 | 12 | ||
12 | TESTS = threaded | 13 | TESTS = threaded |
13 | 14 | ||