about summary refs log tree commit diff
path: root/elf/dl-tunables.h
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2016-12-31 23:34:04 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2016-12-31 23:49:24 +0530
commit6765d5d34d126b26d55e2d73dac4dfec5e6d6241 (patch)
tree4f8c8aebebd366900e8657a91158771e2cf5e058 /elf/dl-tunables.h
parent9dd409a5f4a7a053cc962f8371dad0fe5cc22597 (diff)
downloadglibc-6765d5d34d126b26d55e2d73dac4dfec5e6d6241.tar.gz
glibc-6765d5d34d126b26d55e2d73dac4dfec5e6d6241.tar.xz
glibc-6765d5d34d126b26d55e2d73dac4dfec5e6d6241.zip
Enhance --enable-tunables to select tunables frontend at build time
At the GNU Tools Cauldron 2016, the state of the current tunables
patchset was considered OK with the addition of a way to select the
frontend to be used for the tunables.  That is, to avoid being locked
in to one type of frontend initially, it should be possible to build
tunables with a different frontend with something as simple as a
configure switch.

To that effect, this patch enhances the --enable-tunables option to
accept more values than just 'yes' or 'no'.  The current frontend (and
default when enable-tunables is 'yes') is called 'valstring', to
select the frontend where a single environment variable is set to a
colon-separated value string.  More such frontends can be added in
future.

	* Makeconfig (have-tunables): Check for non-negative instead
	of positive.
	* configure.ac: Add 'valstring' as a valid value for
	--enable-tunables.
	* configure: Regenerate.
	* elf/Makefile (have-tunables): Check for non-negative instead
	of positive.
	(CPPFLAGS-dl-tunables.c): Define TUNABLES_FRONTEND for
	dl-tunables.c.
	* elf/dl-tunables.c (GLIBC_TUNABLES): Define only when
	TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring.
	(tunables_strdup): Likewise.
	(disable_tunables): Likewise.
	(parse_tunables): Likewise.
	(__tunables_init): Process GLIBC_TUNABLES envvar only when.
	TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring.
	* elf/dl-tunables.h (TUNABLES_FRONTEND_valstring): New macro.
	(TUNABLES_FRONTEND_yes): New macro, define as
	TUNABLES_FRONTEND_valstring by default.
	* manual/install.texi: Document new acceptable values for
	--enable-tunables.
	* INSTALL: Regenerate.
Diffstat (limited to 'elf/dl-tunables.h')
-rw-r--r--elf/dl-tunables.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dl-tunables.h b/elf/dl-tunables.h
index a3f5472b45..033781856a 100644
--- a/elf/dl-tunables.h
+++ b/elf/dl-tunables.h
@@ -84,5 +84,9 @@ extern void __tunable_set_val (tunable_id_t, void *, tunable_callback_t);
 /* Namespace sanity for callback functions.  Use this macro to keep the
    namespace of the modules clean.  */
 # define DL_TUNABLE_CALLBACK(__name) _dl_tunable_ ## __name
+
+# define TUNABLES_FRONTEND_valstring 1
+/* The default value for TUNABLES_FRONTEND.  */
+# define TUNABLES_FRONTEND_yes TUNABLES_FRONTEND_valstring
 #endif
 #endif