Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2017 15:31:08 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r456402 - in head/lang/ocaml: . files
Message-ID:  <201712151531.vBFFV86t045131@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Fri Dec 15 15:31:08 2017
New Revision: 456402
URL: https://svnweb.freebsd.org/changeset/ports/456402

Log:
  First step to unbreak `lang/ocaml' on aarch64: teach configure script that
  the architecture exists on FreeBSD.  Unfortunately, this is not enough for
  build to succeed, it now complains that as(1) is not found:
  
    ../boot/ocamlrun ../ocamlopt -strict-sequence -w +33..39 -g -warn-error A
    -bin-annot -nostdlib -safe-string `./Compflags camlinternalFormatBasics.cmx`
    -c camlinternalFormatBasics.ml
    sh: as: not found
    File "camlinternalFormatBasics.ml", line 1:
    Error: Assembler error, input left in file /tmp/camlasm4329ae.s
    gmake[7]: *** [Makefile.shared:84: camlinternalFormatBasics.cmx] Error 2
  
  Developed on:	ref11-aarch64.freebsd.org

Modified:
  head/lang/ocaml/Makefile
  head/lang/ocaml/files/patch-configure

Modified: head/lang/ocaml/Makefile
==============================================================================
--- head/lang/ocaml/Makefile	Fri Dec 15 15:22:29 2017	(r456401)
+++ head/lang/ocaml/Makefile	Fri Dec 15 15:31:08 2017	(r456402)
@@ -18,7 +18,7 @@ LICENSE_NAME_QPL10=	Q Public License, Version 1.0
 LICENSE_FILE_QPL10=	${WRKSRC}/LICENSE
 LICENSE_PERMS_QPL10=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
-BROKEN_aarch64=		Does not build: No rule to make target aarch64.o, needed by libasmrun.a
+BROKEN_aarch64=		Does not build: sh: as: not found
 BROKEN_armv7=		Does not build: hasgot.c: undefined reference to `tgetent'
 BROKEN_powerpc64=	Does not build: error: too few arguments to function gethostbyname_r
 BROKEN_sparc64=	ocamlc.opt seg-faults, please try to fix

Modified: head/lang/ocaml/files/patch-configure
==============================================================================
--- head/lang/ocaml/files/patch-configure	Fri Dec 15 15:22:29 2017	(r456401)
+++ head/lang/ocaml/files/patch-configure	Fri Dec 15 15:31:08 2017	(r456402)
@@ -80,7 +80,15 @@
      i[3456]86-*-freebsd*)         natdynlink=true;;
      x86_64-*-freebsd*)            natdynlink=true;;
      i[3456]86-*-openbsd*)         natdynlink=true;;
-@@ -844,6 +846,7 @@ case "$target" in
+@@ -804,6 +806,7 @@ if test $with_sharedlibs = "yes"; then
+     arm*-*-linux*)                natdynlink=true;;
+     arm*-*-freebsd*)              natdynlink=true;;
+     aarch64-*-linux*)             natdynlink=true;;
++    aarch64-*-freebsd*)           natdynlink=true;;
+   esac
+ fi
+ 
+@@ -844,6 +847,7 @@ case "$target" in
    i[3456]86-*-gnu*)             arch=i386; system=gnu;;
    i[3456]86-*-mingw*)           arch=i386; system=mingw;;
    powerpc*-*-linux*)            arch=power; model=ppc; system=elf;;
@@ -88,7 +96,7 @@
    powerpc-*-netbsd*)            arch=power; model=ppc; system=elf;;
    powerpc-*-openbsd*)           arch=power; model=ppc; system=bsd_elf;;
    powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
-@@ -862,6 +865,7 @@ case "$target" in
+@@ -862,12 +866,14 @@ case "$target" in
    zaurus*-*-openbsd*)           arch=arm; system=bsd;;
    x86_64-*-linux*)              arch=amd64; system=linux;;
    x86_64-*-gnu*)                arch=amd64; system=gnu;;
@@ -96,7 +104,14 @@
    x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
    x86_64-*-netbsd*)             arch=amd64; system=netbsd;;
    x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
-@@ -889,7 +893,7 @@ else
+   x86_64-*-darwin*)             arch=amd64; system=macosx;;
+   x86_64-*-mingw*)              arch=amd64; system=mingw;;
+   aarch64-*-linux*)             arch=arm64; system=linux;;
++  aarch64-*-freebsd*)           arch=arm64; system=freebsd;;
+   x86_64-*-cygwin*)             arch=amd64; system=cygwin;;
+ esac
+ 
+@@ -889,7 +895,7 @@ else
  fi
  
  nativecccompopts=''
@@ -105,7 +120,7 @@
  # FIXME the naming of nativecclinkopts is broken: these are options for
  # ld (for shared libs), not for cc
  nativeccrpath="$byteccrpath"
-@@ -932,6 +936,8 @@ case "$arch,$system" in
+@@ -932,6 +938,8 @@ case "$arch,$system" in
                    esac;;
    arm,freebsd)    as="${TOOLPREF}cc -c"
                    aspp="${TOOLPREF}cc -c";;
@@ -114,7 +129,7 @@
    *,freebsd)      as="${TOOLPREF}as"
                    aspp="${TOOLPREF}cc -c";;
    amd64,*|arm,*|arm64,*|i386,*|power,bsd*|sparc,*)
-@@ -955,9 +961,11 @@ case "$arch,$system" in
+@@ -955,9 +963,11 @@ case "$arch,$system" in
      case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
    amd64,linux) profiling='prof';;
    amd64,openbsd) profiling='prof';;
@@ -126,7 +141,7 @@
    arm,linux*) profiling='prof';;
    power,elf) profiling='prof';;
    power,bsd*) profiling='prof';;
-@@ -1415,6 +1423,8 @@ if test "$pthread_wanted" = "yes"; then
+@@ -1415,6 +1425,8 @@ if test "$pthread_wanted" = "yes"; then
    case "$target" in
      *-*-solaris*)  pthread_link="-lpthread -lposix4"
                     pthread_caml_link="-cclib -lpthread -cclib -lposix4";;
@@ -135,7 +150,7 @@
      *-*-freebsd*)  pthread_link="-pthread"
                     pthread_caml_link="-cclib -pthread";;
      *-*-openbsd*)  pthread_link="-pthread"
-@@ -1431,7 +1441,7 @@ if test "$pthread_wanted" = "yes"; then
+@@ -1431,7 +1443,7 @@ if test "$pthread_wanted" = "yes"; then
      bytecccompopts="$bytecccompopts -D_REENTRANT"
      nativecccompopts="$nativecccompopts -D_REENTRANT"
      case "$target" in
@@ -144,7 +159,7 @@
            bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
            nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
        *-*-openbsd*)
-@@ -1601,6 +1611,7 @@ if test "$x11_include" = "not found"; th
+@@ -1601,6 +1613,7 @@ if test "$x11_include" = "not found"; then
        else
          x11_libs="-L$dir"
          case "$target" in
@@ -152,7 +167,7 @@
            *-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
            *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
            *) x11_link="-L$dir -lX11";;
-@@ -1644,10 +1655,10 @@ echo "X11_LINK=$x11_link" >> Makefile
+@@ -1644,10 +1657,10 @@ echo "X11_LINK=$x11_link" >> Makefile
  # Look for BFD library
  
  if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
@@ -165,7 +180,7 @@
  else
    wrn "BFD library not found, 'objinfo' will be unable to display info on .cmxs files."
    echo "LIBBFD_LINK=" >> Makefile
-@@ -1686,12 +1697,6 @@ if $no_naked_pointers; then
+@@ -1686,12 +1699,6 @@ if $no_naked_pointers; then
    echo "#define NO_NAKED_POINTERS" >> m.h
  fi
  
@@ -178,7 +193,7 @@
  # Final twiddling of compiler options to work around known bugs
  
  nativeccprofopts="$nativecccompopts"
-@@ -1723,7 +1728,7 @@ SYSLIB=-l\$(1)
+@@ -1723,7 +1730,7 @@ SYSLIB=-l\$(1)
  MKLIB=${TOOLPREF}ar rc \$(1) \$(2); ${TOOLPREF}ranlib \$(1)
  #ml let mklib out files opts = Printf.sprintf "${TOOLPREF}ar rc %s %s %s; ${TOOLPREF}ranlib %s" out opts files out;;
  EOF



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712151531.vBFFV86t045131>