aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-12-19 08:43:11 +0800
committermarcel <marcel@FreeBSD.org>2002-12-19 08:43:11 +0800
commit6b26a454f990bfdfbe7419d8e2dfad0ed0f7f879 (patch)
treec9f3a00095a935b37b00f13ef640fef361906e20
parentb303e07e8e272e22dbaeb44e77eed0cdb00278b5 (diff)
downloadfreebsd-ports-gnome-6b26a454f990bfdfbe7419d8e2dfad0ed0f7f879.tar.gz
freebsd-ports-gnome-6b26a454f990bfdfbe7419d8e2dfad0ed0f7f879.tar.zst
freebsd-ports-gnome-6b26a454f990bfdfbe7419d8e2dfad0ed0f7f879.zip
Fix ghostscript on ia64. The logic to determine what the minimum
alignment must be is based on elementary datatypes, but does not take into account the alignment requirements of FP spills. Such are present in jmp_buf. The memory allocator is used by the JPEG and PNG libraries as well and the JPEG library has a jmp_buf in one of its structures. Another problem case is the "long double" type. This datatype is not in the list of elementary types on which the minimal alignment is based and can also be used by imported source code. The patch forces 16-byte alignment on ia64.
-rw-r--r--print/ghostscript-gnu/files/patch-src:gxobj.h17
-rw-r--r--print/ghostscript7/files/patch-src:gxobj.h17
2 files changed, 34 insertions, 0 deletions
diff --git a/print/ghostscript-gnu/files/patch-src:gxobj.h b/print/ghostscript-gnu/files/patch-src:gxobj.h
new file mode 100644
index 000000000000..4e11eb416f39
--- /dev/null
+++ b/print/ghostscript-gnu/files/patch-src:gxobj.h
@@ -0,0 +1,17 @@
+--- src/gxobj.h.orig Fri Feb 22 19:45:59 2002
++++ src/gxobj.h Thu Dec 19 00:16:57 2002
+@@ -99,10 +99,14 @@
+ * The final | is because back pointer values are divided by obj_back_scale,
+ * so objects must be aligned at least 0 mod obj_back_scale.
+ */
++#if !defined(__ia64__)
+ #define obj_align_mod\
+ (((arch_align_long_mod - 1) | (arch_align_ptr_mod - 1) |\
+ (arch_align_double_mod - 1) | (align_bitmap_mod - 1) |\
+ (obj_back_scale - 1)) + 1)
++#else
++#define obj_align_mod 16
++#endif
+ /* The only possible values for obj_align_mod are 4, 8, or 16.... */
+ #if obj_align_mod == 4
+ # define log2_obj_align_mod 2
diff --git a/print/ghostscript7/files/patch-src:gxobj.h b/print/ghostscript7/files/patch-src:gxobj.h
new file mode 100644
index 000000000000..4e11eb416f39
--- /dev/null
+++ b/print/ghostscript7/files/patch-src:gxobj.h
@@ -0,0 +1,17 @@
+--- src/gxobj.h.orig Fri Feb 22 19:45:59 2002
++++ src/gxobj.h Thu Dec 19 00:16:57 2002
+@@ -99,10 +99,14 @@
+ * The final | is because back pointer values are divided by obj_back_scale,
+ * so objects must be aligned at least 0 mod obj_back_scale.
+ */
++#if !defined(__ia64__)
+ #define obj_align_mod\
+ (((arch_align_long_mod - 1) | (arch_align_ptr_mod - 1) |\
+ (arch_align_double_mod - 1) | (align_bitmap_mod - 1) |\
+ (obj_back_scale - 1)) + 1)
++#else
++#define obj_align_mod 16
++#endif
+ /* The only possible values for obj_align_mod are 4, 8, or 16.... */
+ #if obj_align_mod == 4
+ # define log2_obj_align_mod 2