This is the mail archive of the libc-alpha@sources.redhat.com 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 sparc64 tls and nptl support


On Thu, 14 Apr 2005 00:21:23 +0200
Jakub Jelinek <jakub@redhat.com> wrote:

> > 	* sysdeps/unix/sysv/linux/kernel-features.h
> > 	(__ASSUME_REALTIME_SIGNALS): Always set to 1 on ia64 and sparc64.
> > 	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: NULL terminate
> > 	backtrace by zero'ing out %fp.  Allocate 6 argument slots just
> > 	like on sparc64.
> 
> I don't like this hunk.  ia64 has arch_minimum_kernel=2.4.0
> in sysdeps/unix/sysv/linux/configure*, so mentioning ia64 there is
> pointless.  ATM sparc64 allows configuring even for 2.0.10 kernel,
> but that doesn't match reality, you can't use that old kernels with
> sparc64 glibc.  I'd argue that you can't use anything older than 2.4.21
> for current sparc 64-bit glibc, given
> http://linux.bkbits.net:8080/linux-2.5/diffs/arch/sparc64/kernel/signal.c@1.27
> so IMHO sysdeps/unix/sysv/linux/configure* should have
> arch_minimum_kernel=2.4.21 for sparc64.

If the kernel version is not defined at all (and thus it gets
set to zero, this is what happens with a default configure so
it should work) the NPTL build breaks because NPTL  (from, f.e.
libc/nptl/sysdeps/pthread/sigprocmask.c) explicitly
includes sigprocmask.c et al. directly from
libc/sysdeps/unix/sysv/linux/*.c instead of the
libc/sysdeps/unix/sysv/linux/$(ARCH)/*.c variants.

As a result, since the generic linux sigprocmask.c code brings in a bunch
of references to the symbol __libc_missing_rt_sigs in libpthread_pic.a.  Now
the link fails since the code in:

libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c

assumes RT signal presence, and thus does not define a
"int __libc_missing_rt_sigs;".

I'm merely making the __ASSUME_REALTIME_SIGNALS setting by default
match exactly the reality mentioned in the ia64 and sparc64 sigaction.c
support code.  It is not pointless, because it allows the NPTL build
to complete successfully when __LINUX_KERNEL_VERSION is set to 0
which it will be for a default configure which should work.

I think other solutions, such as putting a dummy:
"int __libc_missing_rt_sigs;"
into the ia64 and sparc64 sigaction.c is even more pointless :-)

> I'm getting warnings about dl-machine.h though, so IMHO we need
> something like following patch on top of your patch (although the patch
> looks really big, it mostly is just moving ~ 250 lines around).

Did the build succeed with this change?

It warns because the guarding ifdefs around the two different
possible elf_machine_type_class defines changes the two times
rtld.c ends up including dl-machine.h


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