pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lang/ocaml i386 native code compiler on x86_64 OS X
Hi,
If you use ABI=32 on OS X, the OCaml configuration script (as it is
currently patched) attempts to build the native compiler targeting
x86_64.
The patch below fixes this.
Yours,
Mansour
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ocaml/Makefile,v
retrieving revision 1.97
diff -u -p -u -r1.97 Makefile
--- Makefile 30 Jun 2015 11:08:47 -0000 1.97
+++ Makefile 22 Jul 2015 18:39:50 -0000
@@ -3,7 +3,6 @@
.include "Makefile.common"
#CONFIGURE_ARGS+= -no-tk
-CONFIGURE_ARGS+= -cc ${CC}
CONFIGURE_ENV+= disable_x11=yes
BUILD_TARGET= world
@@ -50,7 +49,7 @@ PLIST_SRC+= ${PKGDIR}/PLIST.prof
!empty(MACHINE_PLATFORM:MFreeBSD-*-*) || \
!empty(MACHINE_PLATFORM:MDragonFly-*-*) || \
!empty(MACHINE_PLATFORM:MNetBSD-*-*) || \
- !empty(MACHINE_PLATFORM:MDarwin-*-x86_64)
+ !empty(MACHINE_PLATFORM:MDarwin-*-*)
PLIST_SRC+= ${PKGDIR}/PLIST.natdynlink
. endif
.endif
Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ocaml/Makefile.common,v
retrieving revision 1.42
diff -u -p -u -r1.42 Makefile.common
--- Makefile.common 30 Jun 2015 11:08:47 -0000 1.42
+++ Makefile.common 22 Jul 2015 18:39:50 -0000
@@ -32,6 +32,14 @@ PATCHDIR= ${.CURDIR}/../../lang/ocaml/pa
INSTALL_UNSTRIPPED= yes
.endif
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+= -cc "${CC} -arch ${MACHINE_ARCH}"
+CONFIGURE_ARGS+= -aspp "${CC} -arch ${MACHINE_ARCH} -c"
+CONFIGURE_ARGS+= -as "as -arch ${MACHINE_ARCH}"
+.else
+CONFIGURE_ARGS+= -cc ${CC}
+.endif
+
.include "../../mk/bdb.buildlink3.mk"
BDB_LINK= ${BDB_LIBS}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ocaml/distinfo,v
retrieving revision 1.86
diff -u -p -u -r1.86 distinfo
--- distinfo 4 Jul 2015 09:29:47 -0000 1.86
+++ distinfo 22 Jul 2015 18:39:50 -0000
@@ -13,7 +13,7 @@ SHA1 (patch-asmrun_signals_osdep.h) = 9e
SHA1 (patch-byterun_Makefile) = 271dc8c7ee08235e1466afd103657e5cec4a25bb
SHA1 (patch-config_auto__aux_gethostbyaddr.c) =
ce724831e93081d3e51a122fef14b17543c3221c
SHA1 (patch-config_auto__aux_gethostbyname.c) =
f05a6026a18ca7557558383103c6a2fc08caee28
-SHA1 (patch-configure) = b0e153c222109f5ad769130d8c987006d1f09817
+SHA1 (patch-configure) = de9c486d33e52f2884c13a3c5fe8585154bc1560
SHA1 (patch-debugger_Makefile.shared) =
9acaa17f22a66311859b6ac4a0c047e6693fce33
SHA1 (patch-driver_compenv.ml) = cb6197cee99ab77fd1b8aadca7cef613c0e35a31
SHA1 (patch-driver_main.ml) = ed7a63d0678214efed7871b41575c34464c7272a
Index: patches/patch-configure
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ocaml/patches/patch-configure,v
retrieving revision 1.11
diff -u -p -u -r1.11 patch-configure
--- patches/patch-configure 30 Jun 2015 11:08:47 -0000 1.11
+++ patches/patch-configure 22 Jul 2015 18:39:50 -0000
@@ -1,6 +1,9 @@
$NetBSD: patch-configure,v 1.11 2015/06/30 11:08:47 jaapb Exp $
Several configure changes to work on and detect NetBSD (and some other OSes)
+
+See also: <http://caml.inria.fr/mantis/view.php?id=6900>
+
--- configure.orig 2015-05-12 14:46:37.000000000 +0000
+++ configure
@@ -328,11 +328,11 @@ TOOLCHAIN="cc"
@@ -89,16 +92,29 @@ Several configure changes to work on and
sharedcccompopts="-fPIC"
mksharedlib="$bytecc -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
-@@ -785,7 +785,7 @@ if test $with_sharedlibs = "yes"; then
+@@ -743,7 +743,7 @@ if test $with_sharedlibs = "yes"; then
+ byteccrpath="-Wl,-rpath,"
+ mksharedlibrpath="-rpath "
+ shared_libraries_supported=true;;
+- i[3456]86-*-darwin[89].*)
++ i[3456]86-*-darwin*)
+ mksharedlib="$bytecc -bundle -flat_namespace -undefined
suppress -read_only_relocs suppress"
+ bytecccompopts="$dl_defs $bytecccompopts"
+ dl_needs_underscore=false
+@@ -783,11 +783,7 @@ if test $with_sharedlibs = "yes"; then
+ i[3456]86-*-linux*) natdynlink=true;;
+ i[3456]86-*-gnu*) natdynlink=true;;
x86_64-*-linux*) natdynlink=true;;
- i[3456]86-*-darwin[89].*) natdynlink=true;;
- i[3456]86-*-darwin*)
+- i[3456]86-*-darwin[89].*) natdynlink=true;;
+- i[3456]86-*-darwin*)
- if test $arch64 == true; then
-+ if test $arch64 = true; then
- natdynlink=true
- fi;;
+- natdynlink=true
+- fi;;
++ i[3456]86-*-darwin*) natdynlink=true;;
x86_64-*-darwin*) natdynlink=true;;
-@@ -799,6 +799,8 @@ if test $with_sharedlibs = "yes"; then
+ powerpc*-*-linux*) natdynlink=true;;
+ sparc*-*-linux*) natdynlink=true;;
+@@ -799,6 +795,8 @@ if test $with_sharedlibs = "yes"; then
x86_64-*-openbsd*) natdynlink=true;;
i[3456]86-*-netbsd*) natdynlink=true;;
x86_64-*-netbsd*) natdynlink=true;;
@@ -107,7 +123,7 @@ Several configure changes to work on and
i386-*-gnu0.3) natdynlink=true;;
i[3456]86-*-haiku*) natdynlink=true;;
arm*-*-linux*) natdynlink=true;;
-@@ -827,6 +829,7 @@ case "$target" in
+@@ -827,6 +825,7 @@ case "$target" in
sparc*-*-gnu*) arch=sparc; system=gnu;;
i[3456]86-*-linux*) arch=i386; system=linux_`sh ./runtest elf.c`;;
i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
@@ -115,7 +131,7 @@ Several configure changes to work on and
i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
i[3456]86-*-solaris*) if $arch64; then
arch=amd64; system=solaris
-@@ -836,6 +839,7 @@ case "$target" in
+@@ -836,6 +835,7 @@ case "$target" in
i[3456]86-*-haiku*) arch=i386; system=beos;;
i[3456]86-*-beos*) arch=i386; system=beos;;
i[3456]86-*-cygwin*) arch=i386; system=cygwin;;
@@ -123,7 +139,7 @@ Several configure changes to work on and
i[3456]86-*-darwin*) if $arch64; then
arch=amd64; system=macosx
else
-@@ -849,6 +853,7 @@ case "$target" in
+@@ -849,6 +849,7 @@ case "$target" in
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
powerpc-*-darwin*) arch=power; system=rhapsody
if $arch64;then model=ppc64;else
model=ppc;fi;;
@@ -131,7 +147,7 @@ Several configure changes to work on and
armv6*-*-linux-gnueabihf) arch=arm; model=armv6; system=linux_eabihf;;
arm*-*-linux-gnueabihf) arch=arm; system=linux_eabihf;;
armv7*-*-linux-gnueabi) arch=arm; model=armv7; system=linux_eabi;;
-@@ -864,6 +869,8 @@ case "$target" in
+@@ -864,6 +865,8 @@ case "$target" in
x86_64-*-gnu*) arch=amd64; system=gnu;;
x86_64-*-freebsd*) arch=amd64; system=freebsd;;
x86_64-*-netbsd*) arch=amd64; system=netbsd;;
@@ -140,7 +156,7 @@ Several configure changes to work on and
x86_64-*-openbsd*) arch=amd64; system=openbsd;;
x86_64-*-darwin*) arch=amd64; system=macosx;;
x86_64-*-mingw*) arch=amd64; system=mingw;;
-@@ -903,7 +910,7 @@ case "$arch,$nativecc,$system,$target" i
+@@ -903,7 +906,7 @@ case "$arch,$nativecc,$system,$target" i
if $arch64; then partialld="ld -r -arch ppc64"; fi;;
*,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";;
amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
@@ -149,7 +165,7 @@ Several configure changes to work on and
*,gcc*,*,*) nativecccompopts="$gcc_warnings";;
esac
-@@ -920,7 +927,7 @@ case "$arch,$system" in
+@@ -920,7 +923,7 @@ case "$arch,$system" in
amd64,solaris) as="${TOOLPREF}as --64"
aspp="${TOOLPREF}gcc -m64 -c";;
i386,solaris) as="${TOOLPREF}as"
@@ -158,7 +174,7 @@ Several configure changes to work on and
power,elf) as="${TOOLPREF}as -u -m ppc"
aspp="${TOOLPREF}gcc -c";;
power,rhapsody) as="${TOOLPREF}as -arch $model"
-@@ -961,6 +968,7 @@ case "$arch,$system" in
+@@ -961,6 +964,7 @@ case "$arch,$system" in
arm,linux*) profiling='prof';;
power,elf) profiling='prof';;
power,bsd*) profiling='prof';;
@@ -166,7 +182,7 @@ Several configure changes to work on and
*) profiling='noprof';;
esac
-@@ -1475,6 +1483,8 @@ fi
+@@ -1475,6 +1479,8 @@ fi
x11_include="not found"
x11_link="not found"
@@ -175,7 +191,7 @@ Several configure changes to work on and
if test -z "$x11_include_dir" -a -z "$x11_lib_dir"; then
if pkg-config --exists x11 2>/dev/null; then
x11_include=`pkg-config --cflags x11`
-@@ -1521,6 +1531,7 @@ if test "$x11_include" = "not found"; th
+@@ -1521,6 +1527,7 @@ if test "$x11_include" = "not found"; th
/usr/XFree86/include/X11 \
\
/usr/include \
@@ -183,7 +199,7 @@ Several configure changes to work on and
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
-@@ -1578,6 +1589,7 @@ if test "$x11_include" = "not found"; th
+@@ -1578,6 +1585,7 @@ if test "$x11_include" = "not found"; th
\
/usr/lib64 \
/usr/lib \
@@ -191,7 +207,7 @@ Several configure changes to work on and
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
-@@ -1599,18 +1611,16 @@ if test "$x11_include" = "not found"; th
+@@ -1599,18 +1607,16 @@ if test "$x11_include" = "not found"; th
if test $dir = /usr/lib; then
x11_link="-lX11"
else
Home |
Main Index |
Thread Index |
Old Index