@@ -126,6 +126,7 @@ is_darwin=no
is_freebsd=no
is_irix=no
is_linux=no
+is_netbsd=no
is_rtems=no
is_solaris=no
GOOS=unknown
* Bootstrap on Solaris < 11 is broken:
/vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:73:2: error: implicit declaration of function 'madvise' [-Werror=implicit-function-declaration]
The madvise declaration in <sys/mman.h> is only visible if
!(_XOPEN_SOURCE > 420). Since _XOPEN_SOURCE is necessary for other
compilations, I've #undef'ed the symbol at the beginning of this
particular file:
@@ -1,3 +1,7 @@
+/* Defining _XOPEN_SOURCE hides the declaration of madvise() on Solaris <
+ 11 and the MADV_DONTNEED definition on IRIX 6.5. */
+#undef _XOPEN_SOURCE
+
#include <errno.h>
#include <unistd.h>
As the comment states, IRIX has a similar problem, but that could be
fixed in a different way.
* The IRIX libgo build is broken like this:
/vol/gcc/src/hg/trunk/local/libgo/runtime/go-map-delete.c: In function '__go_map_delete':
/vol/gcc/src/hg/trunk/local/libgo/runtime/go-map-delete.c:38:11: error: assignment from incompatible pointer type [-Werror]
/vol/gcc/src/hg/trunk/local/libgo/runtime/go-map-index.c:36:10: error: assignment from incompatible pointer type [-Werror]
On IRIX, size_t and uintptr_t differ, so I'm changing the prototypes
above to match what's in go-type.h.
/vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:70:25: error: unused parameter 'v' [-Werror=unused-parameter]
/vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:70:36: error: unused parameter 'n' [-Werror=unused-parameter]
As mentioned above, MADV_DONTNEED may be unavailable, so the args need
to be marked unused to avoid the warning.
@@ -20,7 +20,7 @@ __go_map_delete (struct __go_map *map, c
const struct __go_map_descriptor *descriptor;
const struct __go_type_descriptor *key_descriptor;
uintptr_t key_offset;
- _Bool (*equalfn) (const void*, const void*, size_t);
+ _Bool (*equalfn) (const void*, const void*, uintptr_t);
size_t key_hash;
size_t key_size;
size_t bucket_index;
@@ -21,7 +21,7 @@ __go_map_rehash (struct __go_map *map)
const struct __go_type_descriptor *key_descriptor;
uintptr_t key_offset;
size_t key_size;
- size_t (*hashfn) (const void *, size_t);
+ uintptr_t (*hashfn) (const void *, uintptr_t);
uintptr_t old_bucket_count;
void **old_buckets;
uintptr_t new_bucket_count;
@@ -80,7 +80,7 @@ __go_map_index (struct __go_map *map, co
const struct __go_map_descriptor *descriptor;
const struct __go_type_descriptor *key_descriptor;
uintptr_t key_offset;
- _Bool (*equalfn) (const void*, const void*, size_t);
+ _Bool (*equalfn) (const void*, const void*, uintptr_t);
size_t key_hash;
size_t key_size;
size_t bucket_index;
@@ -71,7 +71,7 @@ runtime_SysAlloc(uintptr n)
}
void
-runtime_SysUnused(void *v, uintptr n)
+runtime_SysUnused(void *v __attribute__ ((unused)), uintptr n __attribute__ ((unused)))
{
#ifdef MADV_DONTNEED
runtime_madvise(v, n, MADV_DONTNEED);