ports/lang/smlnj/files/patch-config___heap2exec
Steve Wills 7af7a8c3e3 lang/smlnj: Update to 110.84, fix build on 12/amd64
PR:		234532
Submitted by:	Johannes 5 <joemann@beefree.free.de> (maintainer)
2018-12-31 18:32:59 +00:00

33 lines
723 B
Text

--- config/_heap2exec.orig 2006-04-20 15:28:53 UTC
+++ config/_heap2exec
@@ -83,6 +83,7 @@ SO_LIBS=
A_PROG=
A_FLAGS=
A_LIBS=
+AS_FLAGS=
case ${OPSYS} in
darwin)
@@ -96,6 +97,13 @@ case ${OPSYS} in
A_PROG=${CC}
A_FLAGS=-Wl,--export-dynamic
A_LIBS=-lm
+ case `uname -m` in
+ amd64)
+ SO_FLAGS="${SO_FLAGS} -m32"
+ A_FLAGS="${A_FLAGS} -m32"
+ AS_FLAGS="${AS_FLAGS} -m32"
+ ;;
+ esac
;;
linux)
SO_PROG=${CC}
@@ -116,7 +124,7 @@ fi
RESULT=0
if ${H2A} "$heapfile" "$execfile".s ; then
if [ -f "$execfile".s ] ; then
- if ${CC} -c -o "$execfile".o "$execfile".s ; then
+ if ${CC} -c ${AS_FLAGS} -o "$execfile".o "$execfile".s ; then
rm "$execfile".s
else
rm "$execfile".s