Commit Graph

661 Commits

Author SHA1 Message Date
Xerxes Rånby
d88a33329a Add a non-versioned SONAME to Avian libjvm.so that
matches the Hotspot Server/Client libjvm.so SONAME,
this allow libjava.so in OpenJDK 7 to find the Avian libjvm.so during ldopen.
2012-09-05 10:29:12 +02:00
Joel Dice
38454ce7d4 fix MSVC build of test JNI library 2012-08-15 17:43:45 -06:00
Joel Dice
b325221579 rename "resource" URL protocol to "avian_vm_resource"
This fixes a problem with JOSM, which attaches its own meaning to the
"resource" protocol.  The new name is less likely to cause such
conflicts.
2012-08-11 19:01:32 -06:00
Joel Dice
021590af05 fix JNI test for openjdk-src build 2012-08-04 18:50:43 -06:00
Joel Dice
2fb2fd9bb0 put test library in same directory as avian executable
This is a workaround for the fact that there's no precise equivalent
to LD_LIBRARY_PATH available on Windows.
2012-08-02 13:00:00 -06:00
Joel Dice
296a1e5bab use so-prefix and so-suffix to generate test library name
This fixes the JNI test for Windows and OS X.
2012-08-02 12:47:48 -06:00
Joel Dice
f03e5e8e55 clean up binary format code
Linux, FreeBSD, and QNX all use ELF, so no need to distinguish between
them when generating object files.  To avoid confusion, I've switch
from using operating system names to using binary format names where
applicable.
2012-08-02 12:39:24 -06:00
Joel Dice
3a1343fb06 add support for FreeBSD on x86_64 2012-08-02 10:49:32 -06:00
Damjan Jovanovic
c1aa0b46b5 add support for FreeBSD 2012-08-02 10:41:41 -06:00
Joel Dice
57e318bbec revert accidentally-committed build-cc/build-cxx change 2012-08-02 10:41:43 -06:00
Joel Dice
67ec092e9a add JNI test to test suite 2012-08-01 16:04:12 +00:00
Joel Dice
4bafdf6286 add QNX ARM support
This is untested so far, since I haven't figured out how to install
the ARM port of QNX on QEMU.
2012-07-17 19:38:39 -06:00
Joel Dice
4237a19b68 add support for QNX on x86_32
All but one test is passing.  The failure is due to the fact that QNX
doesn't (in general) support calling fork(2) from a multithreaded
process.  Thus, we'll need to use spawn instead of fork/exec on QNX,
which I'll attempt in a later commit.

http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
2012-07-17 18:21:17 -06:00
Joel Dice
8706b6ad4a fall back to x86_64-w64-mingw32 compiler for 32-bit Windows builds if i686-w64-mingw32 compiler not found
A multilib-capable x86_64-w64-mingw32 compiler should work just fine,
but since we don't know if it's mutilib or not, we try the
i686-w64-mingw32 version first.
2012-07-06 11:21:53 -06:00
Joel Dice
d21b09215f use i686-w64-mingw32- prefix for ia32 Windows cross compiles
Using e.g. x86_64-w64-mingw32-gcc -m32 doesn't quite work at link time
when using Debian Wheezy's gcc-mingw-w64 package, due to the 32-bit
system libraries not being in the search path, so we use
i686-w64-mingw32-gcc instead.
2012-07-02 10:51:32 -06:00
Joshua Warner
fe1f069309 abort on startup if Thread field offset constants don't match the real runtime values 2012-06-20 13:16:08 -06:00
Joel Dice
165986841e fix endianess bug in LZMA decoding 2012-06-06 12:58:24 -06:00
Joel Dice
7d8def84e0 fix build on old Xcode versions 2012-06-04 09:52:06 -06:00
Joel Dice
9ea6a28383 fix MSVC build regression 2012-06-04 09:51:11 -06:00
Joel Dice
9520b03333 fix OS X build regressions 2012-06-02 18:56:07 -06:00
Joel Dice
d61501453f add support for LZMA on Windows 2012-06-02 15:43:42 -06:00
Joel Dice
f07a8c7ec4 make LZMA encoder by default 2012-06-02 13:23:52 -06:00
Joel Dice
5d9f7b2bc3 add optional LZMA support for compressing embedded JARs, boot images, and shared objects 2012-06-02 09:06:22 -06:00
Joel Dice
bd7ef24734 pass -std=c++11 to Clang for C++ code 2012-06-01 17:57:42 -06:00
Joel Dice
879df617df add use-clang option for building with LLVM Clang instead of GCC
This also fixes several errors and warnings emitted by Clang.
2012-06-01 17:43:42 -06:00
Mike Keesey
a5c9dd6f24 Fixing some issues with runtime annotations within avian.
We were not properly converting dots to slashes internally for package names
and we did not properly handle Method.getAnnotations and
Method.getAnnotation(Class<T>) on methods without any annotations.

Added some tests to cover these cases.
2012-05-22 14:02:51 -06:00
Joel Dice
f0152f1d33 Merge branch 'jdk7' 2012-05-11 16:41:18 -06:00
Joshua Warner
3dcf886bbe allow passing bootimage / codeimage start and end symbol names to the bootimage-generator
The usage statement for the bootimage-generator now looks like this:
build/linux-x86_64-bootimage/bootimage-generator \
  -cp <classpath> \
  -bootimage <bootimage file> \
  -codeimage <codeimage file> \
  [-entry <class name>[.<method name>[<method spec>]]] \
  [-bootimage-symbols <start symbol name>:<end symbol name>] \
  [-codeimage-symbols <start symbol name>:<end symbol name>]
2012-05-10 14:49:59 -06:00
Joel Dice
19de383aae Merge branch 'master' into jdk7
Conflicts:
	makefile
2012-05-04 11:33:16 -06:00
Joshua Warner
8c0ef382f8 write out bootimage directly from the bootimage-generator, eliminating one of the steps in a custom bootimage build 2012-05-03 12:04:34 -06:00
Joshua Warner
1b5f37c9de correctly define the target platform in the case of a bootimage build 2012-05-03 10:13:56 -06:00
Joshua Warner
d76807d9e0 add back pointer-size assignment in makefile for i386 (accidentally removed) 2012-05-03 10:13:56 -06:00
Joshua Warner
132af5f70e fix windows build 2012-05-03 10:13:56 -06:00
Joshua Warner
b742c58055 directly emit codeimage as a object (binaryToObject is statically linked in), as a stepping stone to including extra symbols in said codeimage 2012-05-03 10:13:55 -06:00
Joshua Warner
2fa7fa0e83 correct bootimage dependency chain 2012-05-03 10:13:55 -06:00
Joel Dice
20a0823a74 Merge remote-tracking branch 'origin/master' into jdk7 2012-05-02 11:44:24 -06:00
Joshua Warner
661f6c28a8 refactor binaryToObject to allow more flexibilty (in particular, allowing arbitrary symbols per object) 2012-04-27 12:08:44 -06:00
Joshua Warner
a9ba4782ef improve build for binaryToObject 2012-04-25 09:13:04 -06:00
Joshua Warner
9c308f751c refactor binaryToObject, to better support (eventually) putting symbols for compiled code in objects 2012-04-24 16:17:52 -06:00
Joel Dice
616c08fee9 Merge remote branch 'oss/master' into jdk7
Conflicts:
	makefile
2012-04-10 07:53:00 -06:00
Joel Dice
ba1f8aa68e don't fail build on missing iOS SDK unless actually building for iOS 2012-04-07 17:15:59 -06:00
Joel Dice
8742ae1bde Merge branch 'jdk7' of oss.readytalk.com:/var/local/git/avian into jdk7 2012-04-05 09:51:52 -06:00
Joel Dice
48bb1e4f41 include charsets.jar in openjdk-src build
The other JARs we were including refer to classes in this jar, so we
need to include it as well.
2012-03-27 17:58:52 -06:00
Joel Dice
1be6fe6f15 add -march=i586 to lflags as well as cflags where appropriate
When link time optimization is enabled, we need to remind the compiler
that we're targeting i586 when linking so it can resolve atomic
operations like __sync_bool_compare_and_swap.
2012-03-26 18:09:35 -06:00
Joel Dice
031852daec add -march=i586 to lflags as well as cflags where appropriate
When link time optimization is enabled, we need to remind the compiler
that we're targeting i586 when linking so it can resolve atomic
operations like __sync_bool_compare_and_swap.
2012-03-26 18:02:43 -06:00
Vaughn Dice
5be0edd628 Use latest iOS SDK found on local machine 2012-03-26 11:28:07 -06:00
Vaughn Dice
a10ce99302 Use latest iOS SDK found on local machine 2012-03-26 11:23:31 -06:00
Joel Dice
0167868797 various Windows OpenJDK 7 fixes 2012-03-17 18:47:22 -06:00
Joel Dice
75b5d3df4a fix Windows OpenJDK 7 build 2012-03-17 12:59:22 -06:00
Joel Dice
333b6c59d4 fix non-embedded openjdk build on OS X
The JRE lib dir for OpenJDK 7 on OS X seems to be just "lib", not
e.g. "lib/amd64" by default, so we use that now.  Also, the default
library compatibility version for libjvm.dylib is 0.0.0, but OpenJDK
wants 1.0.0, so we set it explicitly.
2012-03-16 11:01:20 -06:00
Joel Dice
3817bc280e heretofore untested iOS OpenJDK support 2012-03-11 17:46:36 -06:00
Joel Dice
3820fec9d7 fix OS X OpenJDK 7 build 2012-03-11 16:26:46 -06:00
Joel Dice
443097f3bc add support for Xcode 4.3 2012-03-07 08:55:01 -07:00
Matt Weaver
6a20d0289c switching to armv7 2012-03-02 16:00:08 -07:00
Joel Dice
b5fda8ee13 use avian.http.Handler for http(s) URLs, not avian.file.Handler 2012-02-27 13:38:47 -07:00
Joel Dice
574a8ea1e2 Merge branch 'master' into prv-ga-merge 2012-02-27 13:28:06 -07:00
Joel Dice
d09eb3c671 Merge remote branch 'oss/master' 2012-02-22 10:08:14 -07:00
Seth Goings
e849d8f9c9 Updates to .gitignore to get rid of any possibility of checking in binaries in lib/distrib directories, and generalized method of setting location of win32 and win64 libs. 2012-02-20 16:25:37 -07:00
Joel Dice
999e90c332 fix MSVC build 2012-02-16 18:22:11 -07:00
Joshua Warner
a1c5cccd96 undo accidental modification of makefile 2012-02-13 10:04:13 -07:00
Joshua Warner
bbb4529752 implement File.setExecutable(), File.canExecute(), and File.createTempFile() 2012-02-09 14:23:24 -07:00
Joshua Warner
edc768f837 implement File.setExecutable(), File.canExecute(), and File.createTempFile() 2012-02-09 14:04:42 -07:00
Joel Dice
d29513c653 fix Avian_sun_misc_Unsafe_compareAndSwapLong for platforms without atomicCompareAndSwap64
We never define atomicCompareAndSwap64 for ARM or PowerPC, and
apparently only very recent ARM chips support it, so we must fall back
to synchronization-based emulation.
2012-01-15 10:02:36 -07:00
Joel Dice
1c85ea8a6e fix GCC 4.6 LTO build
On Ubuntu 11.10, the optimized build was breaking, apparently because
it was eliminating most of the symbols defined in assembly code
(e.g. vmJump) as unreachable when linking libjvm.so, which left
avian-dynamic unlinkable due to an unresolved symbol.

The solution in this commit is to export makeSystem and makeFinder
from libjvm.so rather than build redundant versions of finder.cpp and
posix.cpp/windows.cpp into avian-dynamic like we've been doing.  This
avoids the whole problem of vmJump reachability and reduces the size
of avian-dynamic at the same time.

This commit also turns off LTO for the avian-dynamic link since we get
odd undefined symbol errors about libc-defined symbols otherwise.
This may merit future investigation, but avian-dynamic is so small and
simple that there's no need to optimize it anyway.
2011-11-19 19:26:25 -07:00
Joel Dice
4026ad208c update makefile to point to iPhoneOS5.0.sdk 2011-11-04 08:25:26 -06:00
Joel Dice
d89a96ae6d use absolute path for test-executable in makefile
This is necessary to avoid crashes on OS X due to
CFBundleGetMainBundle and friends not behaving well otherwise.
2011-09-30 18:46:54 -06:00
Joel Dice
df4626c260 fix Windows cross build 2011-09-30 15:21:12 -06:00
Joel Dice
b063f10ad5 fix Windows build 2011-09-30 14:44:25 -06:00
Joel Dice
21d1a6c883 add __attribute__ ((used)) to EXPORT macro definition
This ensures that exported functions are not stripped when using the
-dead_strip option to the Apple linker.
2011-09-22 16:57:44 -06:00
Joel Dice
c537dcfd34 generate read-only code image in bootimage build
This avoids the requirement of putting the code image in a
section/segment which is both writable and executable, which is good
for security and avoids trouble with systems like iOS which disallow
such things.

The implementation relies on relative addressing such that the offset
of the desired address is fixed as a compile-time constant relative to
the start of the memory area of interest (e.g. the code image, heap
image, or thunk table).  At runtime, the base pointer to the memory
area is retrieved from the thread structure and added to the offset to
compute the final address.  Using the thread pointer allows us to
generate read-only, position-independent code while avoiding the use
of IP-relative addressing, which is not available on all
architectures.
2011-09-20 16:30:30 -06:00
Joel Dice
178dd7af34 Merge remote branch 'origin/master' into ios 2011-09-16 20:46:03 -06:00
Joel Dice
029a9ca507 fix MinGW (non-w64) build
Commit a2dca0dc fixed the MinGW-w64 openjdk-src build but broke the
traditional MinGW build.  This should ensure that both work.
2011-09-16 18:42:18 -06:00
Joel Dice
e505cbe99d more progress towards cross-architecture bootimage builds
This commit fixes a lot of bugs.  All tests are now pass for Linux
x86_64 to Linux i386 cross builds.
2011-08-31 21:18:00 -06:00
Joel Dice
6923c74c4c Merge branch 'ios' of oss:/var/local/git/avian into ios
Conflicts:
	makefile
2011-08-29 19:07:42 -06:00
Joel Dice
5b4f17997f progress towards cross-architecture bootimage builds
This monster commit is the first step towards supporting
cross-architecture bootimage builds.  The challenge is to build a heap
and code image for the target platform where the word size and
endianess may differ from those of the build architecture.  That means
the memory layout of objects may differ due to alignment and size
differences, so we can't just copy objects into the heap image
unchanged; we must copy field by field, resizing values, reversing
endianess and shifting offsets as necessary.

This commit also removes POD (plain old data) type support from the
type generator because it added a lot of complication and little
value.
2011-08-29 19:00:17 -06:00
Joel Dice
9522842b4b support cross builds on OS X to non-Mac targets 2011-08-23 17:04:04 -06:00
Joel Dice
e5a8d5c824 add support for Apple iOS on ARM
Most tests are passing, but not all, so this still needs more work.
2011-08-10 19:21:48 -06:00
Joel Dice
e3662f13a9 update copyright years and increment version number 2011-07-13 08:25:21 -06:00
Joel Dice
a2dca0dc62 fix Cygwin 1.7.x build
Recent versions of Cygwin's GCC no longer support the -mno-cygwin flag
(compilation works, but linking fails).  However, Cygwin now includes
mingw64-i686-gcc, mingw64-x86_64-gcc, and related packages, so we use
those compilers instead.  This has the added benefit that we can build
native x86_64 binaries on Cygwin now.

This will break the build for old Cygwin installs, so it will be
necessary to upgrade Cygwin and install the aforementioned packages to
build Avian going forward.
2011-07-12 22:58:51 +00:00
Joel Dice
50a699a08f Merge remote branch 'origin/B14038_Lion_appshare' into oss-master 2011-06-03 17:35:40 -06:00
Joel Dice
bcc72e8c9d Merge remote branch 'remotes/origin/B14038_Lion_appshare' into oss-master 2011-06-03 14:39:50 -06:00
Matt Klich
698138f649 OSX Lion build changes
Added JavaVM to include path. Also allow dynamically building with
different SDK versions through the OSX_SDK_VERSION and OSX_SDK_SYSROOT
environment variables (these default to the previosly hardcoded value of
10.4 and 10.4u respectively).
2011-06-02 15:15:08 -06:00
Matt Klich
c7c0a45a61 Revert "OSX Lion build changes"
This commit introduced conditional includes which is not the preferred
method. Will do it in the makefile instead.

This reverts commit 7148556979.
2011-06-01 13:56:03 -06:00
Matt Klich
7148556979 OSX Lion build changes 2011-05-26 11:57:30 -06:00
Joel Dice
a17045b02f avoid naming conflicts in OpenJDK build of libavian.a
OpenJDK's compile.c and Avian's compile.cpp were both being compiled
to compile.o, which led to a conflict when building libavian.a.  We
now append "-openjdk" to the object file name for OpenJDK code to
avoid such conflicts.
2011-04-14 16:12:12 -06:00
Joel Dice
1d98d977ce only include security policy jars if they exist 2011-04-10 15:51:17 -06:00
Joel Dice
f617c5c9ef Merge remote branch 'origin/localization' into oss-master 2011-04-09 21:43:44 -06:00
Joel Dice
686cbc3637 implement JVM_ResolveClass
This just reuses code in avian.Classes which was formerly only used in
the Avian classpath build.
2011-03-26 23:24:48 -06:00
Joel Dice
6bd9ec3735 enable link time optimization when using GCC 4.6 or greater 2011-03-26 14:44:08 -06:00
JET
b29e692c31 Merge branch 'master' into localization 2011-03-23 10:24:44 -06:00
Joel Dice
48e569c65a add tail call test 2011-03-15 17:51:32 -06:00
Joel Dice
78790a0f68 fix OpenJDK JCE support
This primarily required additions to classpath-openjdk.cpp to
intercept ZipFile, ZipEntry, and JarFile native methods to consult
embedded encryption policy jars when required.
2011-03-04 16:55:31 -07:00
Joel Dice
7a91074a32 fix OS X cross-arch build regression 2011-03-01 12:20:49 -07:00
Joel Dice
5f50226ae0 enable Linux/PowerPC cross build 2011-02-27 22:54:59 -07:00
Joel Dice
9e1ee7e974 enable Linux PowerPC build 2011-02-26 12:45:22 -07:00
Joel Dice
6014cb93b1 fix Mac OS PowerPC cross build
While we can use Linux's jni.h to cross compile the i386 Mac OS build,
that doesn't work for the PowerPC one.  Now we use the proper
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers/jni.h
from the sysroot instead.
2011-02-22 15:45:46 -07:00
JET
f6e2f4af21 Merge branch 'master' into localization 2011-02-21 17:58:50 -07:00
Joel Dice
19c443254d Merge remote branch 'oss/r0.5' into dev 2011-02-17 17:41:21 -07:00
Joel Dice
1ca8a20731 enable i686-apple-darwin8 cross compile 2011-02-17 17:39:41 -07:00
Joel Dice
c761ac6717 fix Subroutine test for use with OpenJDK build 2011-02-17 14:28:51 -07:00
Joel Dice
2216b22ccb add lib/currency.data to javahome-files on Windows
This file is needed by OpenJDK for both Windows and Posix systems.
2011-02-17 14:11:37 -07:00
Joel Dice
c743140e08 add new subroutine test
This test covers the case where a local stack slot is first used to
store an object reference and later to store a subroutine return
address.  Unfortunately, this confuses the VM's stack mapping code;
I'll be working on a fix for that next.

The new test requires generating bytecode from scratch, since there's
no reliable way to get javac to generate the code we want.  Since we
already had primitive bytecode construction code in Proxy.java, I
factored it out so we can reuse it in Subroutine.java.
2011-02-16 11:41:33 -07:00
Joel Dice
8fdd547922 Merge branch 'oss-master' into dev 2011-02-08 19:08:41 -07:00
Joel Dice
c2cbecbaf0 switch to using mingw-w64 tools for 32-bit Windows cross build
This allows us to use the same tools for 32-bit and 64-bit builds.
2011-02-08 10:37:54 -07:00
jet
5f9a2a1b9b Added -marm flag to ARM cflags, as we don't support Thumb. 2011-02-02 10:02:15 -07:00
Joel Dice
08a6025138 only enable frame pointer on x86(_64) 2011-01-28 17:05:42 -07:00
Joel Dice
f980ceb13e enable use-frame-pointer=true build
Also, include Continuations, Coroutines, and DynamicWind tests in test
suite for continuations=true build.
2011-01-27 21:06:01 -07:00
Joel Dice
220f7760b7 fix MSVC build regressions 2011-01-21 16:14:21 -07:00
Joel Dice
61fe7efd6d specify -mmacosx-version-min=10.4 for 32-bit OS X builds 2010-12-07 09:33:07 -07:00
Joel Dice
a2f14dce6f increment version number to 0.4 2010-12-05 20:20:48 -07:00
Joel Dice
1271678d41 various fixes for embedded resource loading in OpenJDK build 2010-12-05 17:40:50 -07:00
Joel Dice
4a3b5ad1ab fix windows cross openjdk-src build
This mainly involves some makefile ugliness to work around bugs in the
native Windows OpenJDK code involving conflicting static and
not-static declarations which GCC 4.0 and later justifiably reject but
MSVC tolerates.
2010-12-01 20:05:22 -07:00
Joel Dice
af8e043989 fix windows cross build 2010-12-01 16:05:56 -07:00
Joel Dice
84520cde51 Merge remote branch 'origin/master' into openjdk 2010-12-01 14:40:58 -07:00
Joel Dice
8de53aeacc fix Windows openjdk-src build 2010-11-29 17:39:41 -07:00
Joel Dice
0f04865e93 implement -jar option in main.cpp 2010-11-27 14:46:07 -07:00
Joel Dice
e68dfe1e89 various fixes to get Eclipse 3.6 working
* add libnet.so and libnio.so to built-in libraries for openjdk-src build

 * implement sun.misc.Unsafe.park/unpark

 * implement JVM_SetClassSigners/JVM_GetClassSigners

 * etc.
2010-11-27 11:25:02 -07:00
Joel Dice
459f4d5194 fix openjdk-src bootimage build
The main change here is to use a lazily-populated vector to associate
runtime data with classes instead of referencing them directly from
the class which requires updating immutable references in the heap
image.  The other changes employ other strategies to avoid trying to
update immutable references.
2010-11-26 12:41:31 -07:00
Joel Dice
9a676b4f1f fix OS X 10.4 PowerPC cross-build 2010-11-23 15:54:35 -07:00
Joel Dice
a611ccda6f Merge remote branch 'origin/master' into openjdk
Conflicts:
	makefile
	src/compile.cpp
	src/compiler.cpp
	src/type-generator.cpp
2010-11-16 10:18:08 -07:00
Joel Dice
937b7a7d34 Merge remote branch 'origin/arm' 2010-11-16 09:56:35 -07:00
Joel Dice
64601e6f3e name VM-internal classes for heapdump=true builds
This makes heap dumps more useful since these classes are now refered
to by name instead of number.

This commit also adds a couple of utilities for parsing heap dumps:
PrintDump and DumpStats.
2010-11-16 09:31:49 -07:00
Joel Dice
86188cfc04 fix OS X openjdk and openjdk-src builds 2010-11-15 20:28:53 -07:00
Joel Dice
02bdec6f8c fix Cygwin/MSYS openjdk-src builds 2010-11-15 16:27:00 -07:00
Joel Dice
8e23893af0 fix PowerPC builds on OS X 10.5+
The primary change is to ensure we output a Mach-O file of appropriate
endianness when cross-compiling for an opposite-endian architecture.
Earlier versions of XCode's linker accepted files of either
endianness, reguardless of architecture, but later versions don't,
hence the change.
2010-11-14 18:45:37 -07:00
Joel Dice
46be43a0e3 fix MSYS OpenJDK build 2010-11-12 19:04:17 -07:00
Joel Dice
0ca6c3ed53 fix native Windows GCC 3.4 OpenJDK build 2010-11-12 18:29:12 -07:00
Joel Dice
26a59612bb fix native Windows GCC 3.4 build 2010-11-12 16:53:16 -07:00
Joel Dice
110f41b7a0 ARM makefile tweaks 2010-11-09 11:28:58 -07:00
Joel Dice
51ba49def6 enable ARM cross builds 2010-11-08 20:48:08 -07:00
Joel Dice
8ca5e9780e fix OS X build 2010-11-07 21:23:25 -07:00
Joel Dice
33b945c10b fix Windows openjdk (non-openjdk-src) build 2010-11-07 10:08:04 -07:00
Joel Dice
e1b808024a initial support for Windows OpenJDK build
All the tests are passing for openjdk-src builds, but the non-src
openjdk build is crashing and there's trouble loading time zone info
from the embedded java.home directory.
2010-11-06 22:21:19 -06:00
Joel Dice
d0a6096eb0 add support for accessing embedded JARs as if they were directories
This allows OpenJDK to access time zone data which is normally found
under java.home, but which we must embed in the executable itself to
create a self-contained build.  The VM intercepts various file
operations, looking for paths which start with a prefix specified by
the avian.embed.prefix property and redirecting those operations to an
embedded JAR.

For example, if avian.embed.prefix is "/avian-embedded", and code
calls File.exists() with a path of
"/avian-embedded/javahomeJar/foo.txt", the VM looks for a function
named javahomeJar via dlsym, calls the function to find the memory
region containing the embeded JAR, and finally consults the JAR to see
if the file "foo.txt" exists.
2010-11-05 13:18:28 -06:00
Joel Dice
cabad6926f enable standalone OpenJDK builds
As described in readme.txt, a standalone OpenJDK build embeds all
libraries, classes, and other files needed at runtime in the resulting
binary, eliminating dependencies on external resources.
2010-11-04 11:02:09 -06:00
Joel Dice
05ff032f69 pass -march=i586 to gcc when targetting 32-bit x86
Recent versions of GCC will only give us
__sync_bool_compare_and_swap_8 if we target i586 and above,
apparently.
2010-10-23 20:38:42 -06:00
Joel Dice
1ed03b9096 fix build breakage due to makefile syntax confusion
Consider the following makefile construct:

target: dep0
target: dep1 dep2
  command -o $(@) $(^)

With some versions of make, $(^) will expand to "dep1 dep2", but on
others it will expand to "dep0 dep1 dep2".  The commit ensures that we
no longer rely on the former behavior (nor the latter, for that matter).
2010-10-22 18:20:19 -06:00
JET
45e6cd5a60 The localization properties are now functional. Only 16 languages are currently reported on Windows. 2010-10-05 17:53:17 -06:00
Joel Dice
efd3ccb04f set java.home to path of JRE, not JDK 2010-09-20 18:38:38 -06:00
Joel Dice
17f495eb27 rework OpenJDK build to derive classpath and library path from environment
We now consult the JAVA_HOME environment variable to determine where
to find the system library JARs and SOs.  Ultimately, we'll want to
support self-contained build, but this allows Avian to behave like a
conventional libjvm.so.
2010-09-20 17:31:23 -06:00
Joel Dice
20990950bb build everything (including classes) in options-specific directory
Previously, we only built platform specific code in an
options-specific directory (e.g. build/linux-x86_64-debug), but built
the Java classes in the shared, top-level build directory.  This
minimized duplication when building with different sets of options,
but now that we're supporting the option of selecting a third-party
class library, we need to put the classes in the options-specific
directory as well.
2010-09-17 16:03:37 -06:00
Joel Dice
d0d53e2e10 fix custom-classloader-related concurrency problems and other bugs
The main changes in this commit ensure that we don't hold the global
class lock when doing class resolution using application-defined
classloaders.  Such classloaders may do their own locking (in fact,
it's almost certain), making deadlock likely when mixed with VM-level
locking in various orders.

Other changes include a fix to avoid overflow when waiting for
extremely long intervals and a GC root stack mapping bug.
2010-09-16 20:49:02 -06:00
Joel Dice
f485016637 implement more JVM_* methods and avoid duplicate array class loading 2010-09-14 18:52:57 -06:00
Joel Dice
d819a75f36 more work towards OpenJDK classpath support
The biggest change in this commit is to split the system classloader
into two: one for boot classes (e.g. java.lang.*) and another for
application classes.  This is necessary to make OpenJDK's security
checks happy.

The rest of the changes include bugfixes and additional JVM method
implementations in classpath-openjdk.cpp.
2010-09-14 10:49:41 -06:00
Joel Dice
b62d07996f avoid including path name of libjvm.so in avian-dynamic 2010-09-10 17:44:53 -06:00
Joel Dice
cddea7187d preliminary support for using OpenJDK's class library
Whereas the GNU Classpath port used the strategy of patching Classpath
with core classes from Avian so as to minimize changes to the VM, this
port uses the opposite strategy: abstract and isolate
classpath-specific features in the VM similar to how we abstract away
platform-specific features in system.h.  This allows us to use an
unmodified copy of OpenJDK's class library, including its core classes
and augmented by a few VM-specific classes in the "avian" package.
2010-09-10 15:05:29 -06:00
Matt Klich
686f1ba983 Revert "win32 i386 build should use mingw64 if available"
This reverts commit 74e282a3d3.
2010-06-09 16:03:48 -06:00
Matt Klich
74e282a3d3 win32 i386 build should use mingw64 if available 2010-05-17 12:36:39 -06:00
Matt Klich
62c741d969 Specify -m flag on windows x86_64 gcc/g++ compilers. 2010-05-13 17:01:55 -06:00
JET
3aac50555b fixed ARM interpreted-mode regression 2010-04-20 15:51:35 -06:00
Joel Dice
e5fad03632 fix MSVC build rot 2010-04-15 11:11:10 -06:00
Hudson Build Application account
48cc14f8ed fixed linux build because darwin fix broke it 2010-02-05 17:15:12 -07:00
Matt Klich
d4cae8f15e Fixed darwin build. 2010-02-05 16:40:48 -07:00
Matt Klich
9d5e0bb154 Updated to always specify bitness of target. cc and cxx will always have -m32 or -m64 appended based on the arch that is being built. 2010-02-04 11:15:16 -07:00
Joel Dice
67cdac3a36 tweak MSVC compiler flags
We now use -O2 for the "fast" build and always pass -debug to the linker so we get a PDB file.
2009-12-14 08:43:07 -07:00
Joel Dice
2b4361c060 fix GNU Classpath build 2009-12-05 19:40:46 -07:00
Joel Dice
028fd42f5e detect and prohibit unsupported bootimage cross-builds in makefile 2009-12-03 10:47:50 -07:00
Joel Dice
2bb5ccebd3 update version number 2009-12-02 19:09:28 -07:00
Eric Scharff
398f861768 Support 64-bit Mac builds 2009-12-01 14:24:33 -07:00
Joel Dice
f75868b394 don't specify -march=i486 on Darwin because a later generation is assumed by default 2009-11-20 11:40:55 -07:00
Joel Dice
15eada93ed implement atomicCompareAndSwap on x86_32 for GCC versions prior to 4.1 and for MSVC 2009-11-20 10:40:01 -07:00
Joel Dice
07f40a07e1 specify -march=i486 for x86_32 to support __sync_bool_compare_and_swap 2009-11-19 18:51:43 -07:00
Joel Dice
ef9c1ee32c specify -arch explicitly to compiler and liner on OS X
On 10.6 the compiler generates x86_64 code by default, even though uname -m reports "i386", so we have to be explicit
2009-11-03 16:07:13 -07:00
Joel Dice
e825da60aa update continuation constants to reflect new field offsets 2009-10-30 00:45:46 +00:00
jet
d901653979 Merge branch 'master' into wip
Conflicts:

	src/compile.cpp
2009-10-29 14:23:20 -06:00
jet
e00fc5d91a ARM port work 2009-10-29 10:12:30 -06:00
Joel Dice
a0952b89ed use new x86_64-w64 tool prefix for 64-bit Windows build 2009-10-20 13:39:09 -06:00
Joel Dice
cec6444911 fix bootimage build for case where the JIT code area is too far from the AOT code area to do immediate-offset jumps between them 2009-10-17 18:18:03 -06:00
Joel Dice
7b0378c180 support darwin/x86_64 2009-10-14 10:01:37 -06:00
Joel Dice
0ae02511c6 remove unused definition from makefile 2009-10-13 19:40:39 -06:00
Joel Dice
c3824b0108 specify segment __RWX in bootimage-lflags on Darwin to match new name used in binaryToObject 2009-10-13 19:14:03 -06:00
Joel Dice
ef4a8430ad add binaryToObject utility
We use this utility instead of objcopy to embed data into object files
because it offers more control over e.g. section alignment, which is
important for bootimage builds.
2009-10-13 19:00:16 -06:00
Joel Dice
9fcdfaf7ff implement binaryToElf utility and use it instead of objcopy on Linux
This is necessary because objcopy does not currently allow us to
specify the alignment requirement for the .boot section used to store
the boot image for AOT builds.  This may be a problem for Windows as
well, in which case we'll need to add a binaryToPE utility.
2009-10-11 16:09:23 -06:00
jet
bf84d91bad Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-17 14:07:16 -06:00
Joel Dice
a2a33c259e fix test class build when boot classes change 2009-09-17 11:50:35 -06:00
jet
7733433483 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-14 14:30:33 -06:00
Joel Dice
49d113f43f fix parallel bootimage build 2009-09-05 18:40:37 -06:00
Joel Dice
44ae6a02c2 fix parallel (make -jN) build 2009-09-05 16:04:43 -06:00
Joel Dice
8956b98604 speed up build (especially on Windows) by avoiding redundant shell command execution in makefile 2009-09-05 15:21:45 -06:00
jet
68355b17cd Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-03 14:12:44 -06:00
Joel Dice
9550eca866 uncomment MAKEFLAGS definition in makefile 2009-09-01 12:15:19 -06:00
jet
abd4f6aeef Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-01 09:05:54 -06:00
Joel Dice
9c52fb434c add manifest to executables and DLLs when building with MSVC 2009-09-01 08:42:33 -06:00
jet
ae377e8fc6 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-27 15:32:11 -06:00
Joel Dice
4df81911fe fix OSX build regression 2009-08-27 09:30:34 -06:00
Joel Dice
ca271e5ab9 specify name of pdb file when compiling with MSVC 2009-08-26 18:38:47 -06:00
Joel Dice
1a0eef7e2d add support for building with MSVC on Windows 2009-08-26 18:26:44 -06:00
Joel Dice
3b30dccaac strip binaries if and only if optimizing 2009-08-24 16:38:00 -06:00
jet
1528a9dddf Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-18 15:17:34 -06:00
jet
bf75e73aa9 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-13 09:57:40 -06:00
Joel Dice
d983e8883c use our version of SoftReference when using GNU Classpath 2009-08-13 09:18:01 -06:00
Joel Dice
001000364d add classloader parameter to functions which may directly or indirectly load classes; include methods inherited from interfaces (but not explicitly declared) in method tables and virtual tables of abstract classes 2009-08-10 07:56:16 -06:00
jet
0be90bc769 added ARM modifications to makefile 2009-08-06 13:25:20 -06:00
Joel Dice
3e0c0c8116 revert recent accidental makefile changes 2009-08-06 12:10:44 -06:00
jet
1ffe46a545 added ARM interpreted mode supported 2009-08-06 11:52:36 -06:00
Joel Dice
b6e49d8a4c refine gnu-overrides definition in makefile 2009-08-04 18:31:33 -06:00
Joel Dice
27d863790c Merge branch 'win64' into gnu
Conflicts:

	makefile
	src/compile-x86.S
	src/x86.S
	src/x86.cpp
2009-07-25 20:48:36 -06:00
Joel Dice
e72ff8db0b Merge branch 'master' into gnu
Conflicts:

	src/compile.cpp
2009-07-11 12:11:59 -06:00
Joel Dice
ab5ba9c954 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-07-10 09:57:29 -06:00
jent
8335dc4297 Now using the CoreServices instead of the Carbon framework....this
allows for cocoa and future compatability
2009-07-02 03:30:05 -06:00
jent
3367ac88e3 Added in code to support os.version for Windows/Linux/OSX
The make file had to be modified to include the carbon framework in OSX
2009-07-01 09:13:01 -06:00
Josh warner
a80d30b4ce added windows-x86_64 build target 2009-06-11 09:36:53 -06:00
Joel Dice
f239424930 implement NewDirectByteBuffer etc. properly when building against Classpath; call JNI_OnLoad if found in newly-loaded libraries 2009-06-10 18:15:00 -06:00
Joel Dice
20ea82ec2e various tweaks for Classpath compatibility 2009-06-06 20:32:44 -06:00
Joel Dice
402fef9ae8 include native Classpath code in dynamic library
Note that this requires building Classpath with -fPIC on platforms where
it is not the default.
2009-06-06 14:25:05 -06:00
Joel Dice
6efeee49f8 include native Classpath code in libavian.a and the avian executable 2009-06-06 14:18:33 -06:00
Joel Dice
c14ae4d2f7 fix rebuild when using GNU Classpath 2009-06-04 17:54:06 -06:00
Joel Dice
0857f53651 more progress on GNU Classpath compatibility 2009-06-04 17:21:42 -06:00
Joel Dice
98be5c509e more progress towards GNU Classpath compatibility 2009-06-03 16:17:55 -06:00
Joel Dice
0f6dbe35a7 add build option for using GNU Classpath 2009-06-02 18:55:49 -06:00
Joel Dice
a4d4db8eb4 fix cygwin/msys bootimage build 2009-06-01 12:12:29 -06:00
Joel Dice
b5cb1692fb document avian.Continuations 2009-05-29 18:32:16 -06:00
Joel Dice
ca4e62cdb7 pass -DAVIAN_CONTINUATIONS to assembler when continuations enabled 2009-05-28 18:51:53 -06:00
Joel Dice
4eeabbeec3 point javac to the right output directory when building extra tests 2009-05-25 23:27:47 -06:00
Joel Dice
31eb75a736 support tail calls and continuations as build options 2009-05-25 23:27:10 -06:00
Joel Dice
e35047b056 build but don't run extra tests in makefile 2009-05-18 09:17:09 -06:00
Joel Dice
6dc6f01359 move extra tests (not run as part of "make test") into "extra" package 2009-05-16 02:01:32 -06:00
Joel Dice
d11195165f add tarball target to makefile 2009-04-11 11:54:43 -06:00
Joel Dice
7311fdab02 fix bootimage build 2009-03-15 13:47:07 -06:00
Joel Dice
c485613e26 update version to 0.2 in makefile 2009-03-15 12:01:56 -06:00
Joel Dice
9abc25e134 refine build directory naming system to avoid needing to 'make clean' upon changing build parameters 2009-03-14 15:16:05 -06:00
Joel Dice
6c271ac994 fix powerpc bootimage build 2009-03-09 18:52:09 -06:00
Joel Dice
661b49ea92 Merge branch 'master' into powerpc 2009-03-07 16:41:17 -07:00
Joel Dice
abe6ada0c2 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-03-07 16:40:56 -07:00
Joel Dice
ea4764c924 Merge branch 'master' into powerpc 2009-03-07 16:40:23 -07:00
Joel Dice
8c1c861a58 search ../win32/include before $JAVA_HOME/include for windows builds, since we don't want to accidentally use the jni_md.h for the host system 2009-02-22 17:04:14 -07:00
Joel Dice
ba4e2a6582 rename compile.S to compile-x86.S and add compile-powerpc.S 2009-02-16 08:21:12 -07:00
Joel Dice
de6388a719 fix powerpc/interpret build 2009-02-15 12:51:39 -07:00
Joel Dice
bec13838c1 Merge branch 'powerpc' of oss.readytalk.com:/var/local/git/avian 2009-02-15 12:34:01 -07:00
Joel Dice
71ccac1ef7 default to specified build mode when building the bootimage generator instead of hard-coding it to 'fast' 2009-02-14 13:25:07 -07:00
U-JOELDICEXPVM\Joel Dice
ec5c64d472 fix Cygwin build 2009-02-13 17:03:46 -07:00
Joel Dice
9b0d6854ec fix merge conflicts 2009-02-09 16:22:51 -07:00
Joel Dice
a1ec71423e Merge branch 'master' into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/binaryToMacho.cpp
	src/compile.cpp
	src/compiler.cpp
	src/x86.cpp
2009-02-09 16:22:01 -07:00
Joel Dice
368c804bb7 bootimage-object should depend on binaryToMacho 2008-12-18 20:10:25 -07:00
Joel Dice
2622773eb4 support bootimage build on OS X 2008-12-18 19:52:03 -07:00
Joel Dice
c479bccdb4 support cross-platform bootimage build (as long as the build arch matches the target arch 2008-12-04 17:24:38 -07:00
Joel Dice
7d68c9b0a5 Merge branch 'bootimage' of oss.readytalk.com:/var/local/git/avian
Conflicts:

	src/heapdump.cpp
2008-12-04 14:29:17 -07:00
Rich Scott
db3434001f Use mingw32 'strip' when compiling for Windows.
This fixes the error when using /usr/bin/strip on
Ubuntu 8.10 when it believes the target file is of
an "ambiguous format".
2008-12-03 13:12:49 -07:00
Joel Dice
4ec853d1bc include heapwalk.o in libavian.a if bootimage=true 2008-12-02 19:37:16 -07:00
Joel Dice
4a1dd3a8f7 specify writable and executable section for boot image 2008-12-01 19:35:52 -07:00
Joel Dice
0ec5ad3701 update makefile to optionally build and use a boot image; various bugfixes 2008-11-29 16:08:14 -07:00
Joel Dice
61ecb56e21 Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-11-25 16:19:21 -07:00
Joel Dice
6500f1eff6 initial work to support boot image creation and use 2008-11-21 16:20:35 -07:00
Joel Dice
15ea90cd0c specify -fno-omit-frame-pointer to ease debugging and profiling 2008-11-19 18:10:29 -07:00
Joel Dice
4dd1d1eec8 add Subroutine test to cover jsr and ret instructions 2008-11-12 10:07:30 -07:00
Joel Dice
c80eb51c17 Merge branch 'master' into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
	src/finder.cpp
2008-11-11 08:21:48 -07:00
Joel Dice
6f1d02dae7 remove the libstdc++ dependency once and for all
The trick is to make all destructors non-virtual.  This is safe because
we never use the delete operator, which is the only case where virtual
destructors are relevant.  This is a better solution than implementing
our own delete operator, because we want libraries loaded at runtime to
use the libstdc++ version, not ours.
2008-10-28 15:40:50 -06:00
Joel Dice
708d2f1c0c compile assembly files using different flags than C++ files
This is intended to fix the build error described here:

  http://groups.google.com/group/avian/msg/38b6619d6d8cac68
2008-10-23 16:55:39 -06:00
Joel Dice
6a5116e7a7 implement primitive heap dump facility for memory profiling, accessible via Runtime.dumpHeap
The proper way to do this is to implement a subset of JVMTI, but this
will do the job for now.
2008-10-21 17:38:20 -06:00
Joel Dice
f38a55cbb2 make linking against libstdc++ the default, overrideable via use-libstdcpp make parameter 2008-10-13 16:31:59 -06:00