Fredrik Fornwall
9 years ago
3 changed files with 50 additions and 3 deletions
@ -0,0 +1,11 @@ |
|||
diff -u -r ../go/src/runtime/cgo/cgo.go ./src/runtime/cgo/cgo.go
|
|||
--- ../go/src/runtime/cgo/cgo.go 2015-08-06 00:36:35.000000000 -0400
|
|||
+++ ./src/runtime/cgo/cgo.go 2015-08-16 16:03:29.614948543 -0400
|
|||
@@ -16,7 +16,6 @@
|
|||
#cgo darwin,arm64 LDFLAGS: -framework CoreFoundation |
|||
#cgo dragonfly LDFLAGS: -lpthread |
|||
#cgo freebsd LDFLAGS: -lpthread |
|||
-#cgo android LDFLAGS: -llog
|
|||
#cgo !android,linux LDFLAGS: -lpthread |
|||
#cgo netbsd LDFLAGS: -lpthread |
|||
#cgo openbsd LDFLAGS: -lpthread |
@ -0,0 +1,25 @@ |
|||
diff -u -r ../go/src/runtime/cgo/gcc_android.c ./src/runtime/cgo/gcc_android.c
|
|||
--- ../go/src/runtime/cgo/gcc_android.c 2015-08-06 00:36:35.000000000 -0400
|
|||
+++ ./src/runtime/cgo/gcc_android.c 2015-08-16 16:08:05.346940583 -0400
|
|||
@@ -11,21 +11,11 @@
|
|||
{ |
|||
va_list ap; |
|||
|
|||
- // Write to both stderr and logcat.
|
|||
- //
|
|||
- // When running from an .apk, /dev/stderr and /dev/stdout
|
|||
- // redirect to /dev/null. And when running a test binary
|
|||
- // via adb shell, it's easy to miss logcat.
|
|||
-
|
|||
fprintf(stderr, "runtime/cgo: "); |
|||
va_start(ap, format); |
|||
vfprintf(stderr, format, ap); |
|||
va_end(ap); |
|||
fprintf(stderr, "\n"); |
|||
|
|||
- va_start(ap, format);
|
|||
- __android_log_vprint(ANDROID_LOG_FATAL, "runtime/cgo", format, ap);
|
|||
- va_end(ap);
|
|||
-
|
|||
abort(); |
|||
} |
Loading…
Reference in new issue