diff mbox series

[v12,9/14] validation: stop overriding LDADD variable

Message ID 1515974412-25863-10-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v12,1/14] helper: link against libpthread and libodp-linux | expand

Commit Message

Github ODP bot Jan. 15, 2018, midnight UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


LDADD variable can be used to pass other libraries (like DPDK). Stop
overriding LDADD entirely. Instead use PRELDADD variable or appending to
LDADD.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 377 (lumag:misc-fixes)
 ** https://github.com/Linaro/odp/pull/377
 ** Patch: https://github.com/Linaro/odp/pull/377.patch
 ** Base sha: 634b380b63de53c65b92c214d91aaf03785d69db
 ** Merge commit sha: fc86778a31eef76e515fd1af33f169477c05bd43
 **/
 platform/linux-generic/test/ring/Makefile.am                 | 2 +-
 platform/linux-generic/test/validation/api/shmem/Makefile.am | 3 +--
 test/Makefile.inc                                            | 5 +++--
 test/validation/api/Makefile.inc                             | 1 +
 test/validation/api/atomic/Makefile.am                       | 1 -
 test/validation/api/barrier/Makefile.am                      | 1 -
 test/validation/api/buffer/Makefile.am                       | 1 -
 test/validation/api/chksum/Makefile.am                       | 1 -
 test/validation/api/classification/Makefile.am               | 1 -
 test/validation/api/cpumask/Makefile.am                      | 2 +-
 test/validation/api/crypto/Makefile.am                       | 1 -
 test/validation/api/errno/Makefile.am                        | 1 -
 test/validation/api/event/Makefile.am                        | 1 -
 test/validation/api/hash/Makefile.am                         | 1 -
 test/validation/api/init/Makefile.am                         | 3 ---
 test/validation/api/ipsec/Makefile.am                        | 5 +----
 test/validation/api/lock/Makefile.am                         | 1 -
 test/validation/api/packet/Makefile.am                       | 1 -
 test/validation/api/pktio/Makefile.am                        | 1 -
 test/validation/api/pool/Makefile.am                         | 1 -
 test/validation/api/queue/Makefile.am                        | 1 -
 test/validation/api/random/Makefile.am                       | 1 -
 test/validation/api/scheduler/Makefile.am                    | 1 -
 test/validation/api/shmem/Makefile.am                        | 1 -
 test/validation/api/std_clib/Makefile.am                     | 1 -
 test/validation/api/system/Makefile.am                       | 1 -
 test/validation/api/thread/Makefile.am                       | 2 +-
 test/validation/api/time/Makefile.am                         | 1 -
 test/validation/api/timer/Makefile.am                        | 1 -
 test/validation/api/traffic_mngr/Makefile.am                 | 2 +-
 30 files changed, 10 insertions(+), 36 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/test/ring/Makefile.am b/platform/linux-generic/test/ring/Makefile.am
index 95e5e87f4..8287c7e04 100644
--- a/platform/linux-generic/test/ring/Makefile.am
+++ b/platform/linux-generic/test/ring/Makefile.am
@@ -6,4 +6,4 @@  ring_main_SOURCES = \
 		    ring_suites.c ring_suites.h \
 		    ring_basic.c ring_stress.c
 
-ring_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
+PRELDADD += $(LIBCUNIT_COMMON)
diff --git a/platform/linux-generic/test/validation/api/shmem/Makefile.am b/platform/linux-generic/test/validation/api/shmem/Makefile.am
index f75cbc976..07d311d2f 100644
--- a/platform/linux-generic/test/validation/api/shmem/Makefile.am
+++ b/platform/linux-generic/test/validation/api/shmem/Makefile.am
@@ -7,10 +7,9 @@  test_PROGRAMS = shmem_linux shmem_odp1 shmem_odp2
 shmem_linux_SOURCES = shmem_linux.c shmem_linux.h shmem_common.h
 shmem_linux_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/include
 shmem_linux_LDFLAGS = $(AM_LDFLAGS) -lrt
+shmem_linux_LDADD =
 
 #shmem_odp1 and shmem_odp2 are the 2 ODP processes:
 shmem_odp1_SOURCES = shmem_odp1.c shmem_odp1.h shmem_common.h
-shmem_odp1_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
 
 shmem_odp2_SOURCES = shmem_odp2.c shmem_odp2.h shmem_common.h
-shmem_odp2_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index d4d74c25e..0b5b66dd0 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -10,8 +10,9 @@  LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la
 
 #in the following line, the libs using the symbols should come before
 #the libs containing them! The includer is given a chance to add things
-#before libodp by setting PRE_LDADD before the inclusion.
-LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS)
+#before libodp by setting PRELDADD before the inclusion.
+LDADD = $(PRELDADD) $(LIBODP) $(DPDK_PMDS)
+PRELDADD =
 
 INCFLAGS = \
 	-I$(top_builddir)/platform/@with_platform@/include \
diff --git a/test/validation/api/Makefile.inc b/test/validation/api/Makefile.inc
index 871a37796..8610b5687 100644
--- a/test/validation/api/Makefile.inc
+++ b/test/validation/api/Makefile.inc
@@ -1,2 +1,3 @@ 
 include $(top_srcdir)/test/Makefile.inc
 
+PRELDADD += $(LIBCUNIT_COMMON)
diff --git a/test/validation/api/atomic/Makefile.am b/test/validation/api/atomic/Makefile.am
index 859e3c51a..4de45970f 100644
--- a/test/validation/api/atomic/Makefile.am
+++ b/test/validation/api/atomic/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = atomic_main
 atomic_main_SOURCES = atomic_main.c atomic.c atomic.h
-atomic_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/barrier/Makefile.am b/test/validation/api/barrier/Makefile.am
index b0310e3a5..aad5ddd60 100644
--- a/test/validation/api/barrier/Makefile.am
+++ b/test/validation/api/barrier/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = barrier_main
 barrier_main_SOURCES = barrier_main.c barrier.c barrier.h
-barrier_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/buffer/Makefile.am b/test/validation/api/buffer/Makefile.am
index 59639ff7b..901fdadc7 100644
--- a/test/validation/api/buffer/Makefile.am
+++ b/test/validation/api/buffer/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = buffer_main
 buffer_main_SOURCES = buffer_main.c buffer.c buffer.h
-buffer_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/chksum/Makefile.am b/test/validation/api/chksum/Makefile.am
index 3227294d4..9bd443857 100644
--- a/test/validation/api/chksum/Makefile.am
+++ b/test/validation/api/chksum/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = chksum_main
 chksum_main_SOURCES = chksum_main.c chksum.c chksum.h
-chksum_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/classification/Makefile.am b/test/validation/api/classification/Makefile.am
index b58703079..303a35767 100644
--- a/test/validation/api/classification/Makefile.am
+++ b/test/validation/api/classification/Makefile.am
@@ -9,4 +9,3 @@  classification_main_SOURCES = classification_main.c \
 				   odp_classification_common.c \
 				   classification.c \
 				   classification.h
-classification_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/cpumask/Makefile.am b/test/validation/api/cpumask/Makefile.am
index ff12f56f7..e5c78d924 100644
--- a/test/validation/api/cpumask/Makefile.am
+++ b/test/validation/api/cpumask/Makefile.am
@@ -2,4 +2,4 @@  include ../Makefile.inc
 
 test_PROGRAMS = cpumask_main
 cpumask_main_SOURCES = cpumask_main.c cpumask.c cpumask.h
-cpumask_main_LDADD = $(LIBCPUMASK_COMMON) $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += $(LIBCPUMASK_COMMON)
diff --git a/test/validation/api/crypto/Makefile.am b/test/validation/api/crypto/Makefile.am
index 94f1c1cae..238ce1892 100644
--- a/test/validation/api/crypto/Makefile.am
+++ b/test/validation/api/crypto/Makefile.am
@@ -8,4 +8,3 @@  crypto_main_SOURCES = crypto_main.c \
 		      odp_crypto_test_inp.h \
 		      test_vectors.h \
 		      test_vectors_len.h
-crypto_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/errno/Makefile.am b/test/validation/api/errno/Makefile.am
index 9eddfb482..ad5c7ded4 100644
--- a/test/validation/api/errno/Makefile.am
+++ b/test/validation/api/errno/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = errno_main
 errno_main_SOURCES = errno_main.c errno.c errno.h
-errno_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/event/Makefile.am b/test/validation/api/event/Makefile.am
index be4764b58..762f93568 100644
--- a/test/validation/api/event/Makefile.am
+++ b/test/validation/api/event/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = event_main
 event_main_SOURCES = event_main.c event.c event.h
-event_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/hash/Makefile.am b/test/validation/api/hash/Makefile.am
index bd098ffb6..8f0057782 100644
--- a/test/validation/api/hash/Makefile.am
+++ b/test/validation/api/hash/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = hash_main
 hash_main_SOURCES = hash_main.c hash.c hash.h
-hash_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/init/Makefile.am b/test/validation/api/init/Makefile.am
index 522c3a187..2d0661431 100644
--- a/test/validation/api/init/Makefile.am
+++ b/test/validation/api/init/Makefile.am
@@ -7,6 +7,3 @@  test_PROGRAMS = init_main_abort init_main_log init_main_ok
 init_main_abort_SOURCES = init_main_abort.c init.c init.h
 init_main_log_SOURCES   = init_main_log.c init.c init.h
 init_main_ok_SOURCES    = init_main_ok.c init.c init.h
-init_main_abort_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
-init_main_log_LDADD   = $(LIBCUNIT_COMMON) $(LIBODP)
-init_main_ok_LDADD    = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/ipsec/Makefile.am b/test/validation/api/ipsec/Makefile.am
index b300c8e88..328826995 100644
--- a/test/validation/api/ipsec/Makefile.am
+++ b/test/validation/api/ipsec/Makefile.am
@@ -21,7 +21,4 @@  ipsec_async_SOURCES = ipsec_async.c
 ipsec_inline_in_SOURCES = ipsec_inline_in.c
 ipsec_inline_out_SOURCES = ipsec_inline_out.c
 
-ipsec_sync_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
-ipsec_async_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
-ipsec_inline_in_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
-ipsec_inline_out_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += libtestipsec.la
diff --git a/test/validation/api/lock/Makefile.am b/test/validation/api/lock/Makefile.am
index b434fe77c..c5518b3a8 100644
--- a/test/validation/api/lock/Makefile.am
+++ b/test/validation/api/lock/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = lock_main
 lock_main_SOURCES = lock_main.c lock.c lock.h
-lock_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/packet/Makefile.am b/test/validation/api/packet/Makefile.am
index 43300ed0d..d33cdadbd 100644
--- a/test/validation/api/packet/Makefile.am
+++ b/test/validation/api/packet/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = packet_main
 packet_main_SOURCES = packet_main.c packet.c packet.h
-packet_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/pktio/Makefile.am b/test/validation/api/pktio/Makefile.am
index a416fd1da..a6a16e2f0 100644
--- a/test/validation/api/pktio/Makefile.am
+++ b/test/validation/api/pktio/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = pktio_main
 pktio_main_SOURCES = pktio_main.c parser.c parser.h pktio.c pktio.h
-pktio_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/pool/Makefile.am b/test/validation/api/pool/Makefile.am
index 9e7c42b51..7951d0484 100644
--- a/test/validation/api/pool/Makefile.am
+++ b/test/validation/api/pool/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = pool_main
 pool_main_SOURCES = pool_main.c pool.c pool.h
-pool_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/queue/Makefile.am b/test/validation/api/queue/Makefile.am
index 9b1c6b777..5ed4638bc 100644
--- a/test/validation/api/queue/Makefile.am
+++ b/test/validation/api/queue/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = queue_main
 queue_main_SOURCES = queue_main.c queue.c queue.h
-queue_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/random/Makefile.am b/test/validation/api/random/Makefile.am
index e9e7ffc06..8f1ba9fe0 100644
--- a/test/validation/api/random/Makefile.am
+++ b/test/validation/api/random/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = random_main
 random_main_SOURCES = random_main.c random.c random.h
-random_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/scheduler/Makefile.am b/test/validation/api/scheduler/Makefile.am
index 34abf7d6a..3673ad7ce 100644
--- a/test/validation/api/scheduler/Makefile.am
+++ b/test/validation/api/scheduler/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = scheduler_main
 scheduler_main_SOURCES = scheduler_main.c scheduler.c scheduler.h
-scheduler_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/shmem/Makefile.am b/test/validation/api/shmem/Makefile.am
index 8c5d7f700..9a10668f5 100644
--- a/test/validation/api/shmem/Makefile.am
+++ b/test/validation/api/shmem/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = shmem_main
 shmem_main_SOURCES = shmem_main.c shmem.c shmem.h
-shmem_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/std_clib/Makefile.am b/test/validation/api/std_clib/Makefile.am
index dc75c95cf..34b888bbb 100644
--- a/test/validation/api/std_clib/Makefile.am
+++ b/test/validation/api/std_clib/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = std_clib_main
 std_clib_main_SOURCES = std_clib_main.c std_clib.c std_clib.h
-std_clib_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/system/Makefile.am b/test/validation/api/system/Makefile.am
index 123d3a693..e6fbb0ea5 100644
--- a/test/validation/api/system/Makefile.am
+++ b/test/validation/api/system/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = system_main
 system_main_SOURCES = system_main.c system.c system.h
-system_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/thread/Makefile.am b/test/validation/api/thread/Makefile.am
index 1c56574f4..2282169b9 100644
--- a/test/validation/api/thread/Makefile.am
+++ b/test/validation/api/thread/Makefile.am
@@ -3,4 +3,4 @@  include ../Makefile.inc
 test_PROGRAMS = thread_main
 thread_main_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_THRMASK
 thread_main_SOURCES = thread_main.c thread.c thread.h
-thread_main_LDADD = $(LIBTHRMASK_COMMON) $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += $(LIBTHRMASK_COMMON)
diff --git a/test/validation/api/time/Makefile.am b/test/validation/api/time/Makefile.am
index 669d1226b..4c3340e06 100644
--- a/test/validation/api/time/Makefile.am
+++ b/test/validation/api/time/Makefile.am
@@ -9,7 +9,6 @@  TESTS = $(TESTSCRIPTS)
 
 test_PROGRAMS = time_main
 time_main_SOURCES = time_main.c time.c time_test.h
-time_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
 
 dist_check_SCRIPTS = $(TESTSCRIPTS)
 test_SCRIPTS = $(dist_check_SCRIPTS)
diff --git a/test/validation/api/timer/Makefile.am b/test/validation/api/timer/Makefile.am
index c953dcb34..576174400 100644
--- a/test/validation/api/timer/Makefile.am
+++ b/test/validation/api/timer/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = timer_main
 timer_main_SOURCES = timer_main.c timer.c timer.h
-timer_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/traffic_mngr/Makefile.am b/test/validation/api/traffic_mngr/Makefile.am
index dc4f87092..82996afe0 100644
--- a/test/validation/api/traffic_mngr/Makefile.am
+++ b/test/validation/api/traffic_mngr/Makefile.am
@@ -9,7 +9,7 @@  TESTS = $(TESTSCRIPTS)
 
 test_PROGRAMS = traffic_mngr_main
 traffic_mngr_main_SOURCES = traffic_mngr_main.c traffic_mngr.c traffic_mngr.h
-traffic_mngr_main_LDADD = -lm $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += -lm
 
 dist_check_SCRIPTS = $(TESTSCRIPTS)
 test_SCRIPTS = $(dist_check_SCRIPTS)