This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add x32 dummy sysctl


On Tue, May 22, 2012 at 1:51 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> On Tue, May 22, 2012 at 1:39 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> >> ?ifeq ($(subdir),misc)
>> >> -sysdep_routines += sysctl clone llseek umount umount2 readahead \
>> >> +include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
>> >> +
>> >> +sysdep_routines += $(sysctl) clone llseek umount umount2 readahead \
>> >
>> > This is OK. ?But on further reflection, I would just have sysctl.mk do
>> > "sysdep_routines +=" and not complicate things more with the sysctl variable.
>> >
>>
>> I tried it and it doesn't work since all sysctl.mk files are included.
>
> That should not be the case.
> ? ? ? ?include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
> picks just the first one that exists (that why firstword is there).

I checked in this.

Thanks.

-- 
H.J.
---
diff --git a/ChangeLog b/ChangeLog
index f8f2bfa..9212a03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@

 	* sysdeps/unix/sysv/linux/Makefile: Include
 	$(firstword $(wildcard $(sysdirs:=/sysctl.mk))).
-	(sysdep_routines): Replace sysctl with $(sysctl).
+	(sysdep_routines): Remove sysctl.
 	* sysdeps/unix/sysv/linux/bits/sysctl.h: New file.
 	* sysdeps/unix/sysv/linux/sysctl.mk: Likewise.
 	* sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 1011509..70fd137 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -19,7 +19,7 @@ endif
 ifeq ($(subdir),misc)
 include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))

-sysdep_routines += $(sysctl) clone llseek umount umount2 readahead \
+sysdep_routines += clone llseek umount umount2 readahead \
 		   setfsuid setfsgid makedev epoll_pwait signalfd \
 		   eventfd eventfd_read eventfd_write prlimit

diff --git a/sysdeps/unix/sysv/linux/sysctl.mk
b/sysdeps/unix/sysv/linux/sysctl.mk
index 79d5998..8d04d12 100644
--- a/sysdeps/unix/sysv/linux/sysctl.mk
+++ b/sysdeps/unix/sysv/linux/sysctl.mk
@@ -1,3 +1,3 @@
 # sysctl system call has been deprecated.  It is provided for backward
-# compatility.  New target should override it (see x86_64/x32/sysctl.mk).
-sysctl = sysctl
+# compatility.  New target shouldn't add it (see x86_64/x32/sysctl.mk).
+sysdep_routines += sysctl
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
index cdca4ef..da018fe 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
@@ -1,2 +1 @@
 # X32 doesn't support sysctl.
-sysctl =


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]