Index: lang/ocaml/Makefile =================================================================== --- lang/ocaml/Makefile (revision 456452) +++ lang/ocaml/Makefile (working copy) @@ -70,6 +70,9 @@ .endif .if ${ARCH} == armv6 || ${ARCH} == armv7 +BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils +RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils +AS= ${LOCALBASE}/bin/as CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS} -meabi=5" .else CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS}" Index: lang/ocaml/files/patch-configure =================================================================== --- lang/ocaml/files/patch-configure (revision 456452) +++ lang/ocaml/files/patch-configure (working copy) @@ -17,7 +17,7 @@ + *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*) sharedcccompopts="-fPIC" - mksharedlib="$bytecc -shared" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" bytecclinkopts="$bytecclinkopts -Wl,-E" byteccrpath="-Wl,-rpath," mksharedlibrpath="-Wl,-rpath," @@ -26,7 +26,7 @@ *gcc*) sharedcccompopts="-fPIC" - mksharedlib="$bytecc -shared" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" byteccrpath="-Wl,-rpath," mksharedlibrpath="-Wl,-rpath," shared_libraries_supported=true;; @@ -35,12 +35,12 @@ sharedcccompopts="-fPIC" if sh ./solaris-ld; then - mksharedlib="$bytecc -shared" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" byteccrpath="-R" mksharedlibrpath="-R" else - mksharedlib="$bytecc -shared" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" bytecclinkopts="$bytecclinkopts -Wl,-E" natdynlinkopts="-Wl,-E" byteccrpath="-Wl,-rpath," @@ -49,13 +49,13 @@ shared_libraries_supported=true;; i[3456]86-*-darwin[89].*) - mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress" bytecccompopts="$dl_defs $bytecccompopts" dl_needs_underscore=false shared_libraries_supported=true;; *-apple-darwin*) - mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind" bytecccompopts="$dl_defs $bytecccompopts" dl_needs_underscore=false shared_libraries_supported=true;; @@ -64,7 +64,7 @@ *-*-openbsd*) sharedcccompopts="-fPIC" - mksharedlib="$bytecc -shared" -+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" ++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared" bytecclinkopts="$bytecclinkopts -Wl,-E" natdynlinkopts="-Wl,-E" byteccrpath="-Wl,-rpath," @@ -120,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 +938,8 @@ case "$arch,$system" in +@@ -932,6 +937,8 @@ case "$arch,$system" in esac;; arm,freebsd) as="${TOOLPREF}cc -c" aspp="${TOOLPREF}cc -c";; @@ -129,7 +129,7 @@ *,freebsd) as="${TOOLPREF}as" aspp="${TOOLPREF}cc -c";; amd64,*|arm,*|arm64,*|i386,*|power,bsd*|sparc,*) -@@ -955,9 +963,11 @@ case "$arch,$system" in +@@ -955,9 +962,11 @@ case "$arch,$system" in case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;; amd64,linux) profiling='prof';; amd64,openbsd) profiling='prof';; @@ -141,7 +141,7 @@ arm,linux*) profiling='prof';; power,elf) profiling='prof';; power,bsd*) profiling='prof';; -@@ -1415,6 +1425,8 @@ if test "$pthread_wanted" = "yes"; then +@@ -1415,6 +1424,8 @@ if test "$pthread_wanted" = "yes"; then case "$target" in *-*-solaris*) pthread_link="-lpthread -lposix4" pthread_caml_link="-cclib -lpthread -cclib -lposix4";; @@ -150,7 +150,7 @@ *-*-freebsd*) pthread_link="-pthread" pthread_caml_link="-cclib -pthread";; *-*-openbsd*) pthread_link="-pthread" -@@ -1431,7 +1443,7 @@ if test "$pthread_wanted" = "yes"; then +@@ -1431,7 +1442,7 @@ if test "$pthread_wanted" = "yes"; then bytecccompopts="$bytecccompopts -D_REENTRANT" nativecccompopts="$nativecccompopts -D_REENTRANT" case "$target" in @@ -159,7 +159,7 @@ bytecccompopts="$bytecccompopts -D_THREAD_SAFE" nativecccompopts="$nativecccompopts -D_THREAD_SAFE";; *-*-openbsd*) -@@ -1601,6 +1613,7 @@ if test "$x11_include" = "not found"; then +@@ -1601,6 +1612,7 @@ if test "$x11_include" = "not found"; then else x11_libs="-L$dir" case "$target" in @@ -167,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 +1657,10 @@ echo "X11_LINK=$x11_link" >> Makefile +@@ -1644,10 +1656,10 @@ echo "X11_LINK=$x11_link" >> Makefile # Look for BFD library if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \