public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] Move shared pthread definitions to common headers
@ 2017-05-11 12:19 Wilco Dijkstra
  2017-05-11 13:37 ` Adhemerval Zanella
  0 siblings, 1 reply; 9+ messages in thread
From: Wilco Dijkstra @ 2017-05-11 12:19 UTC (permalink / raw)
  To: adhemerval.zanella, libc-alpha; +Cc: triegel, nd

Hi Adhemerval,

This broke ARM builds using new GLIBC:

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 1/2] Consolidate pthreadtype.h placement
@ 2017-04-03 15:08 Adhemerval Zanella
  2017-04-03 15:09 ` [PATCH 2/2] Move shared pthread definitions to common headers Adhemerval Zanella
  0 siblings, 1 reply; 9+ messages in thread
From: Adhemerval Zanella @ 2017-04-03 15:08 UTC (permalink / raw)
  To: libc-alpha

This patch moves all arch specific pthreadtypes.h to a similar path
for all architectures (sysdeps/unix/sysv/<arch>/bits).  No functional
or build change is expected.  The idea is mainly to organize the
header placement for all architectures.

Checked with a build for all major ABI (aarch64-linux-gnu, alpha-linux-gnu,
arm-linux-gnueabi, i386-linux-gnu, ia64-linux-gnu,
m68k-linux-gnu, microblaze-linux-gnu [1], mips{64}-linux-gnu, nios2-linux-gnu,
powerpc{64le}-linux-gnu, s390{x}-linux-gnu, sparc{64}-linux-gnu,
tile{pro,gx}-linux-gnu, and x86_64-linux-gnu).
---
 ChangeLog                                                      | 10 ++++++++++
 .../{unix/sysv/linux/alpha => alpha/nptl}/bits/pthreadtypes.h  |  0
 .../sysv/linux/powerpc => powerpc/nptl}/bits/pthreadtypes.h    |  0
 sysdeps/unix/sysv/linux/x86/Implies                            |  1 +
 sysdeps/x86/{ => nptl}/bits/pthreadtypes.h                     |  0
 5 files changed, 11 insertions(+)
 rename sysdeps/{unix/sysv/linux/alpha => alpha/nptl}/bits/pthreadtypes.h (100%)
 rename sysdeps/{unix/sysv/linux/powerpc => powerpc/nptl}/bits/pthreadtypes.h (100%)
 create mode 100644 sysdeps/unix/sysv/linux/x86/Implies
 rename sysdeps/x86/{ => nptl}/bits/pthreadtypes.h (100%)

diff --git a/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h b/sysdeps/alpha/nptl/bits/pthreadtypes.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
rename to sysdeps/alpha/nptl/bits/pthreadtypes.h
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/sysdeps/powerpc/nptl/bits/pthreadtypes.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
rename to sysdeps/powerpc/nptl/bits/pthreadtypes.h
diff --git a/sysdeps/unix/sysv/linux/x86/Implies b/sysdeps/unix/sysv/linux/x86/Implies
new file mode 100644
index 0000000..e454b28
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/Implies
@@ -0,0 +1 @@
+x86/nptl
diff --git a/sysdeps/x86/bits/pthreadtypes.h b/sysdeps/x86/nptl/bits/pthreadtypes.h
similarity index 100%
rename from sysdeps/x86/bits/pthreadtypes.h
rename to sysdeps/x86/nptl/bits/pthreadtypes.h
-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-15 13:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 12:19 [PATCH 2/2] Move shared pthread definitions to common headers Wilco Dijkstra
2017-05-11 13:37 ` Adhemerval Zanella
2017-05-11 13:50   ` Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2017-04-03 15:08 [PATCH 1/2] Consolidate pthreadtype.h placement Adhemerval Zanella
2017-04-03 15:09 ` [PATCH 2/2] Move shared pthread definitions to common headers Adhemerval Zanella
2017-04-10 18:22   ` Adhemerval Zanella
2017-04-18 11:32   ` Torvald Riegel
2017-04-18 13:08     ` Adhemerval Zanella
2017-05-09 15:10       ` Adhemerval Zanella
2017-10-15 13:52         ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).