Bug#745380: src:eglibc: support non-multilib builds
Package: src:eglibc Version: 2.18-4 Severity: wishlist Tags: patch User: helm...@debian.org Usertags: rebootstrap It would be awesome, if eglibc had a variant to drop all the multilib packages. In particular this helps for cross-building into an architecture where a sibling architectures is momentarily broken. The gcc-X.Y source packages have this feature for quite a while now and it goes by the name DEB_CROSS_NO_BIARCH=yes. When I talked to Adam Conrad, he indicated that he'd prefer using build profiles instead. So I am suggesting to use nobiarch as the name for that profile, because it is close to gcc's way of calling things. Please consider the attached patch to achieve this goal. Helmut diff -Nru eglibc-2.18/debian/changelog eglibc-2.18/debian/changelog --- eglibc-2.18/debian/changelog +++ eglibc-2.18/debian/changelog @@ -1,3 +1,11 @@ +eglibc (2.18-4.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Add a nobiarch stage that inhibits all multilib packages from being +built. (Closes: #-1) + + -- Helmut Grohne hel...@subdivi.de Mon, 21 Apr 2014 07:44:15 +0200 + eglibc (2.18-4) unstable; urgency=high [ Aurelien Jarno ] diff -Nru eglibc-2.18/debian/rules eglibc-2.18/debian/rules --- eglibc-2.18/debian/rules +++ eglibc-2.18/debian/rules @@ -173,6 +173,10 @@ -include debian/sysdeps/$(DEB_HOST_ARCH_OS).mk -include debian/sysdeps/$(DEB_HOST_ARCH).mk +ifeq ($(filter nobiarch,$(DEB_BUILD_PROFILES)),) +DEB_ARCH_REGULAR_PACKAGES += $(DEB_ARCH_MULTILIB_PACKAGES) +endif + # Don't run dh_strip on this package NOSTRIP_$(libc)-dbg = 1 @@ -196,6 +200,10 @@ endif endif +ifneq ($(filter nobiarch,$(DEB_BUILD_PROFILES)),) +override EGLIBC_PASSES = libc +endif + # And now the rules... include debian/rules.d/*.mk diff -Nru eglibc-2.18/debian/sysdeps/alpha.mk eglibc-2.18/debian/sysdeps/alpha.mk --- eglibc-2.18/debian/sysdeps/alpha.mk +++ eglibc-2.18/debian/sysdeps/alpha.mk @@ -4,7 +4,7 @@ # build an ev67 optimized library EGLIBC_PASSES += alphaev67 -DEB_ARCH_REGULAR_PACKAGES += libc6.1-alphaev67 +DEB_ARCH_MULTILIB_PACKAGES += libc6.1-alphaev67 alphaev67_add-ons = ports nptl $(add-ons) alphaev67_configure_target = alphaev67-linux-gnu alphaev67_extra_cflags = -mcpu=ev67 -mtune=ev67 -O2 diff -Nru eglibc-2.18/debian/sysdeps/amd64.mk eglibc-2.18/debian/sysdeps/amd64.mk --- eglibc-2.18/debian/sysdeps/amd64.mk +++ eglibc-2.18/debian/sysdeps/amd64.mk @@ -3,7 +3,7 @@ # build 32-bit (i386) alternative library EGLIBC_PASSES += i386 -DEB_ARCH_REGULAR_PACKAGES += libc6-i386 libc6-dev-i386 +DEB_ARCH_MULTILIB_PACKAGES += libc6-i386 libc6-dev-i386 libc6-i386_shlib_dep = libc6-i386 (= $(shlib_dep_ver)) i386_add-ons = nptl $(add-ons) i386_configure_target = i686-linux-gnu @@ -39,7 +39,7 @@ # build x32 ABI alternative library EGLIBC_PASSES += x32 -DEB_ARCH_REGULAR_PACKAGES += libc6-x32 libc6-dev-x32 +DEB_ARCH_MULTILIB_PACKAGES += libc6-x32 libc6-dev-x32 libc6-x32_shlib_dep = libc6-x32 (= $(shlib_dep_ver)) x32_add-ons = nptl $(add-ons) x32_configure_target = x86_64-linux-gnux32 diff -Nru eglibc-2.18/debian/sysdeps/armel.mk eglibc-2.18/debian/sysdeps/armel.mk --- eglibc-2.18/debian/sysdeps/armel.mk +++ eglibc-2.18/debian/sysdeps/armel.mk @@ -2,7 +2,7 @@ extra_config_options = --enable-multi-arch #EGLIBC_PASSES += armhf -#DEB_ARCH_REGULAR_PACKAGES += libc6-armhf libc6-dev-armhf +#DEB_ARCH_MULTILIB_PACKAGES += libc6-armhf libc6-dev-armhf #armhf_add-ons = ports nptl $(add-ons) #armhf_configure_target = arm-linux-gnueabihf #armhf_CC = $(CC) -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard diff -Nru eglibc-2.18/debian/sysdeps/armhf.mk eglibc-2.18/debian/sysdeps/armhf.mk --- eglibc-2.18/debian/sysdeps/armhf.mk +++ eglibc-2.18/debian/sysdeps/armhf.mk @@ -13,7 +13,7 @@ endef #EGLIBC_PASSES += armel -#DEB_ARCH_REGULAR_PACKAGES += libc6-armel libc6-dev-armel +#DEB_ARCH_MULTILIB_PACKAGES += libc6-armel libc6-dev-armel #armel_add-ons = ports nptl $(add-ons) #armel_configure_target = arm-linux-gnueabi #armel_CC = $(CC) -mfloat-abi=soft diff -Nru eglibc-2.18/debian/sysdeps/hurd-i386.mk eglibc-2.18/debian/sysdeps/hurd-i386.mk --- eglibc-2.18/debian/sysdeps/hurd-i386.mk +++ eglibc-2.18/debian/sysdeps/hurd-i386.mk @@ -1,7 +1,7 @@ # We use -march=i686 and glibc's i686 routines use cmov, so require it. # A Debian-local glibc patch adds cmov to the search path. EGLIBC_PASSES += i686 -DEB_ARCH_REGULAR_PACKAGES += libc0.3-i686 +DEB_ARCH_MULTILIB_PACKAGES += libc0.3-i686 i686_add-ons = $(libc_add-ons) i686_configure_target=i686-gnu i686_extra_cflags = -march=i686 -mtune=generic diff -Nru eglibc-2.18/debian/sysdeps/i386.mk eglibc-2.18/debian/sysdeps/i386.mk --- eglibc-2.18/debian/sysdeps/i386.mk +++ eglibc-2.18/debian/sysdeps/i386.mk @@ -4,7 +4,7 @@ # A Debian-local glibc patch adds cmov to the search path. # The optimized libraries also use NPTL! EGLIBC_PASSES += i686 -DEB_ARCH_REGULAR_PACKAGES += libc6-i686 +DEB_ARCH_MULTILIB_PACKAGES += libc6-i686 i686_add-ons = nptl
r6021 - in glibc-package/trunk/debian: . patches/hurd-i386
Author: sthibault Date: 2014-04-21 22:52:20 + (Mon, 21 Apr 2014) New Revision: 6021 Modified: glibc-package/trunk/debian/changelog glibc-package/trunk/debian/patches/hurd-i386/tg-extern_inline.diff glibc-package/trunk/debian/patches/hurd-i386/tg-sigstate_locking.diff glibc-package/trunk/debian/patches/hurd-i386/tg-sigstate_thread_reference.diff glibc-package/trunk/debian/patches/hurd-i386/tg-tls-threadvar.diff Log: Fix some Hurd corner cases triggered with gcl * patches/hurd-i386/tg-extern_inline.diff: Only inline within libc. * patches/hurd-i386/tg-tls-threadvar.diff: Use tcbhead_t for _hurd_sigstate instead of TLS variable. Fixes some corner cases triggered with gcl. * patches/hurd-i386/tg-sigstate_locking.diff: Refresh. * patches/hurd-i386/tg-sigstate_thread_reference.diff: Refresh. Modified: glibc-package/trunk/debian/changelog === --- glibc-package/trunk/debian/changelog2014-04-17 21:46:50 UTC (rev 6020) +++ glibc-package/trunk/debian/changelog2014-04-21 22:52:20 UTC (rev 6021) @@ -15,6 +15,11 @@ * patches/hurd-i386/cvs-tcbhead_t.diff: New patch to complete TLS variables, to fix gcc's -fsplit-stack support. * Update hurd-i386 testsuite results. + * patches/hurd-i386/tg-extern_inline.diff: Only inline within libc. + * patches/hurd-i386/tg-tls-threadvar.diff: Use tcbhead_t for _hurd_sigstate +instead of TLS variable. Fixes some corner cases triggered with gcl. + * patches/hurd-i386/tg-sigstate_locking.diff: Refresh. + * patches/hurd-i386/tg-sigstate_thread_reference.diff: Refresh. [ Petr Salinger ] * kfreebsd/local-sysdeps.diff: update to revision 5460 (from glibc-bsd). Modified: glibc-package/trunk/debian/patches/hurd-i386/tg-extern_inline.diff === --- glibc-package/trunk/debian/patches/hurd-i386/tg-extern_inline.diff 2014-04-17 21:46:50 UTC (rev 6020) +++ glibc-package/trunk/debian/patches/hurd-i386/tg-extern_inline.diff 2014-04-21 22:52:20 UTC (rev 6021) @@ -50,7 +50,7 @@ +struct hurd_fd *_hurd_fd_get (int fd); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_FD_H_EXTERN_INLINE struct hurd_fd * _hurd_fd_get (int fd) { @@ -133,7 +133,7 @@ +void _hurd_port_init (struct hurd_port *port, mach_port_t init); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_init (struct hurd_port *port, mach_port_t init) { @@ -153,7 +153,7 @@ +_hurd_port_locked_get (struct hurd_port *port, + struct hurd_userlink *link); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE mach_port_t _hurd_port_locked_get (struct hurd_port *port, struct hurd_userlink *link) @@ -169,7 +169,7 @@ +_hurd_port_get (struct hurd_port *port, + struct hurd_userlink *link); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE mach_port_t _hurd_port_get (struct hurd_port *port, struct hurd_userlink *link) @@ -187,7 +187,7 @@ + struct hurd_userlink *link, + mach_port_t used_port); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_free (struct hurd_port *port, struct hurd_userlink *link, @@ -203,7 +203,7 @@ +void _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport) { @@ -217,7 +217,7 @@ +void _hurd_port_set (struct hurd_port *port, mach_port_t newport); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_set (struct hurd_port *port, mach_port_t newport) { @@ -232,16 +232,16 @@ --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h @@ -130,13 +130,15 @@ + #define _HURD_SIGNAL_H_EXTERN_INLINE __extern_inline #endif - extern __thread struct hurd_sigstate *_hurd_sigstate; -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate * _hurd_self_sigstate (void) { - if (_hurd_sigstate == NULL) - _hurd_sigstate = _hurd_thread_sigstate (__mach_thread_self ()); - return _hurd_sigstate; + if
r6022 - in glibc-package/branches/eglibc-2.19/debian: . patches/hurd-i386
Author: sthibault Date: 2014-04-21 22:58:26 + (Mon, 21 Apr 2014) New Revision: 6022 Modified: glibc-package/branches/eglibc-2.19/debian/changelog glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-extern_inline.diff glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-sigstate_locking.diff glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-sigstate_thread_reference.diff glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-tls-threadvar.diff Log: Backport changes from trunk Modified: glibc-package/branches/eglibc-2.19/debian/changelog === --- glibc-package/branches/eglibc-2.19/debian/changelog 2014-04-21 22:52:20 UTC (rev 6021) +++ glibc-package/branches/eglibc-2.19/debian/changelog 2014-04-21 22:58:26 UTC (rev 6022) @@ -90,6 +90,11 @@ initialization. * patches/hurd-i386/cvs-tcbhead_t.diff: New patch to complete TLS variables, to fix gcc's -fsplit-stack support. + * patches/hurd-i386/tg-extern_inline.diff: Only inline within libc. + * patches/hurd-i386/tg-tls-threadvar.diff: Use tcbhead_t for _hurd_sigstate +instead of TLS variable. Fixes some corner cases triggered with gcl. + * patches/hurd-i386/tg-sigstate_locking.diff: Refresh. + * patches/hurd-i386/tg-sigstate_thread_reference.diff: Refresh. -- Aurelien Jarno aure...@debian.org Sun, 02 Mar 2014 16:19:49 +0100 Modified: glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-extern_inline.diff === --- glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-extern_inline.diff 2014-04-21 22:52:20 UTC (rev 6021) +++ glibc-package/branches/eglibc-2.19/debian/patches/hurd-i386/tg-extern_inline.diff 2014-04-21 22:58:26 UTC (rev 6022) @@ -50,7 +50,7 @@ +struct hurd_fd *_hurd_fd_get (int fd); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_FD_H_EXTERN_INLINE struct hurd_fd * _hurd_fd_get (int fd) { @@ -133,7 +133,7 @@ +void _hurd_port_init (struct hurd_port *port, mach_port_t init); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_init (struct hurd_port *port, mach_port_t init) { @@ -153,7 +153,7 @@ +_hurd_port_locked_get (struct hurd_port *port, + struct hurd_userlink *link); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE mach_port_t _hurd_port_locked_get (struct hurd_port *port, struct hurd_userlink *link) @@ -169,7 +169,7 @@ +_hurd_port_get (struct hurd_port *port, + struct hurd_userlink *link); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE mach_port_t _hurd_port_get (struct hurd_port *port, struct hurd_userlink *link) @@ -187,7 +187,7 @@ + struct hurd_userlink *link, + mach_port_t used_port); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_free (struct hurd_port *port, struct hurd_userlink *link, @@ -203,7 +203,7 @@ +void _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport) { @@ -217,7 +217,7 @@ +void _hurd_port_set (struct hurd_port *port, mach_port_t newport); + -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_PORT_H_EXTERN_INLINE void _hurd_port_set (struct hurd_port *port, mach_port_t newport) { @@ -231,17 +231,17 @@ #endif/* hurd/port.h */ --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h -@@ -129,6 +129,7 @@ extern struct hurd_sigstate *_hurd_self_ +@@ -129,13 +129,15 @@ extern struct hurd_sigstate *_hurd_self_ + #define _HURD_SIGNAL_H_EXTERN_INLINE __extern_inline #endif - extern __thread struct hurd_sigstate *_hurd_sigstate; -+#if defined __USE_EXTERN_INLINES defined _LIBC ++#if defined __USE_EXTERN_INLINES defined _LIBC !defined NOT_IN_libc _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate * _hurd_self_sigstate (void) { -@@ -136,6 +137,7 @@ _hurd_self_sigstate (void) - _hurd_sigstate = _hurd_thread_sigstate (__mach_thread_self ()); - return _hurd_sigstate; + if (THREAD_SELF-_hurd_sigstate == NULL) + THREAD_SELF-_hurd_sigstate = _hurd_thread_sigstate