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 2/2] Move shared pthread definitions to common headers


On 11/05/2017 09:19, Wilco Dijkstra wrote:
> Hi Adhemerval,
> 
> This broke ARM builds using new GLIBC:

I will fix it.

> 
> diff --git a/sysdeps/arm/nptl/bits/pthreadtypes-arch.h b/sysdeps/arm/nptl/bits/pthreadtypes-arch.h
> new file mode 100644
> index 0000000..8333acb
> --- /dev/null
> +++ b/sysdeps/arm/nptl/bits/pthreadtypes-arch.h
> 
> +struct __pthread_rwlock_arch_t
> +{
> +  unsigned int __readers;
> +  unsigned int __writers;
> +  unsigned int __wrphase_futex;
> +  unsigned int __writers_futex;
> +  unsigned int __pad3;
> +  unsigned int __pad4;
> +#if __BYTE_ORDER == __BIG_ENDIAN
> +  unsigned char __pad1;
> +  unsigned char __pad2;
> +  unsigned char __shared;
> +  /* FLAGS must stay at this position in the structure to maintain
> +     binary compatibility.  */
> +  unsigned char __flags;
> +#else
> +  /* FLAGS must stay at this position in the structure to maintain
> +     binary compatibility.  */
> +  unsigned char __flags;
> +  unsigned char __shared;
> +  unsigned char __pad1;
> +  unsigned char __pad2;
> +#endif
> +  int __cur_writer;
> +} __data;
> 
> This defines a global __data whenever this header is included:
> 
> native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/read-md.h:315: multiple definition of `__data'
> build/genconstants.o:native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/genconstants.c:40: first defined here
> 
> I think HPPA has the same issue:
> 
> grep __data sysdeps/*/nptl/bits/pthreadtypes-arch.h
> sysdeps/arm/nptl/bits/pthreadtypes-arch.h:} __data;
> sysdeps/hppa/nptl/bits/pthreadtypes-arch.h:} __data;
> 
> Wilco
> 


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