This is the mail archive of the
mailing list for the glibc project.
Re: PATCH: Add x32 dummy sysctl
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 17 May 2012 13:09:59 -0700 (PDT)
- Subject: Re: PATCH: Add x32 dummy sysctl
- References: <20120517123111.GA32166@intel.com>
> X32 doesn't have _sysctl system call. This patch adds a dummy. OK
> to install?
Then you shouldn't install <sys/sysctl.h> either. Since these are added to
sysdep_routines and sysdep_headers in sysdeps/unix/sysv/linux/Makefile and
a linux/x32-specific Makefile would be before it, I think what you need to
do is set some variable in linux/x32/Makefile to say there's no sysctl and
then have linux/Makefile check that.
That's hacky, but it's better than moving the settings into copies
in every other linux/<machine>/Makefile.
Alternatively and arguably cleaner though a little less obvious:
move those additions from linux/Makefile into linux/sysctl.mk
and give linux/Makefile:
include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
Then you can add a linux/x32/sysctl.mk to override linux/sysctl.mk
with a dummy.
I like the latter one better. It certainly needs thorough comments.