From 3f1cffedb771c252ad956aad1b91c1c98f18b0f5 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 16 Oct 2014 17:02:46 +0000 Subject: [PATCH] jam: x86_64 support --- dev-java/jamvm/jamvm-1.5.4.recipe | 13 +- ...jamvm-1.5.4.patch => jamvm-1.5.4.patchset} | 1132 ++++++++++++++++- 2 files changed, 1104 insertions(+), 41 deletions(-) rename dev-java/jamvm/patches/{jamvm-1.5.4.patch => jamvm-1.5.4.patchset} (56%) diff --git a/dev-java/jamvm/jamvm-1.5.4.recipe b/dev-java/jamvm/jamvm-1.5.4.recipe index f9a6b7a52..4a42947dc 100644 --- a/dev-java/jamvm/jamvm-1.5.4.recipe +++ b/dev-java/jamvm/jamvm-1.5.4.recipe @@ -5,14 +5,14 @@ version 2 (blue book). In comparison to most other VM's (free and commercial) \ it is extremely small. " HOMEPAGE="http://jamvm.sourceforge.net/" -SRC_URI="http://sourceforge.net/projects/jamvm/files/jamvm/JamVM%201.5.4/jamvm-1.5.4.tar.gz/download" +SRC_URI="http://sourceforge.net/projects/jamvm/files/jamvm/JamVM%20$portVersion/jamvm-$portVersion.tar.gz" CHECKSUM_SHA256="7865693698bc4322cabe1014a4b7ebdec1bc1daf45f1a4457b6e908a4446b124" REVISION="1" DEPEND="" LICENSE="GNU GPL v2" COPYRIGHT="2003-2010 Robert Lougher" -ARCHITECTURES="x86 ?x86_64" +ARCHITECTURES="x86 x86_64" if [ $effectiveTargetArchitecture != x86_gcc2 ]; then # x86_gcc2 is fine as primary target architecture as long as we're building # for a different secondary architecture. @@ -37,21 +37,20 @@ BUILD_REQUIRES=" devel:libz$secondaryArchSuffix >= 1.2.8 " BUILD_PREREQUIRES=" - cmd:autoconf + cmd:autoreconf cmd:aclocal cmd:libtool cmd:make cmd:gcc$secondaryArchSuffix + cmd:find " -PATCHES="jamvm-1.5.4.patch" +PATCHES="jamvm-$portVersion.patchset" BUILD() { - libtoolize --force --copy --install - aclocal - autoconf + autoreconf -fi runConfigure ./configure \ --with-classpath-install-dir=$prefix make diff --git a/dev-java/jamvm/patches/jamvm-1.5.4.patch b/dev-java/jamvm/patches/jamvm-1.5.4.patchset similarity index 56% rename from dev-java/jamvm/patches/jamvm-1.5.4.patch rename to dev-java/jamvm/patches/jamvm-1.5.4.patchset index 4ad43a873..6a995c7f2 100644 --- a/dev-java/jamvm/patches/jamvm-1.5.4.patch +++ b/dev-java/jamvm/patches/jamvm-1.5.4.patchset @@ -1,7 +1,14 @@ -diff -urN jamvm-1.5.4/configure.ac jamvm-1.5.4-haiku/configure.ac ---- jamvm-1.5.4/configure.ac 2009-12-31 18:40:45.004718592 +0000 -+++ jamvm-1.5.4-haiku/configure.ac 2011-02-16 13:12:11.465829888 +0000 -@@ -32,6 +32,7 @@ +From e2188578ac909825414e461d71df92ef68101902 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 16 Oct 2014 16:22:26 +0000 +Subject: applying patch jamvm-1.5.4.patch + + +diff --git a/configure.ac b/configure.ac +index 3dab639..3a38153 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,6 +32,7 @@ case "$host" in i[[3456]]86-*-linux*) host_cpu=i386 host_os=linux ;; i[[3456]]86-*-kfreebsd*) host_cpu=i386 host_os=linux ;; i[[3456]]86-*-darwin*) host_cpu=i386 host_os=darwin ;; @@ -9,7 +16,7 @@ diff -urN jamvm-1.5.4/configure.ac jamvm-1.5.4-haiku/configure.ac arm*-*-darwin*) host_cpu=arm host_os=darwin libdl_needed=no ;; i386-*-openbsd*) host_os=bsd libdl_needed=no ;; i386-*-freebsd*) host_os=bsd libdl_needed=no ;; -@@ -232,12 +233,15 @@ +@@ -232,12 +233,15 @@ AC_CHECK_PROGS(JAVAC, ecj jikes "gcj -C" javac) dnl Checks for libraries. @@ -30,7 +37,7 @@ diff -urN jamvm-1.5.4/configure.ac jamvm-1.5.4-haiku/configure.ac if test "$libdl_needed" != no; then AC_CHECK_LIB(dl,dlopen,,AC_MSG_ERROR(libdl is missing)) -@@ -338,6 +342,8 @@ +@@ -338,6 +342,8 @@ AC_CONFIG_FILES( src/os/bsd/i386/Makefile \ src/os/bsd/x86_64/Makefile \ src/os/bsd/sparc/Makefile \ @@ -39,9 +46,10 @@ diff -urN jamvm-1.5.4/configure.ac jamvm-1.5.4-haiku/configure.ac lib/Makefile \ lib/java/Makefile \ lib/java/lang/Makefile \ -diff -urN jamvm-1.5.4/src/os/Makefile.am jamvm-1.5.4-haiku/src/os/Makefile.am ---- jamvm-1.5.4/src/os/Makefile.am 2009-12-31 18:40:47.020709376 +0000 -+++ jamvm-1.5.4-haiku/src/os/Makefile.am 2011-02-16 12:33:41.012058624 +0000 +diff --git a/src/os/Makefile.am b/src/os/Makefile.am +index 4047f93..ce83be2 100644 +--- a/src/os/Makefile.am ++++ b/src/os/Makefile.am @@ -20,5 +20,5 @@ ## @@ -49,10 +57,11 @@ diff -urN jamvm-1.5.4/src/os/Makefile.am jamvm-1.5.4-haiku/src/os/Makefile.am -DIST_SUBDIRS = linux darwin bsd solaris +DIST_SUBDIRS = linux darwin bsd solaris haiku -diff -urN jamvm-1.5.4/src/os/Makefile.in jamvm-1.5.4-haiku/src/os/Makefile.in ---- jamvm-1.5.4/src/os/Makefile.in 2010-01-01 20:21:15.018087936 +0000 -+++ jamvm-1.5.4-haiku/src/os/Makefile.in 2011-02-16 12:33:25.160694272 +0000 -@@ -177,7 +177,7 @@ +diff --git a/src/os/Makefile.in b/src/os/Makefile.in +index 561d773..a0c267a 100644 +--- a/src/os/Makefile.in ++++ b/src/os/Makefile.in +@@ -177,7 +177,7 @@ use_zip_no = @use_zip_no@ use_zip_yes = @use_zip_yes@ with_classpath_install_dir = @with_classpath_install_dir@ SUBDIRS = @os@ @@ -61,9 +70,11 @@ diff -urN jamvm-1.5.4/src/os/Makefile.in jamvm-1.5.4-haiku/src/os/Makefile.in all: all-recursive .SUFFIXES: -diff -urN jamvm-1.5.4/src/os/haiku/Makefile.am jamvm-1.5.4-haiku/src/os/haiku/Makefile.am ---- jamvm-1.5.4/src/os/haiku/Makefile.am 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/Makefile.am 2011-02-16 12:47:23.250085376 +0000 +diff --git a/src/os/haiku/Makefile.am b/src/os/haiku/Makefile.am +new file mode 100644 +index 0000000..66e3cad +--- /dev/null ++++ b/src/os/haiku/Makefile.am @@ -0,0 +1,28 @@ +## +## Copyright (C) 2003, 2004, 2005, 2006, 2007 @@ -93,9 +104,11 @@ diff -urN jamvm-1.5.4/src/os/haiku/Makefile.am jamvm-1.5.4-haiku/src/os/haiku/Ma +libos_la_SOURCES = os.c + +AM_CPPFLAGS = -I$(top_builddir)/src -diff -urN jamvm-1.5.4/src/os/haiku/Makefile.in jamvm-1.5.4-haiku/src/os/haiku/Makefile.in ---- jamvm-1.5.4/src/os/haiku/Makefile.in 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/Makefile.in 2011-02-16 12:47:23.274202624 +0000 +diff --git a/src/os/haiku/Makefile.in b/src/os/haiku/Makefile.in +new file mode 100644 +index 0000000..83fca72 +--- /dev/null ++++ b/src/os/haiku/Makefile.in @@ -0,0 +1,562 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ @@ -659,9 +672,11 @@ diff -urN jamvm-1.5.4/src/os/haiku/Makefile.in jamvm-1.5.4-haiku/src/os/haiku/Ma +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: -diff -urN jamvm-1.5.4/src/os/haiku/i386/Makefile.am jamvm-1.5.4-haiku/src/os/haiku/i386/Makefile.am ---- jamvm-1.5.4/src/os/haiku/i386/Makefile.am 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/i386/Makefile.am 2011-02-16 12:47:23.220725248 +0000 +diff --git a/src/os/haiku/i386/Makefile.am b/src/os/haiku/i386/Makefile.am +new file mode 100644 +index 0000000..166daaa +--- /dev/null ++++ b/src/os/haiku/i386/Makefile.am @@ -0,0 +1,25 @@ +## +## Copyright (C) 2003, 2004, 2005, 2006, 2007 @@ -688,9 +703,11 @@ diff -urN jamvm-1.5.4/src/os/haiku/i386/Makefile.am jamvm-1.5.4-haiku/src/os/hai +libnative_la_SOURCES = init.c dll_md.c + +AM_CPPFLAGS = -I$(top_builddir)/src -diff -urN jamvm-1.5.4/src/os/haiku/i386/Makefile.in jamvm-1.5.4-haiku/src/os/haiku/i386/Makefile.in ---- jamvm-1.5.4/src/os/haiku/i386/Makefile.in 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/i386/Makefile.in 2011-02-16 12:47:23.237240320 +0000 +diff --git a/src/os/haiku/i386/Makefile.in b/src/os/haiku/i386/Makefile.in +new file mode 100644 +index 0000000..b8eb3ed +--- /dev/null ++++ b/src/os/haiku/i386/Makefile.in @@ -0,0 +1,448 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ @@ -1140,9 +1157,11 @@ diff -urN jamvm-1.5.4/src/os/haiku/i386/Makefile.in jamvm-1.5.4-haiku/src/os/hai +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: -diff -urN jamvm-1.5.4/src/os/haiku/i386/dll_md.c jamvm-1.5.4-haiku/src/os/haiku/i386/dll_md.c ---- jamvm-1.5.4/src/os/haiku/i386/dll_md.c 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/i386/dll_md.c 2011-02-16 12:47:23.151519232 +0000 +diff --git a/src/os/haiku/i386/dll_md.c b/src/os/haiku/i386/dll_md.c +new file mode 100644 +index 0000000..15261f3 +--- /dev/null ++++ b/src/os/haiku/i386/dll_md.c @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 @@ -1262,9 +1281,11 @@ diff -urN jamvm-1.5.4/src/os/haiku/i386/dll_md.c jamvm-1.5.4-haiku/src/os/haiku/ + return ostack; +} +#endif -diff -urN jamvm-1.5.4/src/os/haiku/i386/init.c jamvm-1.5.4-haiku/src/os/haiku/i386/init.c ---- jamvm-1.5.4/src/os/haiku/i386/init.c 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/i386/init.c 2011-02-16 12:47:23.207880192 +0000 +diff --git a/src/os/haiku/i386/init.c b/src/os/haiku/i386/init.c +new file mode 100644 +index 0000000..24e0d05 +--- /dev/null ++++ b/src/os/haiku/i386/init.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2003, 2004, 2006, 2007 @@ -1292,9 +1313,11 @@ diff -urN jamvm-1.5.4/src/os/haiku/i386/init.c jamvm-1.5.4-haiku/src/os/haiku/i3 + +void initialisePlatform() { +} -diff -urN jamvm-1.5.4/src/os/haiku/os.c jamvm-1.5.4-haiku/src/os/haiku/os.c ---- jamvm-1.5.4/src/os/haiku/os.c 1970-01-01 00:00:00.000000000 +0000 -+++ jamvm-1.5.4-haiku/src/os/haiku/os.c 2011-02-16 12:47:23.277348352 +0000 +diff --git a/src/os/haiku/os.c b/src/os/haiku/os.c +new file mode 100644 +index 0000000..421b503 +--- /dev/null ++++ b/src/os/haiku/os.c @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 @@ -1370,3 +1393,1044 @@ diff -urN jamvm-1.5.4/src/os/haiku/os.c jamvm-1.5.4-haiku/src/os/haiku/os.c + sprintf(buff, "lib%s.so", name); + return buff; +} +-- +1.8.3.4 + + +From 2f58c6f97a57c1a758aa7c1ff7b4deafa9eeb253 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 16 Oct 2014 16:24:38 +0000 +Subject: x86_64 support + + +diff --git a/configure.ac b/configure.ac +index 3a38153..6c884fd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,6 +42,7 @@ hppa*-*-linux*) host_cpu=parisc host_os=linux ;; + mipsel-*-linux*) host_cpu=mips host_os=linux ;; + x86_64-*-openbsd*) host_os=bsd libdl_needed=no ;; + x86_64-*-freebsd*) host_os=bsd libdl_needed=no ;; ++x86_64-*-haiku*) host_os=haiku libdl_needed=no ;; + arm*-*-linux*) host_cpu=arm host_os=linux ;; + arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;; + arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;; +@@ -344,6 +345,7 @@ AC_CONFIG_FILES( + src/os/bsd/sparc/Makefile \ + src/os/haiku/Makefile \ + src/os/haiku/i386/Makefile \ ++ src/os/haiku/x86_64/Makefile \ + lib/Makefile \ + lib/java/Makefile \ + lib/java/lang/Makefile \ +diff --git a/src/os/haiku/Makefile.am b/src/os/haiku/Makefile.am +index 66e3cad..476cc06 100644 +--- a/src/os/haiku/Makefile.am ++++ b/src/os/haiku/Makefile.am +@@ -20,7 +20,7 @@ + ## + + SUBDIRS = @arch@ +-DIST_SUBDIRS = i386 ++DIST_SUBDIRS = i386 x86_64 + + noinst_LTLIBRARIES = libos.la + libos_la_SOURCES = os.c +diff --git a/src/os/haiku/x86_64/Makefile.am b/src/os/haiku/x86_64/Makefile.am +new file mode 100644 +index 0000000..c63e5fa +--- /dev/null ++++ b/src/os/haiku/x86_64/Makefile.am +@@ -0,0 +1,26 @@ ++## ++## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 ++## Robert Lougher . ++## ++## This file is part of JamVM. ++## ++## This program is free software; you can redistribute it and/or ++## modify it under the terms of the GNU General Public License ++## as published by the Free Software Foundation; either version 2, ++## or (at your option) any later version. ++## ++## This program is distributed in the hope that it will be useful, ++## but WITHOUT ANY WARRANTY; without even the implied warranty of ++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++## GNU General Public License for more details. ++## ++## You should have received a copy of the GNU General Public License ++## along with this program; if not, write to the Free Software ++## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++## ++ ++noinst_LTLIBRARIES = libnative.la ++libnative_la_SOURCES = init.c dll_md.c callNative.S ++ ++AM_CPPFLAGS = -I$(top_builddir)/src ++AM_CCASFLAGS = -I$(top_builddir)/src +diff --git a/src/os/haiku/x86_64/Makefile.in b/src/os/haiku/x86_64/Makefile.in +new file mode 100644 +index 0000000..eebd4f1 +--- /dev/null ++++ b/src/os/haiku/x86_64/Makefile.in +@@ -0,0 +1,587 @@ ++# Makefile.in generated by automake 1.13.1 from Makefile.am. ++# @configure_input@ ++ ++# Copyright (C) 1994-2012 Free Software Foundation, Inc. ++ ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++@SET_MAKE@ ++ ++VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } ++pkgdatadir = $(datadir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkglibexecdir = $(libexecdir)/@PACKAGE@ ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++build_triplet = @build@ ++host_triplet = @host@ ++subdir = src/os/haiku/x86_64 ++DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ++ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ ++ $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ++CONFIG_HEADER = $(top_builddir)/src/config.h ++CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_VPATH_FILES = ++LTLIBRARIES = $(noinst_LTLIBRARIES) ++libnative_la_LIBADD = ++am_libnative_la_OBJECTS = init.lo dll_md.lo callNative.lo ++libnative_la_OBJECTS = $(am_libnative_la_OBJECTS) ++AM_V_lt = $(am__v_lt_@AM_V@) ++am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) ++am__v_lt_0 = --silent ++am__v_lt_1 = ++AM_V_P = $(am__v_P_@AM_V@) ++am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) ++am__v_P_0 = false ++am__v_P_1 = : ++AM_V_GEN = $(am__v_GEN_@AM_V@) ++am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) ++am__v_GEN_0 = @echo " GEN " $@; ++am__v_GEN_1 = ++AM_V_at = $(am__v_at_@AM_V@) ++am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) ++am__v_at_0 = @ ++am__v_at_1 = ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src ++depcomp = $(SHELL) $(top_srcdir)/depcomp ++am__depfiles_maybe = depfiles ++am__mv = mv -f ++CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) ++LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ ++ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ ++ $(AM_CCASFLAGS) $(CCASFLAGS) ++AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) ++am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) ++am__v_CPPAS_0 = @echo " CPPAS " $@; ++am__v_CPPAS_1 = ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ ++ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ ++ $(AM_CFLAGS) $(CFLAGS) ++AM_V_CC = $(am__v_CC_@AM_V@) ++am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) ++am__v_CC_0 = @echo " CC " $@; ++am__v_CC_1 = ++CCLD = $(CC) ++LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++AM_V_CCLD = $(am__v_CCLD_@AM_V@) ++am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) ++am__v_CCLD_0 = @echo " CCLD " $@; ++am__v_CCLD_1 = ++SOURCES = $(libnative_la_SOURCES) ++DIST_SOURCES = $(libnative_la_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac ++am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) ++# Read a list of newline-separated strings from the standard input, ++# and print each of them once, without duplicates. Input order is ++# *not* preserved. ++am__uniquify_input = $(AWK) '\ ++ BEGIN { nonempty = 0; } \ ++ { items[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in items) print i; }; } \ ++' ++# Make sure the list of sources is unique. This is necessary because, ++# e.g., the same source file might be shared among _SOURCES variables ++# for different programs/libraries. ++am__define_uniq_tagged_files = \ ++ list='$(am__tagged_files)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | $(am__uniquify_input)` ++ETAGS = etags ++CTAGS = ctags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++ACLOCAL = @ACLOCAL@ ++ALLOCA = @ALLOCA@ ++AMTAR = @AMTAR@ ++AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ++AR = @AR@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AWK = @AWK@ ++CC = @CC@ ++CCAS = @CCAS@ ++CCASDEPMODE = @CCASDEPMODE@ ++CCASFLAGS = @CCASFLAGS@ ++CCDEPMODE = @CCDEPMODE@ ++CFLAGS = @CFLAGS@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++DLLTOOL = @DLLTOOL@ ++DSYMUTIL = @DSYMUTIL@ ++DUMPBIN = @DUMPBIN@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++FGREP = @FGREP@ ++GREP = @GREP@ ++INSTALL = @INSTALL@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++JAVAC = @JAVAC@ ++LD = @LD@ ++LDFLAGS = @LDFLAGS@ ++LIBM = @LIBM@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LIBTOOL = @LIBTOOL@ ++LIPO = @LIPO@ ++LN_S = @LN_S@ ++LTLIBOBJS = @LTLIBOBJS@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ ++MANIFEST_TOOL = @MANIFEST_TOOL@ ++MKDIR_P = @MKDIR_P@ ++NM = @NM@ ++NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ ++OBJEXT = @OBJEXT@ ++OTOOL = @OTOOL@ ++OTOOL64 = @OTOOL64@ ++PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++RANLIB = @RANLIB@ ++SED = @SED@ ++SET_MAKE = @SET_MAKE@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ ++VERSION = @VERSION@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ ++ac_ct_AR = @ac_ct_AR@ ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++am__tar = @am__tar@ ++am__untar = @am__untar@ ++arch = @arch@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++builddir = @builddir@ ++datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ ++exec_prefix = @exec_prefix@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++htmldir = @htmldir@ ++includedir = @includedir@ ++infodir = @infodir@ ++install_sh = @install_sh@ ++interp_cflags = @interp_cflags@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++localedir = @localedir@ ++localstatedir = @localstatedir@ ++mandir = @mandir@ ++mkdir_p = @mkdir_p@ ++oldincludedir = @oldincludedir@ ++os = @os@ ++pdfdir = @pdfdir@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++psdir = @psdir@ ++sbindir = @sbindir@ ++sharedstatedir = @sharedstatedir@ ++srcdir = @srcdir@ ++sysconfdir = @sysconfdir@ ++target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ ++use_zip_no = @use_zip_no@ ++use_zip_yes = @use_zip_yes@ ++with_classpath_install_dir = @with_classpath_install_dir@ ++noinst_LTLIBRARIES = libnative.la ++libnative_la_SOURCES = init.c dll_md.c callNative.S ++AM_CPPFLAGS = -I$(top_builddir)/src ++AM_CCASFLAGS = -I$(top_builddir)/src ++all: all-am ++ ++.SUFFIXES: ++.SUFFIXES: .S .c .lo .o .obj ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/os/haiku/x86_64/Makefile'; \ ++ $(am__cd) $(top_srcdir) && \ ++ $(AUTOMAKE) --gnu src/os/haiku/x86_64/Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ++ esac; ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(am__aclocal_m4_deps): ++ ++clean-noinstLTLIBRARIES: ++ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) ++ @list='$(noinst_LTLIBRARIES)'; \ ++ locs=`for p in $$list; do echo $$p; done | \ ++ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ ++ sort -u`; \ ++ test -z "$$locs" || { \ ++ echo rm -f $${locs}; \ ++ rm -f $${locs}; \ ++ } ++libnative.la: $(libnative_la_OBJECTS) $(libnative_la_DEPENDENCIES) $(EXTRA_libnative_la_DEPENDENCIES) ++ $(AM_V_CCLD)$(LINK) $(libnative_la_OBJECTS) $(libnative_la_LIBADD) $(LIBS) ++ ++mostlyclean-compile: ++ -rm -f *.$(OBJEXT) ++ ++distclean-compile: ++ -rm -f *.tab.c ++ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callNative.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dll_md.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ ++ ++.S.o: ++@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< ++ ++.S.obj: ++@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ++ ++.S.lo: ++@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo ++@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< ++ ++.c.o: ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< ++ ++.c.obj: ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` ++ ++.c.lo: ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ++ ++mostlyclean-libtool: ++ -rm -f *.lo ++ ++clean-libtool: ++ -rm -rf .libs _libs ++ ++ID: $(am__tagged_files) ++ $(am__define_uniq_tagged_files); mkid -fID $$unique ++tags: tags-am ++TAGS: tags ++ ++tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) ++ set x; \ ++ here=`pwd`; \ ++ $(am__define_uniq_tagged_files); \ ++ shift; \ ++ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ if test $$# -gt 0; then \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ "$$@" $$unique; \ ++ else \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$unique; \ ++ fi; \ ++ fi ++ctags: ctags-am ++ ++CTAGS: ctags ++ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) ++ $(am__define_uniq_tagged_files); \ ++ test -z "$(CTAGS_ARGS)$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && $(am__cd) $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) "$$here" ++cscopelist: cscopelist-am ++ ++cscopelist-am: $(am__tagged_files) ++ list='$(am__tagged_files)'; \ ++ case "$(srcdir)" in \ ++ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ ++ *) sdir=$(subdir)/$(srcdir) ;; \ ++ esac; \ ++ for i in $$list; do \ ++ if test -f "$$i"; then \ ++ echo "$(subdir)/$$i"; \ ++ else \ ++ echo "$$sdir/$$i"; \ ++ fi; \ ++ done >> $(top_builddir)/cscope.files ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++ ++distdir: $(DISTFILES) ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test -d "$(distdir)/$$file"; then \ ++ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ ++ fi; \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ ++ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ ++ fi; \ ++ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ ++ else \ ++ test -f "$(distdir)/$$file" \ ++ || cp -p $$d/$$file "$(distdir)/$$file" \ ++ || exit 1; \ ++ fi; \ ++ done ++check-am: all-am ++check: check-am ++all-am: Makefile $(LTLIBRARIES) ++installdirs: ++install: install-am ++install-exec: install-exec-am ++install-data: install-data-am ++uninstall: uninstall-am ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-am ++install-strip: ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi ++mostlyclean-generic: ++ ++clean-generic: ++ ++distclean-generic: ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-am ++ ++clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ ++ mostlyclean-am ++ ++distclean: distclean-am ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-tags ++ ++dvi: dvi-am ++ ++dvi-am: ++ ++html: html-am ++ ++html-am: ++ ++info: info-am ++ ++info-am: ++ ++install-data-am: ++ ++install-dvi: install-dvi-am ++ ++install-dvi-am: ++ ++install-exec-am: ++ ++install-html: install-html-am ++ ++install-html-am: ++ ++install-info: install-info-am ++ ++install-info-am: ++ ++install-man: ++ ++install-pdf: install-pdf-am ++ ++install-pdf-am: ++ ++install-ps: install-ps-am ++ ++install-ps-am: ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-am ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-am ++ ++mostlyclean-am: mostlyclean-compile mostlyclean-generic \ ++ mostlyclean-libtool ++ ++pdf: pdf-am ++ ++pdf-am: ++ ++ps: ps-am ++ ++ps-am: ++ ++uninstall-am: ++ ++.MAKE: install-am install-strip ++ ++.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ ++ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ++ ctags-am distclean distclean-compile distclean-generic \ ++ distclean-libtool distclean-tags distdir dvi dvi-am html \ ++ html-am info info-am install install-am install-data \ ++ install-data-am install-dvi install-dvi-am install-exec \ ++ install-exec-am install-html install-html-am install-info \ ++ install-info-am install-man install-pdf install-pdf-am \ ++ install-ps install-ps-am install-strip installcheck \ ++ installcheck-am installdirs maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ++ tags tags-am uninstall uninstall-am ++ ++ ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: +diff --git a/src/os/haiku/x86_64/callNative.S b/src/os/haiku/x86_64/callNative.S +new file mode 100644 +index 0000000..26404e6 +--- /dev/null ++++ b/src/os/haiku/x86_64/callNative.S +@@ -0,0 +1,269 @@ ++/* ++ * Copyright (C) 2008, 2009 Robert Lougher . ++ * ++ * This file is part of JamVM. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2, ++ * or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++#include "config.h" ++ ++#ifndef USE_FFI ++.text ++.align 2 ++.global callJNIMethod ++.type callJNIMethod,function ++ ++/* ++ * Arguments passed in: ++ * ++ * %rdi JNIEnv ++ * %rsi class or NULL ++ * %rdx sig ++ * %rcx extra arg ++ * %r8 ostack ++ * %r9 function pntr ++ */ ++ ++callJNIMethod: ++ pushq %rbp ++ movq %rsp, %rbp ++ ++ pushq %r8 ++ pushq %r9 ++ pushq %rbx ++ pushq %r12 ++ pushq %r14 ++ pushq %r15 ++ ++ testq %rsi, %rsi ++ jne alloc_space ++ ++ movq (%r8), %rsi ++ addq $8, %r8 ++ ++alloc_space: ++ subq %rcx, %rsp ++ ++/* Setup argument registers: ++ * rdx, rcx, r8, r9 ++ * xmm0 - xmm7 ++ * ++ * local register usage: ++ * r10 = int reg count ++ * r11 = double handler ++ * r12 = float handler ++ * r14 = sig pntr ++ * r15 = stack pntr ++ * rbx = ostack pntr ++ */ ++ ++ leaq double_regs-10(%rip), %r11 ++ leaq float_regs-10(%rip), %r12 ++ leaq 1(%rdx), %r14 ++ movq %rsp, %r15 ++ xorq %r10, %r10 ++ movq %r8, %rbx ++ ++next: ++ movzbq (%r14), %rax ++ incq %r14 ++ ++ cmpq $41, %rax /* ')' */ ++ je done ++ cmpq $68, %rax /* 'D' */ ++ je double ++ cmpq $70, %rax /* 'F' */ ++ je float ++ cmpq $74, %rax /* 'J' */ ++ je long ++ ++skip_brackets: ++ cmpq $91, %rax /* '[' */ ++ jne check_ref ++ movzbq (%r14), %rax ++ incq %r14 ++ jmp skip_brackets ++ ++check_ref: ++ cmpq $76, %rax /* 'L' */ ++ jne int ++ ++skip_ref: ++ movzbq (%r14), %rax ++ incq %r14 ++ cmpq $59, %rax /* ';' */ ++ jne skip_ref ++ ++int: ++ movq (%rbx), %rax ++ addq $8, %rbx ++ ++check_regs: ++ incq %r10 ++ cmpq $2, %r10 ++ jg check_4 ++ ++ cmovneq %rax, %rdx ++ cmoveq %rax, %rcx ++ jmp next ++ ++check_4: ++ cmpq $4, %r10 ++ jg stack_push ++ ++ cmovneq %rax, %r8 ++ cmoveq %rax, %r9 ++ jmp next ++ ++stack_push: ++ movq %rax, (%r15) ++ addq $8, %r15 ++ jmp next ++ ++long: ++ movq (%rbx), %rax ++ addq $16, %rbx ++ jmp check_regs ++ ++double: ++ addq $10, %r11 ++ addq $10, %r12 ++ addq $16, %rbx ++ jmp *%r11 ++ ++double_regs: ++ movsd -16(%rbx), %xmm0 ++ jmp next ++ movsd -16(%rbx), %xmm1 ++ jmp next ++ movsd -16(%rbx), %xmm2 ++ jmp next ++ movsd -16(%rbx), %xmm3 ++ jmp next ++ movsd -16(%rbx), %xmm4 ++ jmp next ++ movsd -16(%rbx), %xmm5 ++ jmp next ++ movsd -16(%rbx), %xmm6 ++ jmp next ++ movsd -16(%rbx), %xmm7 ++ jmp next ++ movq -16(%rbx), %rax ++ subq $10, %r11 ++ subq $10, %r12 ++ jmp stack_push ++ ++float: ++ addq $10, %r11 ++ addq $10, %r12 ++ addq $8, %rbx ++ jmp *%r12 ++ ++float_regs: ++ movss -8(%rbx), %xmm0 ++ jmp next ++ movss -8(%rbx), %xmm1 ++ jmp next ++ movss -8(%rbx), %xmm2 ++ jmp next ++ movss -8(%rbx), %xmm3 ++ jmp next ++ movss -8(%rbx), %xmm4 ++ jmp next ++ movss -8(%rbx), %xmm5 ++ jmp next ++ movss -8(%rbx), %xmm6 ++ jmp next ++ movss -8(%rbx), %xmm7 ++ jmp next ++ movl -8(%rbx), %eax ++ subq $10, %r11 ++ subq $10, %r12 ++ jmp stack_push ++ ++done: ++ /* Arguments all setup -- ++ call the native method */ ++ ++ callq *-16(%rbp) ++ ++ /* Get back ostack for return value */ ++ movq -8(%rbp), %rcx ++ ++ /* Handle return type */ ++ ++ movzbq (%r14), %rbx ++ cmpq $86, %rbx /* 'V' */ ++ je return ++ cmpq $76, %rbx /* 'L' */ ++ je int_ret ++ cmpq $91, %rbx /* '[' */ ++ je int_ret ++ cmpq $73, %rbx /* 'I' */ ++ je int_ret ++ cmpq $68, %rbx /* 'D' */ ++ je double_ret ++ cmpq $70, %rbx /* 'F' */ ++ je float_ret ++ cmpq $74, %rbx /* 'J' */ ++ je long_ret ++ cmpq $67, %rbx /* 'C' */ ++ je char_ret ++ cmpq $83, %rbx /* 'S' */ ++ je short_ret ++ ++ /* remaining types Z and B */ ++ movsbq %al, %rax ++ ++int_ret: ++ movq %rax, (%rcx) ++ addq $8, %rcx ++ ++return: ++ movq -24(%rbp), %rbx ++ movq -32(%rbp), %r12 ++ movq -40(%rbp), %r14 ++ movq -48(%rbp), %r15 ++ ++ movq %rbp, %rsp ++ popq %rbp ++ ++ movq %rcx, %rax ++ retq ++ ++char_ret: ++ movzwq %ax, %rax ++ jmp int_ret ++ ++short_ret: ++ movswq %ax, %rax ++ jmp int_ret ++ ++long_ret: ++ movq %rax, (%rcx) ++ addq $16, %rcx ++ jmp return ++ ++double_ret: ++ movsd %xmm0, (%rcx) ++ addq $16, %rcx ++ jmp return ++ ++float_ret: ++ movss %xmm0, (%rcx) ++ addq $8, %rcx ++ jmp return ++#endif +diff --git a/src/os/haiku/x86_64/dll_md.c b/src/os/haiku/x86_64/dll_md.c +new file mode 100644 +index 0000000..0454bd8 +--- /dev/null ++++ b/src/os/haiku/x86_64/dll_md.c +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (C) 2008 Robert Lougher . ++ * ++ * This file is part of JamVM. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2, ++ * or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++#include "../../../jam.h" ++ ++#ifndef USE_FFI ++#include ++ ++int nativeExtraArg(MethodBlock *mb) { ++ char *sig = mb->type; ++ int stack_space; ++ int iargs = 0; ++ int fargs = 0; ++ ++ while(*++sig != ')') ++ switch(*sig) { ++ case 'D': ++ case 'F': ++ fargs++; ++ break; ++ ++ default: ++ iargs++; ++ ++ if(*sig == '[') ++ while(*++sig == '['); ++ if(*sig == 'L') ++ while(*++sig != ';'); ++ break; ++ } ++ ++ stack_space = ((iargs > 4 ? iargs - 4 : 0) + ++ (fargs > 8 ? fargs - 8 : 0)) << 3; ++ ++ /* Ensure the stack remains 16 byte aligned. As ++ callJNIMethod pushes an even number of registers ++ the extra space must also be even. */ ++ return (stack_space + 15) & ~15; ++} ++#endif +diff --git a/src/os/haiku/x86_64/init.c b/src/os/haiku/x86_64/init.c +new file mode 100644 +index 0000000..bdc8354 +--- /dev/null ++++ b/src/os/haiku/x86_64/init.c +@@ -0,0 +1,26 @@ ++/* ++ * Copyright (C) 2003, 2004, 2005, 2006, 2007 ++ * Robert Lougher . ++ * ++ * This file is part of JamVM. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2, ++ * or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++void setDoublePrecision() { ++} ++ ++void initialisePlatform() { ++} +-- +1.8.3.4 +