This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Why does sysdeps/generic/dl-cache.c check _DL_PLATFORMS_COUNT?
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: Why does sysdeps/generic/dl-cache.c check _DL_PLATFORMS_COUNT?
- From: Andreas Jaeger <aj at suse dot de>
- Date: 16 Nov 2000 07:45:50 +0100
- Cc: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- References: <20001115191324.A28668@valinux.com>
>>>>> H J Lu writes:
> _DL_PLATFORMS_COUNT is only defined in
> sysdeps/unix/sysv/linux/i386/dl-procinfo.h. I don't see why it is
> necessary. Right now, glibc won't build on any none-x86 platforms.
> Here is a patch.
I prefer this version of the patch - this way the check in dl-cache.c
can be optimized away by the compiler for platforms that don't use it.
Uli, your decision which one should be applied - but I agree with HJ:
One should be applied asap,
Andreas
2000-11-16 Andreas Jaeger <aj@suse.de>
* sysdeps/generic/dl-procinfo.h (_DL_PLATFORMS_COUNT): Added.
* sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h
(_DL_PLATFORMS_COUNT): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h
(_DL_PLATFORMS_COUNT): Likewise.
============================================================
Index: sysdeps/generic/dl-procinfo.h
--- sysdeps/generic/dl-procinfo.h 2000/11/15 08:45:53 1.5
+++ sysdeps/generic/dl-procinfo.h 2000/11/16 06:43:36
@@ -39,6 +39,9 @@
/* We don't have any hardware capabilities. */
#define _DL_HWCAP_COUNT 0
+/* All platforms are the same. */
+#define _DL_PLATFORMS_COUNT 0
+
#define _dl_string_hwcap(str) (-1)
#define _dl_string_platform(str) (-1)
============================================================
Index: sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h
--- sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h 2000/11/15 08:44:38 1.3
+++ sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h 2000/11/16 06:43:36
@@ -74,6 +74,9 @@
/* There're no platforms to filter out. */
#define _DL_HWCAP_PLATFORM 0
+/* All platforms are the same. */
+#define _DL_PLATFORMS_COUNT 0
+
#define _dl_string_platform(str) (-1)
#endif /* dl-procinfo.h */
============================================================
Index: sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h
--- sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h 2000/11/15 08:44:38 1.3
+++ sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h 2000/11/16 06:43:37
@@ -75,6 +75,9 @@
/* There're no platforms to filter out. */
#define _DL_HWCAP_PLATFORM 0
+/* All platforms are the same. */
+#define _DL_PLATFORMS_COUNT 0
+
#define _dl_string_platform(str) (-1)
#endif /* dl-procinfo.h */
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj