summaryrefslogtreecommitdiff
path: root/lang/nhc98/patches/patch-ae
blob: 1b271daf409da7096e2d44ad6a80795ddf8958cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-ae,v 1.2 2004/01/16 20:03:59 kristerw Exp $

--- script/nhc98.inst.orig	Fri Mar  7 17:48:45 2003
+++ script/nhc98.inst	Fri Jan 16 17:59:50 2004
@@ -71,6 +71,12 @@
 MAINROUTINE=$NHC98LIBDIR/$MACHINE/main
 
 CC=${CC-gcc}" -D__NHC__=$VERSIONNUM"
+gcc_ver=`gcc -dumpversion`
+gcc_ver_major=`expr "$gcc_ver" : '\([0-9]*\)'`
+gcc_ver_minor=`expr "$gcc_ver" : '[0-9]*\.\([0-9]*\)'`
+if test $gcc_ver_major -eq 3 -a $gcc_ver_minor -ge 3; then
+  CC="${CC} -fno-zero-initialized-in-bss"
+fi
 
 CPPDEFAULT="${CC} -D__HASKELL__=98 -D__HASKELL_98__ -D__HASKELL98__ -x c -E"
 
@@ -543,6 +549,7 @@
           echo $CPPAS $ENDIAN $CPPASFLAGS $CINCDIRS $TMPCPPASFILE -o $TMPASFILE
 	fi
 	$CPPAS $ENDIAN $CPPASFLAGS $CINCDIRS $TMPCPPASFILE -o - | \
+                sed -e '/.p2align 5/s/5/2/' |\
 		sed -e '/.align 32/s/32/4/' >$TMPASFILE		# evil mangler!
 	if test $CSRC -eq 0
         then