Commit a99ad737 by Jonathan Wakely Committed by Jonathan Wakely

re PR bootstrap/51006 (bootstrap fails on NetBSD 5.1)

2012-01-02  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR bootstrap/51006
	* enable-execute-stack-mprotect.c (getpagesize): Do not define
	for NetBSD.

From-SVN: r182860
parent e30afafb
2012-01-02 Jonathan Wakely <jwakely.gcc@gmail.com>
PR bootstrap/51006
* enable-execute-stack-mprotect.c (getpagesize): Do not define
for NetBSD.
2012-01-02 Georg-Johann Lay <avr@gjlay.de> 2012-01-02 Georg-Johann Lay <avr@gjlay.de>
PR target/51345 PR target/51345
......
/* Implement __enable_execute_stack using mprotect(2). /* Implement __enable_execute_stack using mprotect(2).
Copyright (C) 2011 Free Software Foundation, Inc. Copyright (C) 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -62,33 +62,6 @@ check_enabling (void) ...@@ -62,33 +62,6 @@ check_enabling (void)
static int need_enable_exec_stack = 1; static int need_enable_exec_stack = 1;
#endif #endif
#if defined __NetBSD__
/* Note that we go out of our way to use namespace-non-invasive calls
here. Unfortunately, there is no libc-internal name for mprotect(). */
#include <sys/sysctl.h>
extern int __sysctl (int *, unsigned int, void *, size_t *, void *, size_t);
static int
getpagesize (void)
{
static int size;
if (size == 0)
{
int mib[2];
size_t len;
mib[0] = CTL_HW;
mib[1] = HW_PAGESIZE;
len = sizeof (size);
(void) __sysctl (mib, 2, &size, &len, NULL, 0);
}
return size;
}
#endif /* __NetBSD__ */
/* Attempt to turn on access permissions for the stack. Unfortunately it /* Attempt to turn on access permissions for the stack. Unfortunately it
is not possible to make this namespace-clean.*/ is not possible to make this namespace-clean.*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment