This patch backports the makefile changes related to the support/ framework. It is based on upstream commits c23de0aacbeaa7a091609b35764bed931475a16d (support: Introduce new subdirectory for test infrastructure) and 76dcbf42df83c970c13c786d287f1ec69e1b91eb (Expose linking against libsupport as make dependency). The actual contents of the support/ subdirectory is kept in a separate patch, so that it can be updated separately. diff --git a/Makeconfig b/Makeconfig index 1673eea7f2667aae..948c46420193051d 100644 --- a/Makeconfig +++ b/Makeconfig @@ -384,6 +384,9 @@ LDFLAGS.so += $(hashstyle-LDFLAGS) LDFLAGS-rtld += $(hashstyle-LDFLAGS) endif +# Additional libraries to link into every test. +link-extra-libs-tests = $(libsupport) + # Command for linking PIE programs with the C library. ifndef +link-pie +link-pie = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \ @@ -464,7 +467,7 @@ link-libc-before-gnulib = -Wl,-rpath-link=$(rpath-link) \ link-libc = $(link-libc-before-gnulib) $(gnulib) link-libc-tests = $(link-libc-before-gnulib) $(gnulib-tests) # This is how to find at build-time things that will be installed there. -rpath-dirs = math elf dlfcn nss nis rt resolv crypt +rpath-dirs = math elf dlfcn nss nis rt resolv crypt support rpath-link = \ $(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%))) else @@ -732,7 +735,7 @@ libio-include = -I$(..)libio # List of non-library modules that we build. built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \ libSegFault libpcprofile librpcsvc locale-programs \ - memusagestat nonlib nscd extramodules libnldbl + memusagestat nonlib nscd extramodules libnldbl libsupport in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \ $(libof-$(