mirror of
https://github.com/corda/corda.git
synced 2025-01-17 02:09:50 +00:00
fix cygwin/msys bootimage build
This commit is contained in:
parent
2d2940b13e
commit
a4d4db8eb4
10
makefile
10
makefile
@ -14,7 +14,9 @@ build-platform = \
|
||||
| sed 's/^cygwin.*$$/cygwin/')
|
||||
|
||||
arch = $(build-arch)
|
||||
platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))
|
||||
bootimage-platform = \
|
||||
$(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))
|
||||
platform = $(bootimage-platform)
|
||||
|
||||
ifeq ($(platform),windows)
|
||||
arch = i386
|
||||
@ -273,7 +275,7 @@ bootimage-generator-sources = $(src)/bootimage.cpp
|
||||
bootimage-generator-objects = \
|
||||
$(call cpp-objects,$(bootimage-generator-sources),$(src),$(native-build))
|
||||
bootimage-generator = \
|
||||
$(build)/$(build-platform)-$(build-arch)$(options)/bootimage-generator
|
||||
$(build)/$(bootimage-platform)-$(build-arch)$(options)/bootimage-generator
|
||||
|
||||
bootimage-bin = $(native-build)/bootimage.bin
|
||||
bootimage-object = $(native-build)/bootimage-bin.o
|
||||
@ -489,7 +491,7 @@ $(static-library): $(vm-objects) $(jni-objects) $(vm-heapwalk-objects)
|
||||
$(ranlib) $(@)
|
||||
|
||||
$(bootimage-bin): $(bootimage-generator)
|
||||
$(<) $(classpath-build) > $(@)
|
||||
$(<) $(classpath-build) $(@)
|
||||
|
||||
$(bootimage-object): $(bootimage-bin) $(binaryToMacho)
|
||||
@echo "creating $(@)"
|
||||
@ -524,7 +526,7 @@ make-bootimage-generator:
|
||||
(unset MAKEFLAGS && \
|
||||
make mode=$(mode) \
|
||||
arch=$(build-arch) \
|
||||
platform=$(build-platform) \
|
||||
platform=$(bootimage-platform) \
|
||||
bootimage=$(bootimage) \
|
||||
heapdump=$(heapdump) \
|
||||
bootimage-generator= \
|
||||
|
@ -373,8 +373,8 @@ writeBootImage(Thread* t, FILE* out, BootImage* image, uint8_t* code,
|
||||
int
|
||||
main(int ac, const char** av)
|
||||
{
|
||||
if (ac < 2 or ac > 5) {
|
||||
fprintf(stderr, "usage: %s <classpath> "
|
||||
if (ac < 3 or ac > 6) {
|
||||
fprintf(stderr, "usage: %s <classpath> <output file> "
|
||||
"[<class name> [<method name> [<method spec>]]]\n", av[0]);
|
||||
return -1;
|
||||
}
|
||||
@ -395,9 +395,17 @@ main(int ac, const char** av)
|
||||
enter(t, Thread::ActiveState);
|
||||
enter(t, Thread::IdleState);
|
||||
|
||||
FILE* output = fopen(av[2], "wb");
|
||||
if (output == 0) {
|
||||
fprintf(stderr, "unable to open %s\n", av[2]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
writeBootImage
|
||||
(t, stdout, &image, code, CodeCapacity,
|
||||
(ac > 2 ? av[2] : 0), (ac > 3 ? av[3] : 0), (ac > 4 ? av[4] : 0));
|
||||
(t, output, &image, code, CodeCapacity,
|
||||
(ac > 3 ? av[3] : 0), (ac > 4 ? av[4] : 0), (ac > 5 ? av[5] : 0));
|
||||
|
||||
fclose(output);
|
||||
|
||||
if (t->exception) {
|
||||
printTrace(t, t->exception);
|
||||
|
@ -1325,7 +1325,7 @@ class Thread {
|
||||
#endif // VM_STRESS
|
||||
};
|
||||
|
||||
typedef uint64_t (*FastNativeFunction)(Thread*, object, uintptr_t*);
|
||||
typedef uint64_t (JNICALL *FastNativeFunction)(Thread*, object, uintptr_t*);
|
||||
|
||||
inline object
|
||||
objectClass(Thread*, object o)
|
||||
|
Loading…
Reference in New Issue
Block a user