summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2006-08-28 03:17:37 +0000
committerGuillem Jover <guillem@debian.org>2006-08-28 03:17:37 +0000
commit8b0829d2f2b7752da1a16e8a83e66581f73de573 (patch)
tree9b56179da50c8fe74c965d9f0ea2acf7b5b31c6a /debian/patches
parent5effdf231f0c851dd56431595c711ab3980b09e4 (diff)
Fix an unused field optimization with gcc 4.1 which was causing the
descriptor initialization to do it partially. - debian/patches/01_gcc-4.1.patch: New file. Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/01_gcc-4.1.patch42
-rw-r--r--debian/patches/series1
2 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/01_gcc-4.1.patch b/debian/patches/01_gcc-4.1.patch
new file mode 100644
index 0000000..85adc3e
--- /dev/null
+++ b/debian/patches/01_gcc-4.1.patch
@@ -0,0 +1,42 @@
+[gnumach]/Changelog
+2006-08-07 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ Fix against gcc 4.1's optimizations.
+
+ * i386/i386/seg.h (struct pseudo_descriptor): Reorder pad field,
+ pack structure.
+ (lgdt): Pass whole struct pseudo_descriptor to asm macro.
+ (lidt): Likewise.
+
+Index: i386/i386/seg.h
+===================================================================
+RCS file: /cvsroot/hurd/gnumach/i386/i386/Attic/seg.h,v
+retrieving revision 1.2
+diff -u -p -r1.2 seg.h
+--- i386/i386/seg.h 5 Apr 2001 06:39:20 -0000 1.2
++++ i386/i386/seg.h 7 Aug 2006 03:59:04 -0000
+@@ -121,20 +121,20 @@ struct real_gate {
+ /* Format of a "pseudo-descriptor", used for loading the IDT and GDT. */
+ struct pseudo_descriptor
+ {
+- short pad;
+ unsigned short limit;
+ unsigned long linear_base;
+-};
++ short pad;
++} __attribute__((packed));
+
+
+ /* Load the processor's IDT, GDT, or LDT pointers. */
+ MACH_INLINE void lgdt(struct pseudo_descriptor *pdesc)
+ {
+- __asm volatile("lgdt %0" : : "m" (pdesc->limit));
++ __asm volatile("lgdt %0" : : "m" (*pdesc));
+ }
+ MACH_INLINE void lidt(struct pseudo_descriptor *pdesc)
+ {
+- __asm volatile("lidt %0" : : "m" (pdesc->limit));
++ __asm volatile("lidt %0" : : "m" (*pdesc));
+ }
+ MACH_INLINE void lldt(unsigned short ldt_selector)
+ {
diff --git a/debian/patches/series b/debian/patches/series
index 55de1c1..4ea0e1b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
00_clean_gfdl.patch -p0
+01_gcc-4.1.patch -p0
05_halt_on_panic_flag.patch -p0
10_cdromlock.patch
12_sis900.patch -p0