PATCH: Add x32 dummy sysctl
Roland McGrath
roland@hack.frob.com
Thu May 17 20:10:00 GMT 2012
> 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.
Thanks,
Roland
More information about the Libc-alpha
mailing list