On 11/26/12 21:42, Christopher Zimmermann wrote:
> Hi,
> 
> this fixes cil for me on amd64 and i386. Non-native archs would be
> difficult to fix though. It looks like the build system is not designed
> for bytecode-only compilation.
> 
> Christopher
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/cil/Makefile,v
> retrieving revision 1.24
> diff -u -p -r1.24 Makefile
> --- Makefile  25 Nov 2012 23:46:36 -0000      1.24
> +++ Makefile  26 Nov 2012 21:40:29 -0000
> @@ -1,7 +1,5 @@
>  # $OpenBSD: Makefile,v 1.24 2012/11/25 23:46:36 sthen Exp $
>  
> -BROKEN = amd64: cilly fails at runtime (bad paths). !amd64: packaging broken.
> -
>  # until tested on others, even though bytecode is produced
>  ONLY_FOR_ARCHS =     ${OCAML_NATIVE_ARCHS}
>  
> @@ -9,7 +7,7 @@ COMMENT=      framework for analysis and tran
>  CATEGORIES = devel lang
>  
>  DISTNAME =   cil-1.5.1
> -REVISION =      1
> +REVISION =      2
>  EXTRACT_SUFX =       .tar.gz
>  MASTER_SITES =       ${MASTER_SITE_SOURCEFORGE:=cil/}
>  
> @@ -46,16 +44,12 @@ post-install:
>       ${INSTALL_SCRIPT} ${WRKBUILD}/bin/patcher ${PREFIX}/bin
>       ${INSTALL_DATA_DIR} ${PREFIX}/libexec/cil
>       ${INSTALL_PROGRAM} \
> -             ${WRKBUILD}/obj/x86_LINUX/machdep-ml*.exe \
> +             ${WRKBUILD}/obj/x86_OPENBSD/machdep-ml.exe \
>               ${PREFIX}/libexec/cil
>       ${INSTALL_DATA_DIR} ${P5INST}/CIL
>       mv ${PREFIX}/lib/*.pm ${P5INST}/CIL/
> -     sed -e 's,@CILHOME@,${LOCALBASE},g' \
> -          -e 's,@CILLIBDIR@,${LOCALBASE}/${P5SITE}/CIL,g' \
> -          -e 's,@ARCHOS@,libexec/cil,g' \
> -             -e 's,@DEFAULT_CIL_MODE@,GNUCC,g' \
> -          -e 's,@CC@,${GCC},g' < \
> -         ${WRKSRC}/bin/CilConfig.pm.in > ${P5INST}/CilConfig.pm
> +     sed -e 's,@CILLIBDIR@,${LOCALBASE}/${P5SITE}/CIL,g' \
> +         ${P5INST}/CIL/CilConfig.pm > ${P5INST}/CilConfig.pm
>  
>  
>  .include <bsd.port.mk>
> Index: patches/patch-bin_cilly
> ===================================================================
> RCS file: patches/patch-bin_cilly
> diff -N patches/patch-bin_cilly
> --- patches/patch-bin_cilly   28 May 2006 15:44:14 -0000      1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-bin_cilly,v 1.2 2006/05/28 15:44:14 avsm Exp $
> ---- bin/cilly.orig   Sun May 21 05:14:15 2006
> -+++ bin/cilly        Sat May 27 19:23:05 2006
> -@@ -61,7 +61,7 @@ use File::Basename;
> - use strict;
> - BEGIN {
> -     @CilCompiler::ISA = qw(Cilly);
> --    $CilCompiler::base = "$::cilhome/obj/$::archos/cilly";
> -+    $CilCompiler::base = "$::cilhome/$::archos/cilly";
> -     # Use the most recent version of cilly
> -     $CilCompiler::mtime_asm = int((stat("$CilCompiler::base.asm.exe"))[9]);
> -     $CilCompiler::mtime_byte = 
> int((stat("$CilCompiler::base.byte.exe"))[9]);
> Index: patches/patch-configure_in
> ===================================================================
> RCS file: patches/patch-configure_in
> diff -N patches/patch-configure_in
> --- patches/patch-configure_in        18 Aug 2012 22:00:56 -0000      1.8
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,37 +0,0 @@
> -$OpenBSD: patch-configure_in,v 1.8 2012/08/18 22:00:56 avsm Exp $
> ---- configure.in.orig        Sat Jul 14 12:20:43 2012
> -+++ configure.in     Thu Aug  9 18:54:58 2012
> -@@ -83,7 +83,7 @@ binaryExists() {
> - # this specifies the root of the source tree; it's just the
> - # directory where ./configure runs, except on cygwin, which
> - # overrides this below
> --CILHOME=`pwd`
> -+CILHOME=${LOCALBASE}
> - 
> - DEFAULT_COMPILER=_GNUCC
> - DEFAULT_CIL_MODE=GNUCC
> -@@ -125,8 +125,8 @@ ocamlDownloadInstructions="
> - # required major/minor
> - reqMaj=3
> - reqMin=08
> --knownMaj=3
> --knownMin=12
> -+knownMaj=4
> -+knownMin=0
> - AC_MSG_CHECKING(ocaml version is at least $reqMaj.$reqMin)
> - if binaryExists ocamlc; then
> -   # what version?
> -@@ -365,6 +365,13 @@ case "$target" in
> - 
> -   *86*linux*)
> -     AC_MSG_RESULT(configuring for linux/x86)
> -+
> -+    ARCHOS=x86_LINUX
> -+    ;;
> -+
> -+   # openbsd
> -+  *openbsd*)
> -+    AC_MSG_RESULT(configuring for OpenBSD)
> - 
> -     ARCHOS=x86_LINUX
> -     ;;
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/devel/cil/pkg/PLIST,v
> retrieving revision 1.6
> diff -u -p -r1.6 PLIST
> --- pkg/PLIST 18 Aug 2012 22:00:56 -0000      1.6
> +++ pkg/PLIST 26 Nov 2012 21:40:29 -0000
> @@ -137,9 +137,7 @@ ${P5SITE}/CIL/TempFile.pm
>  ${P5SITE}/CilConfig.pm
>  libexec/cil/
>  @bin libexec/cil/machdep-ml.exe
> -@bin libexec/cil/machdep-ml32.exe
> -@bin libexec/cil/machdep-ml64.exe
>  libexec/cil/obj/
> -libexec/cil/obj/x86_LINUX/
> -@bin libexec/cil/obj/x86_LINUX/cilly.asm.exe
> -@bin libexec/cil/obj/x86_LINUX/cilly.byte.exe
> +libexec/cil/obj/x86_OPENBSD/
> +@bin libexec/cil/obj/x86_OPENBSD/cilly.asm.exe
> +@bin libexec/cil/obj/x86_OPENBSD/cilly.byte.exe
> .
> 
Builds on amd64 and i386, and regression tests work.

Ok. Leaves sparc / powerpc to be tested.

Reply via email to