couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "AndroidOtpPatch" by MattAdams
Date Sun, 30 Jan 2011 04:28:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "AndroidOtpPatch" page has been changed by MattAdams.
http://wiki.apache.org/couchdb/AndroidOtpPatch

--------------------------------------------------

New page:
For use with [[Installing_on_Android]]

{{{
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index fb8d718..4ed25c9 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -352,6 +352,7 @@ EMULATOR_EXECUTABLE = beam$(TF_MARKER).dll
 else
 ifeq ($(CC), agcc)
 EMULATOR_EXECUTABLE = libbeam$(TF_MARKER).so
+EMULATOR_EXECUTABLE_REG = beam$(TF_MARKER)
 else
 EMULATOR_EXECUTABLE = beam$(TF_MARKER)
 endif
@@ -374,7 +375,11 @@ ifeq ($(FLAVOR)-@ERTS_BUILD_SMP_EMU@,smp-no)
 all:
 	@echo '*** Omitted build of emulator with smp support'
 else
+ifeq ($(CC), agcc)
+all: generate erts_lib zlib pcre $(BINDIR)/$(EMULATOR_EXECUTABLE) $(BINDIR)/$(EMULATOR_EXECUTABLE_REG)
$(UNIX_ONLY_BUILDS)
+else
 all: generate erts_lib zlib pcre $(BINDIR)/$(EMULATOR_EXECUTABLE) $(UNIX_ONLY_BUILDS)
+endif
 ifeq ($(OMIT_OMIT_FP),yes)
 	@echo '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'
 	@echo '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'
@@ -453,6 +458,7 @@ release_spec: all
 	$(INSTALL_DATA) $(RELEASE_INCLUDES) $(RELEASE_PATH)/usr/include
 	$(INSTALL_DATA) $(RELEASE_INCLUDES) $(RELSYSDIR)/include
 	$(INSTALL_PROGRAM) $(BINDIR)/$(EMULATOR_EXECUTABLE) $(RELSYSDIR)/bin
+	$(INSTALL_PROGRAM) $(BINDIR)/$(EMULATOR_EXECUTABLE_REG) $(RELSYSDIR)/bin
 ifeq ($(ERLANG_OSTYPE), unix)
 	$(INSTALL_PROGRAM) $(BINDIR)/$(CS_EXECUTABLE) $(RELSYSDIR)/bin
 endif
@@ -1013,6 +1019,13 @@ ifeq ($(CC), agcc)
 $(BINDIR)/$(EMULATOR_EXECUTABLE): $(INIT_OBJS) $(OBJS) $(DEPLIBS)
 	$(PURIFY) $(LD) -o $(BINDIR)/$(EMULATOR_EXECUTABLE) \
 	$(HIPEBEAMLDFLAGS) $(LDFLAGS) $(DEXPORT) $(INIT_OBJS) $(OBJS) $(LIBS) -shared
+
+$(OBJDIR)/beam.o:
+	$(CC) $(CFLAGS) $(INCLUDES) -c beam/beam.c -o $(OBJDIR)/beam.o
+
+$(BINDIR)/$(EMULATOR_EXECUTABLE_REG): $(OBJDIR)/beam.o
+	$(PURIFY) $(LD) -o $(BINDIR)/$(EMULATOR_EXECUTABLE_REG) \
+	$(HIPEBEAMLDFLAGS) $(LDFLAGS) $(DEXPORT) $(OBJDIR)/beam.o $(LIBS) -L$(BINDIR) -lbeam
 else
 $(BINDIR)/$(EMULATOR_EXECUTABLE): $(INIT_OBJS) $(OBJS) $(DEPLIBS)
 	$(PURIFY) $(LD) -o $(BINDIR)/$(EMULATOR_EXECUTABLE) \
diff --git a/erts/emulator/beam/beam.c b/erts/emulator/beam/beam.c
new file mode 100644
index 0000000..167b96e
--- /dev/null
+++ b/erts/emulator/beam/beam.c
@@ -0,0 +1,2 @@
+void erl_start(int argc, char** argv);
+int main(int argc, char** argv) { erl_start(argc, argv); }
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
index 0b39808..5d9658e 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -108,7 +108,7 @@ $(OBJDIR)/%.o: %.c
 
 $(LIBDIR)/crypto_drv.so: $(OBJS)
 	$(INSTALL_DIR) $(LIBDIR) 
-	$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB) $(LIBS) -lbeam
+	$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB) $(LIBS) -lbeam -shared
 
 $(LIBDIR)/crypto_drv.dll: $(OBJS)
 	$(INSTALL_DIR) $(LIBDIR)
diff --git a/otp_build b/otp_build
index ad9d38e..b875b38 100755
--- a/otp_build
+++ b/otp_build
@@ -284,7 +284,7 @@ do_autoconf ()
 	    export WANT_AUTOCONF_VER
 	fi
 	exp_ac_vsn=$EXPECTED_AUTOCONF_VERSION
-	ac_vsn_blob=`autoconf --version`
+	ac_vsn_blob=`autoconf2.59 --version`
 	ac_vsn=`echo x$ac_vsn_blob | sed "s|[^0-9]*\([0-9][^ \t\n]*\).*|\1|"`
 	case "$ac_vsn" in
 	    $exp_ac_vsn)
@@ -327,11 +327,11 @@ do_autoconf ()
 		rm -f "$d"/autom4te.cache/*
 	    }
 	    echo "=== running autoconf in $d"
-	    ( cd "$d" && autoconf ) || exit 1
+	    ( cd "$d" && autoconf2.59 ) || exit 1
 	    chdr=`cat "$file" | sed -n "s|.*\(AC_CONFIG_HEADER\).*|\1|p"`
 	    [ "$chdr" = "AC_CONFIG_HEADER" ] || continue
 	    echo "=== running autoheader in $d"
-	    ( cd "$d" && autoheader ) || exit 1
+	    ( cd "$d" && autoheader2.59 ) || exit 1
 	done
 
 	restore_vars OVERRIDE_TARGET TARGET
}}}

Mime
View raw message