Commit Graph

329 Commits

Author SHA1 Message Date
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
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