Use sysdep.o from libc.a in libpthread.a on more architectures [BZ #20452]

Message ID 20160811124019.C0107401EA74B@oldenburg.str.redhat.com
State Superseded
Headers

Commit Message

Florian Weimer Aug. 11, 2016, 12:40 p.m. UTC
  This changes microblaze, powerpc, sparc, tile, in addition to x86, which
was changed in commit e67330ab57bfd0f964539576ae7dcc658c456724.

2016-08-11  Florian Weimer  <fweimer@redhat.com>

	[BZ #20452]
	Use sysdep.o from libc.a in static libraries.
	* sysdeps/unix/sysv/linux/microblaze/Makefile
	(libpthread-shared-only-routines): Add sysdep.
	* sysdeps/unix/sysv/linux/powerpc/Makefile
	(libpthread-shared-only-routines): Likewise.
	* sysdeps/unix/sysv/linux/sparc/Makefile
	(libpthread-shared-only-routines): Likewise.
	* sysdeps/unix/sysv/linux/tole/Makefile
	(libpthread-shared-only-routines): Likewise.
  

Comments

Carlos O'Donell Aug. 11, 2016, 1:02 p.m. UTC | #1
On 08/11/2016 08:40 AM, Florian Weimer wrote:
> This changes microblaze, powerpc, sparc, tile, in addition to x86, which
> was changed in commit e67330ab57bfd0f964539576ae7dcc658c456724.
> 
> 2016-08-11  Florian Weimer  <fweimer@redhat.com>
> 
> 	[BZ #20452]
> 	Use sysdep.o from libc.a in static libraries.
> 	* sysdeps/unix/sysv/linux/microblaze/Makefile
> 	(libpthread-shared-only-routines): Add sysdep.
> 	* sysdeps/unix/sysv/linux/powerpc/Makefile
> 	(libpthread-shared-only-routines): Likewise.
> 	* sysdeps/unix/sysv/linux/sparc/Makefile
> 	(libpthread-shared-only-routines): Likewise.
> 	* sysdeps/unix/sysv/linux/tole/Makefile
> 	(libpthread-shared-only-routines): Likewise.

This looks good to me granted you verified the resulting libpthread
in at least one architecture has the symbols removed.

Cheers,
Carlos.
  
Dan HorĂ¡k Aug. 11, 2016, 2:44 p.m. UTC | #2
On Thu, 11 Aug 2016 14:40:19 +0200
fweimer@redhat.com (Florian Weimer) wrote:

> This changes microblaze, powerpc, sparc, tile, in addition to x86,
> which was changed in commit e67330ab57bfd0f964539576ae7dcc658c456724.

How about s390(x)? The original qemu issue is also there - see
https://bugzilla.redhat.com/show_bug.cgi?id=1352625#c6 (and the closed
duplicate above)


		Dan
  

Patch

diff --git a/sysdeps/unix/sysv/linux/microblaze/Makefile b/sysdeps/unix/sysv/linux/microblaze/Makefile
index 44a838f..d178bc6 100644
--- a/sysdeps/unix/sysv/linux/microblaze/Makefile
+++ b/sysdeps/unix/sysv/linux/microblaze/Makefile
@@ -5,4 +5,5 @@  endif
 ifeq ($(subdir),nptl)
 # pull in __syscall_error routine
 libpthread-routines += sysdep
-endif
\ No newline at end of file
+libpthread-shared-only-routines += sysdep
+endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index c89ed9e..709650b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -34,4 +34,5 @@  ifeq ($(subdir),nptl)
 libpthread-routines += sysdep
 libpthread-sysdep_routines += elision-lock elision-unlock elision-timed \
 			      elision-trylock
+libpthread-shared-only-routines += sysdep
 endif
diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile
index e67aecf..ffab97b 100644
--- a/sysdeps/unix/sysv/linux/sparc/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/Makefile
@@ -15,4 +15,5 @@  endif
 ifeq ($(subdir),nptl)
 # pull in __syscall_error routine
 libpthread-routines += sysdep
+libpthread-shared-only-routines += sysdep
 endif
diff --git a/sysdeps/unix/sysv/linux/tile/Makefile b/sysdeps/unix/sysv/linux/tile/Makefile
index 1c1cfff..43acea3 100644
--- a/sysdeps/unix/sysv/linux/tile/Makefile
+++ b/sysdeps/unix/sysv/linux/tile/Makefile
@@ -25,4 +25,5 @@  endif
 ifeq ($(subdir),nptl)
 # pull in __syscall_error routine
 libpthread-routines += sysdep
+libpthread-shared-only-routines += sysdep
 endif