diff options
| -rw-r--r-- | debian/changelog | 4 | ||||
| -rw-r--r-- | debian/patches/01_gcc-4.1.patch | 42 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
3 files changed, 47 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 3223755..304e22e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,10 @@ gnumach (1:20060826.dfsg.1-1) UNRELEASED; urgency=low 'debian/patch.mk'. Change clean to a single colon target and make it depend on patch. * Now using Standards-Version 3.7.2 (no changes needed). + * 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>. -- Guillem Jover <guillem@debian.org> Sat, 26 Aug 2006 16:52:37 +0300 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 |
