[PATCH 2/2] testsuite/dl: Add C++ by default for DL tests which use C++.
Chris Johns
chrisj at rtems.org
Tue Aug 22 04:48:08 UTC 2017
- Add AM C++ support to the testsuite configure.ac script.
- Fix the dependences in the DL tests.
Closes #3024.
---
testsuites/libtests/configure.ac | 1 +
testsuites/libtests/dl01/Makefile.am | 13 +++++--------
testsuites/libtests/dl02/Makefile.am | 13 +++++--------
testsuites/libtests/dl04/Makefile.am | 13 +++++--------
testsuites/libtests/dl05/Makefile.am | 13 +++++--------
5 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index 84acb0358c..d41d135b64 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -12,6 +12,7 @@ AM_INIT_AUTOMAKE([no-define foreign 1.12.2])
AM_MAINTAINER_MODE
RTEMS_ENABLE_CXX
+AC_PROG_CXX
RTEMS_ENV_RTEMSBSP
RTEMS_CHECK_RTEMS_TEST_NO_PAUSE
diff --git a/testsuites/libtests/dl01/Makefile.am b/testsuites/libtests/dl01/Makefile.am
index d7c9a0d507..8c5d6912d5 100644
--- a/testsuites/libtests/dl01/Makefile.am
+++ b/testsuites/libtests/dl01/Makefile.am
@@ -14,6 +14,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(dl01_OBJECTS)
LINK_LIBS = $(dl01_LDLIBS)
+init.$(OBJEXT): dl-tar.h
+
dl-o1.o: dl-o1.c
dl.tar: dl-o1.o
@@ -29,14 +31,9 @@ dl-tar.h: dl.tar
$(BIN2C) -H $< $@
CLEANFILES += dl-tar.h
-dl01.pre$(EXEEXT): $(dl01_OBJECTS) $(dl01_DEPENDENCIES)
- @rm -f dl01.pre$(EXEEXT)
- $(make-exe)
- rm -f dl01.pre.ralf
-
-dl01.pre: dl01.pre$(EXEEXT)
- mv $< $@
-CLEANFILES += dl01.pre
+dl01.pre: $(dl01_OBJECTS) $(dl01_DEPENDENCIES)
+ @rm -f dl01.pre
+ $(LINK_APP)
dl-sym.o: dl01.pre
rtems-syms -e -c "$(CFLAGS)" -o $@ $<
diff --git a/testsuites/libtests/dl02/Makefile.am b/testsuites/libtests/dl02/Makefile.am
index 39a8efe82a..aa848e4247 100644
--- a/testsuites/libtests/dl02/Makefile.am
+++ b/testsuites/libtests/dl02/Makefile.am
@@ -14,6 +14,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(dl02_OBJECTS)
LINK_LIBS = $(dl02_LDLIBS)
+init.$(OBJEXT): dl-tar.h
+
dl-o1.o: dl-o1.c
dl-o2.o: dl-o2.c
@@ -31,14 +33,9 @@ dl-tar.h: dl.tar
$(BIN2C) -H $< $@
CLEANFILES += dl-tar.h
-dl02.pre$(EXEEXT): $(dl02_OBJECTS) $(dl02_DEPENDENCIES)
- @rm -f dl02.pre$(EXEEXT)
- $(make-exe)
- rm -f dl02.pre.ralf
-
-dl02.pre: dl02.pre$(EXEEXT)
- mv $< $@
-CLEANFILES += dl02.pre
+dl02.pre: $(dl02_OBJECTS) $(dl02_DEPENDENCIES)
+ @rm -f dl02.pre
+ $(LINK_APP)
dl-sym.o: dl02.pre
rtems-syms -e -c "$(CFLAGS)" -o $@ $<
diff --git a/testsuites/libtests/dl04/Makefile.am b/testsuites/libtests/dl04/Makefile.am
index d45bc87c4d..7dbc5438e8 100644
--- a/testsuites/libtests/dl04/Makefile.am
+++ b/testsuites/libtests/dl04/Makefile.am
@@ -15,6 +15,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(dl04_OBJECTS)
LINK_LIBS = $(dl04_LDLIBS)
+init.$(OBJEXT): dl-tar.h
+
dl-o4.o: dl-o4.cpp
dl.tar: dl-o4.o
@@ -30,14 +32,9 @@ dl-tar.h: dl.tar
$(BIN2C) -H $< $@
CLEANFILES += dl-tar.h
-dl04.pre$(EXEEXT): $(dl04_OBJECTS) $(dl04_DEPENDENCIES)
- @rm -f dl04.pre$(EXEEXT)
- $(make-exe)
- rm -f dl04.pre.ralf
-
-dl04.pre: dl04.pre$(EXEEXT)
- mv $< $@
-CLEANFILES += dl04.pre
+dl04.pre: $(dl04_OBJECTS) $(dl04_DEPENDENCIES)
+ @rm -f dl04.pre
+ $(LINK_APP)
dl-sym.o: dl04.pre
rtems-syms -e -c "$(CFLAGS)" -o $@ $<
diff --git a/testsuites/libtests/dl05/Makefile.am b/testsuites/libtests/dl05/Makefile.am
index d63f355c76..8d2ddee638 100644
--- a/testsuites/libtests/dl05/Makefile.am
+++ b/testsuites/libtests/dl05/Makefile.am
@@ -14,6 +14,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(dl05_OBJECTS)
LINK_LIBS = $(dl05_LDLIBS)
+init.$(OBJEXT): dl-tar.h
+
dl-o5.o: dl-o5.cpp
dl.tar: dl-o5.o
@@ -29,15 +31,10 @@ dl-tar.h: dl.tar
$(BIN2C) -H $< $@
CLEANFILES += dl-tar.h
-dl05.pre$(EXEEXT): $(dl05_OBJECTS) $(dl05_DEPENDENCIES)
- @rm -f dl05.pre$(EXEEXT)
+dl05.pre: $(dl05_OBJECTS) $(dl05_DEPENDENCIES)
+ @rm -f dl05.pre
$(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
- -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
- rm -f dl05.pre.ralf
-
-dl05.pre: dl05.pre$(EXEEXT)
- mv $< $@
-CLEANFILES += dl05.pre
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
dl-sym.o: dl05.pre
rtems-syms -e -c "$(CFLAGS)" -o $@ $<
--
2.13.2
More information about the devel
mailing list