[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#601126: eglibc: [m68k] please apply patch for TLS support



Hi,

another (updated) version of the patch, changelog collapsed and a
“Closes” tag added; hotfix sync’d from git repository.

Builds on amd64… m68k takes a few days longer ☺

bye,
//mirabilos
-- 
22:20⎜<asarch> The crazy that persists in his craziness becomes a master
22:21⎜<asarch> And the distance between the craziness and geniality is
only measured by the success                       22:21⎜<mksh> it’s a
very thin line anyway… with some, you don’t know which side they’re on
diff -u eglibc-2.11.2/debian/changelog eglibc-2.11.2/debian/changelog
--- eglibc-2.11.2/debian/changelog
+++ eglibc-2.11.2/debian/changelog
@@ -1,3 +1,14 @@
+eglibc (2.11.2-10+m68k.1) unreleased; urgency=low
+
+  * patches/m68k/cvs-fix-sem_t-alignment.patch: new from git (hotfix)
+  * sysdeps/m68k.mk: switch m68k to TLS (Closes: #601126)
+    - remove libc_extra_config_options (all of them, we have __thread
+      and TLS now; sanity checks were only disabled for linuxthreads)
+    - use NPTL instead of linuxthreads
+  * debhelper.in/libc.preinst: require (Debian) 2.6.32 kernel on m68k
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Sat, 29 Jan 2011 00:37:03 +0100
+
 eglibc (2.11.2-10) unstable; urgency=low
 
   * Add patches/amd64/cvs-avx-tcb-alignment.diff from upstream to fix 
diff -u eglibc-2.11.2/debian/debhelper.in/libc.preinst eglibc-2.11.2/debian/debhelper.in/libc.preinst
--- eglibc-2.11.2/debian/debhelper.in/libc.preinst
+++ eglibc-2.11.2/debian/debhelper.in/libc.preinst
@@ -292,33 +292,22 @@
         mips*) realarch="mips";;
       esac
 
-      # The GNU libc requires a >= 2.6.18 kernel (except on m68k)
+      # The GNU libc requires a >= 2.6.32-3 Debian kernel on m68k
+      # for TLS, or a >= 2.6.18 kernel on all other architectures
       if [ "$realarch" != m68k ]
       then
-          if linux_compare_versions "$kernel_ver" lt 2.6.18
-          then
-              echo WARNING: this version of the GNU libc requires kernel version
-              echo 2.6.18 or later.  Please upgrade your kernel before installing
-              echo glibc.
-              kernel26_help
-
-              exit 1
-          fi
+          vmin=2.6.18
+      else
+          vmin=2.6.32
       fi
-
-      # The GNU libc is now built with --with-kernel= >= 2.4.1 on m68k
-      if [ "$realarch" = m68k ]
+      if linux_compare_versions "$kernel_ver" lt ${vmin}
       then
-          if linux_compare_versions "$kernel_ver" lt 2.4.1
-          then
-              echo WARNING: This version of glibc requires that you be running
-              echo kernel version 2.4.1 or later.  Earlier kernels contained
-              echo bugs that may render the system unusable if a modern version
-              echo of glibc is installed.
-              kernel26_help
+          echo WARNING: this version of the GNU libc requires kernel version
+          echo ${vmin} or later.  Please upgrade your kernel before installing
+          echo glibc.
+          kernel26_help
 
-              exit 1
-          fi
+          exit 1
       fi
 
       # From glibc 2.6-3 SPARC V8 support is dropped.
diff -u eglibc-2.11.2/debian/sysdeps/m68k.mk eglibc-2.11.2/debian/sysdeps/m68k.mk
--- eglibc-2.11.2/debian/sysdeps/m68k.mk
+++ eglibc-2.11.2/debian/sysdeps/m68k.mk
@@ -2,2 +2 @@
-libc_add-ons = ports linuxthreads $(add-ons)
-libc_extra_config_options = $(extra_config_options) --disable-sanity-checks --without-__thread --without-tls
+libc_add-ons = ports nptl $(add-ons)
diff -u eglibc-2.11.2/debian/patches/series eglibc-2.11.2/debian/patches/series
--- eglibc-2.11.2/debian/patches/series
+++ eglibc-2.11.2/debian/patches/series
@@ -152,6 +152,7 @@
 
 m68k/cvs-define-m68k-tls-relocations.patch
 m68k/cvs-tls-support.patch
+m68k/cvs-fix-sem_t-alignment.patch
 m68k/cvs-versions-def-2-12.patch
 m68k/local-compat.diff
 m68k/local-dwarf2-buildfix.diff
only in patch2:
unchanged:
--- eglibc-2.11.2.orig/debian/patches/m68k/cvs-fix-sem_t-alignment.patch
+++ eglibc-2.11.2/debian/patches/m68k/cvs-fix-sem_t-alignment.patch
@@ -0,0 +1,65 @@
+This series of m68k related commits fixes alignment of sem_t due to
+the kernel using the lower two bit for internal purposes, whereas on
+Linux/m68k, the alignment of long is not natural. I refrain from
+patching a ChangeLog file, since I saw this break with gcc earlier.
+ -- tg@d.o
+
+From: Andreas Schwab <schwab@linux-m68k.org>
+Date: Sun, 2 Jan 2011 19:14:41 +0000 (+0100)
+Subject: m68k: force alignment of sem_t
+X-Git-Tag: glibc-2.13~7
+X-Git-Url: http://sourceware.org/git/?p=glibc-ports.git;a=commitdiff_plain;h=9524dbd1f3f91a9b381bb0e17dc5e150fe8be75a
+
+m68k: force alignment of sem_t
+---
+
+#diff --git a/ChangeLog.m68k b/ChangeLog.m68k
+#index ccd8b4e..feba28e 100644
+#--- a/ChangeLog.m68k
+#+++ b/ChangeLog.m68k
+#@@ -1,3 +1,8 @@
+#+2011-01-10  Andreas Schwab  <schwab@linux-m68k.org>
+#+
+#+	* sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h (sem_t):
+#+	Force alignment.
+#+
+# 2010-12-26  Andreas Schwab  <schwab@linux-m68k.org>
+# 
+# 	* sysdeps/m68k/stackinfo.h (DEFAULT_STACK_PERMS): Define.
+diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
+index 2950cc9..baaa9eb 100644
+--- a/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
++++ b/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2010 Free Software Foundation, Inc.
++/* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+ 
+@@ -32,5 +32,5 @@
+ typedef union
+ {
+   char __size[__SIZEOF_SEM_T];
+-  long int __align;
++  long int __align __attribute__ ((aligned (4)));
+ } sem_t;
+From: Andreas Schwab <schwab@linux-m68k.org>
+Date: Tue, 18 Jan 2011 11:18:31 +0000 (+0100)
+Subject: m68k: fix namespace pollution
+X-Git-Tag: glibc-2.13~5
+X-Git-Url: http://sourceware.org/git/?p=glibc-ports.git;a=commitdiff_plain;h=fb88ab40aced6ba45d82321b32b43fd2ecdaa11c
+
+m68k: fix namespace pollution
+---
+
+diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
+index baaa9eb..1648e92 100644
+--- a/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
++++ b/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
+@@ -32,5 +32,5 @@
+ typedef union
+ {
+   char __size[__SIZEOF_SEM_T];
+-  long int __align __attribute__ ((aligned (4)));
++  long int __align __attribute__ ((__aligned__ (4)));
+ } sem_t;

Reply to: