<div dir="auto">Does doing this mean that autoconf probes now need to pass an extra library to link against?<div dir="auto"><br></div><div dir="auto">The detault config primarily exists to allow autoconf probes to work. If it adds the need to specify an additional library argument, then it impacts the configuration, rsb recipes, and build instructions for every add-on package. It also could result in the default configuration library being included in what the add-on recommends via something like pkgconfig.</div><div dir="auto"><br></div><div dir="auto">Have you built external add-ons with this change?</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Oct 14, 2018, 11:42 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">An RTEMS application default configuration is contained in<br>
cpukit/libmisc/dummy/default-configuration.c. This default<br>
configuration was contained in librtemscpu.a. This had at least two<br>
problems:<br>
<br>
1. Application configuration errors may have pulled in the default<br>
configuration which in turn lead to multiply define symbols error.<br>
This was quite confusing. You had to consult the linker map file to<br>
figure out what cased the pull in of the default configuration. You<br>
needed to know what a linker map file is and how you generate it with<br>
your build system. This was not very user friendly.<br>
<br>
2. It prevented the use of default configuration items for each subsystem<br>
in librtemscpu.a. This may be used to reduce the size of the<br>
configuration itself.<br>
<br>
Move the default configuration to the separate library<br>
librtemsdefaultconfig.a.<br>
<br>
Close #3551.<br>
---<br>
cpukit/Makefile.am | 6 +++++-<br>
testsuites/libtests/Makefile.am | 47 +++++++++++++++++++++++++++++++++++++++++<br>
2 files changed, 52 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am<br>
index b7a44f377d..39dbbcfc35 100644<br>
--- a/cpukit/Makefile.am<br>
+++ b/cpukit/Makefile.am<br>
@@ -287,7 +287,6 @@ librtemscpu_a_SOURCES += libmisc/cpuuse/cpuusagereset.c<br>
librtemscpu_a_SOURCES += libmisc/cpuuse/cpuusagetop.c<br>
librtemscpu_a_SOURCES += libmisc/devnull/devnull.c<br>
librtemscpu_a_SOURCES += libmisc/devnull/devzero.c<br>
-librtemscpu_a_SOURCES += libmisc/dummy/default-configuration.c<br>
librtemscpu_a_SOURCES += libmisc/dummy/dummy-networking.c<br>
librtemscpu_a_SOURCES += libmisc/dumpbuf/dumpbuf.c<br>
librtemscpu_a_SOURCES += libmisc/fb/mw_print.c<br>
@@ -1845,6 +1844,11 @@ $(top_srcdir)/sapi/src/version.c: version-vc-key.h<br>
<br>
all-local: generate-vc-key<br>
<br>
+project_lib_LIBRARIES += librtemsdefaultconfig.a<br>
+<br>
+librtemsdefaultconfig_a_SOURCES =<br>
+librtemsdefaultconfig_a_SOURCES += libmisc/dummy/default-configuration.c<br>
+<br>
project_lib_LIBRARIES += libftpd.a<br>
<br>
libftpd_a_SOURCES =<br>
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am<br>
index 1ffab4eef3..9e3d2143d6 100644<br>
--- a/testsuites/libtests/Makefile.am<br>
+++ b/testsuites/libtests/Makefile.am<br>
@@ -188,6 +188,7 @@ endif<br>
if TEST_calloc<br>
lib_tests += calloc.norun<br>
calloc_norun_SOURCES = POSIX/calloc.c<br>
+calloc_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_capture01<br>
@@ -203,11 +204,13 @@ endif<br>
if TEST_clock_gettime<br>
lib_tests += clock_gettime.norun<br>
clock_gettime_norun_SOURCES = POSIX/clock_gettime.c<br>
+clock_gettime_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_close<br>
lib_tests += close.norun<br>
close_norun_SOURCES = POSIX/close.c<br>
+close_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_complex<br>
@@ -257,6 +260,7 @@ lib_docs += defaultconfig01/defaultconfig01.doc<br>
defaultconfig01_SOURCES = defaultconfig01/init.c<br>
defaultconfig01_CPPFLAGS = $(AM_CPPFLAGS) \<br>
$(TEST_FLAGS_defaultconfig01) $(support_includes)<br>
+defaultconfig01_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_devfs01<br>
@@ -520,6 +524,7 @@ endif<br>
if TEST_dup2<br>
lib_tests += dup2.norun<br>
dup2_norun_SOURCES = POSIX/dup2.c<br>
+dup2_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_exit01<br>
@@ -543,6 +548,7 @@ endif<br>
if TEST_fcntl<br>
lib_tests += fcntl.norun<br>
fcntl_norun_SOURCES = POSIX/fcntl.c<br>
+fcntl_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_flashdisk01<br>
@@ -558,21 +564,25 @@ endif<br>
if TEST_flockfile<br>
lib_tests += flockfile.norun<br>
flockfile_norun_SOURCES = POSIX/flockfile.c<br>
+flockfile_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_fork<br>
lib_tests += fork.norun<br>
fork_norun_SOURCES = POSIX/fork.c<br>
+fork_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_free<br>
lib_tests += free.norun<br>
free_norun_SOURCES = POSIX/free.c<br>
+free_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_fstat<br>
lib_tests += fstat.norun<br>
fstat_norun_SOURCES = POSIX/fstat.c<br>
+fstat_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if NETTESTS<br>
@@ -590,11 +600,13 @@ endif<br>
if TEST_ftrylockfile<br>
lib_tests += ftrylockfile.norun<br>
ftrylockfile_norun_SOURCES = POSIX/ftrylockfile.c<br>
+ftrylockfile_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_funlockfile<br>
lib_tests += funlockfile.norun<br>
funlockfile_norun_SOURCES = POSIX/funlockfile.c<br>
+funlockfile_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_getentropy01<br>
@@ -609,26 +621,31 @@ endif<br>
if TEST_getlogin<br>
lib_tests += getlogin.norun<br>
getlogin_norun_SOURCES = POSIX/getlogin.c<br>
+getlogin_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_getpwnam<br>
lib_tests += getpwnam.norun<br>
getpwnam_norun_SOURCES = POSIX/getpwnam.c<br>
+getpwnam_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_getpwuid<br>
lib_tests += getpwuid.norun<br>
getpwuid_norun_SOURCES = POSIX/getpwuid.c<br>
+getpwuid_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_gettimeofday<br>
lib_tests += gettimeofday.norun<br>
gettimeofday_norun_SOURCES = POSIX/gettimeofday.c<br>
+gettimeofday_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_getuid<br>
lib_tests += getuid.norun<br>
getuid_norun_SOURCES = POSIX/getuid.c<br>
+getuid_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_gxx01<br>
@@ -651,6 +668,7 @@ endif<br>
if TEST_htonl<br>
lib_tests += htonl.norun<br>
htonl_norun_SOURCES = POSIX/htonl.c<br>
+htonl_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_i2c01<br>
@@ -665,21 +683,25 @@ endif<br>
if TEST_iconv<br>
lib_tests += iconv.norun<br>
iconv_norun_SOURCES = POSIX/iconv.c<br>
+iconv_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_iconv_close<br>
lib_tests += iconv_close.norun<br>
iconv_close_norun_SOURCES = POSIX/iconv_close.c<br>
+iconv_close_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_iconv_open<br>
lib_tests += iconv_open.norun<br>
iconv_open_norun_SOURCES = POSIX/iconv_open.c<br>
+iconv_open_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_kill<br>
lib_tests += kill.norun<br>
kill_norun_SOURCES = POSIX/kill.c<br>
+kill_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_libfdt01<br>
@@ -694,21 +716,25 @@ endif<br>
if TEST_longjmp<br>
lib_tests += longjmp.norun<br>
longjmp_norun_SOURCES = POSIX/longjmp.c<br>
+longjmp_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_lseek<br>
lib_tests += lseek.norun<br>
lseek_norun_SOURCES = POSIX/lseek.c<br>
+lseek_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_lstat<br>
lib_tests += lstat.norun<br>
lstat_norun_SOURCES = POSIX/lstat.c<br>
+lstat_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_malloc<br>
lib_tests += malloc.norun<br>
malloc_norun_SOURCES = POSIX/malloc.c<br>
+malloc_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_malloc02<br>
@@ -835,6 +861,7 @@ endif<br>
if TEST_nanosleep<br>
lib_tests += nanosleep.norun<br>
nanosleep_norun_SOURCES = POSIX/nanosleep.c<br>
+nanosleep_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if NETTESTS<br>
@@ -860,16 +887,19 @@ endif<br>
if TEST_open<br>
lib_tests += open.norun<br>
open_norun_SOURCES = POSIX/open.c<br>
+open_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_pipe<br>
lib_tests += pipe.norun<br>
pipe_norun_SOURCES = POSIX/pipe.c<br>
+pipe_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_posix_memalign<br>
lib_tests += posix_memalign.norun<br>
posix_memalign_norun_SOURCES = POSIX/posix_memalign.c<br>
+posix_memalign_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_putenvtest<br>
@@ -910,16 +940,19 @@ endif<br>
if TEST_read<br>
lib_tests += read.norun<br>
read_norun_SOURCES = POSIX/read.c<br>
+read_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_readv<br>
lib_tests += readv.norun<br>
readv_norun_SOURCES = POSIX/readv.c<br>
+readv_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_realloc<br>
lib_tests += realloc.norun<br>
realloc_norun_SOURCES = POSIX/realloc.c<br>
+realloc_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_rtmonuse<br>
@@ -934,6 +967,7 @@ endif<br>
if TEST_setjmp<br>
lib_tests += setjmp.norun<br>
setjmp_norun_SOURCES = POSIX/setjmp.c<br>
+setjmp_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sha<br>
@@ -956,31 +990,37 @@ endif<br>
if TEST_sigaddset<br>
lib_tests += sigaddset.norun<br>
sigaddset_norun_SOURCES = POSIX/sigaddset.c<br>
+sigaddset_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sigdelset<br>
lib_tests += sigdelset.norun<br>
sigdelset_norun_SOURCES = POSIX/sigdelset.c<br>
+sigdelset_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sigemptyset<br>
lib_tests += sigemptyset.norun<br>
sigemptyset_norun_SOURCES = POSIX/sigemptyset.c<br>
+sigemptyset_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sigfillset<br>
lib_tests += sigfillset.norun<br>
sigfillset_norun_SOURCES = POSIX/sigfillset.c<br>
+sigfillset_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sigismember<br>
lib_tests += sigismember.norun<br>
sigismember_norun_SOURCES = POSIX/sigismember.c<br>
+sigismember_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sigprocmask<br>
lib_tests += sigprocmask.norun<br>
sigprocmask_norun_SOURCES = POSIX/sigprocmask.c<br>
+sigprocmask_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_sparsedisk01<br>
@@ -1022,6 +1062,7 @@ endif<br>
if TEST_stat<br>
lib_tests += stat.norun<br>
stat_norun_SOURCES = POSIX/stat.c<br>
+stat_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_stringto01<br>
@@ -1273,6 +1314,7 @@ endif<br>
if TEST_unlink<br>
lib_tests += unlink.norun<br>
unlink_norun_SOURCES = POSIX/unlink.c<br>
+unlink_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_utf8proc01<br>
@@ -1287,26 +1329,31 @@ endif<br>
if TEST_vfork<br>
lib_tests += vfork.norun<br>
vfork_norun_SOURCES = POSIX/vfork.c<br>
+vfork_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_wait<br>
lib_tests += wait.norun<br>
wait_norun_SOURCES = POSIX/wait.c<br>
+wait_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_waitpid<br>
lib_tests += waitpid.norun<br>
waitpid_norun_SOURCES = POSIX/waitpid.c<br>
+waitpid_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_write<br>
lib_tests += write.norun<br>
write_norun_SOURCES = POSIX/write.c<br>
+write_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
if TEST_writev<br>
lib_tests += writev.norun<br>
writev_norun_SOURCES = POSIX/writev.c<br>
+writev_norun_LDADD = $(RTEMS_ROOT)cpukit/librtemsdefaultconfig.a $(LDADD)<br>
endif<br>
<br>
rtems_tests_PROGRAMS = $(lib_tests)<br>
-- <br>
2.16.4<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>