]> Cypherpunks repositories - gostls13.git/commitdiff
build: define getcallerpc in u.h (fix for Plan 9 build)
authorLucio De Re <lucio.dere@gmail.com>
Mon, 25 Jul 2011 17:45:44 +0000 (13:45 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 25 Jul 2011 17:45:44 +0000 (13:45 -0400)
. By defining getcallerpc(x) as __builtin_return_address(0)
  here, it becomes possible to use the Plan 9 compatible form
  when compiling using GCC.  The alternative is to add conditional
  compilation based on the compiler identity in "cmd/8g/gsubr.c"
  to distinguish between the two cases.

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4800048

include/u.h

index 9ee7493b460a8d8071fcda5127ee5a1b3310295b..44bfcd63b23120d7844fcfed49d6fdb2d2042b09 100644 (file)
@@ -194,6 +194,8 @@ typedef u64int uint64;
 #undef _NEEDUINT
 #undef _NEEDULONG
 
+#define getcallerpc(x) __builtin_return_address(0)
+
 #ifndef SIGBUS
 #define SIGBUS SIGSEGV /* close enough */
 #endif