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] Fix sparc build


On Thu, Jul 26, 2007 at 09:13:50PM +0200, Jakub Jelinek wrote:
> On Thu, Jul 26, 2007 at 12:51:43AM +0200, Aurelien Jarno wrote:
> > The patch below fixes sparc build on both head and glibc-2_6-branch.
> 
> That's only correct for sparc64 build, for 32-bit sparc build
> it will break -fstack-protector.  The relative offset of stack_guard
> field is part of the ABI.
> 
> So this has to be:
> 
> --- nptl/sysdeps/sparc/tls.h.orig	2007-07-26 00:36:08.000000000 +0200
> +++ nptl/sysdeps/sparc/tls.h	2007-07-26 00:36:25.000000000 +0200
> @@ -46,9 +46,15 @@
>    dtv_t *dtv;
>    void *self;
>    int multiple_threads;
> +#if __WORDSIZE == 64
> +  int gscope_flag;
> +#endif
>    uintptr_t sysinfo;
>    uintptr_t stack_guard;
>    uintptr_t pointer_guard;
> +#if __WORDSIZE != 64
> +  int gscope_flag;
> +#endif
>  } tcbhead_t;
>  
>  #else /* __ASSEMBLER__ */
> 
> 
> Untested though.

I have just started a build on my sparc. I will tell you later.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


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