diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-14 17:48:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-14 17:48:29 +0000 |
commit | ef42cc92b1d349fd37b6d9b284a412667bd88fa1 (patch) | |
tree | a343f86e75e116ddf7c30f18ad378153c2cd1915 | |
parent | d082524d4138517db0857d48f09a2a9618f4c229 (diff) |
pledge 'stdio rpath wpath cpath", since that is all large program does.
NOTE: cc1 uses brk/sbrk, which was only enabled in pledge a few hours
ago. So this requires a fairly new kernel if compiling monster c++
programs..
-rw-r--r-- | gnu/gcc/gcc/toplev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/gcc/gcc/toplev.c b/gnu/gcc/gcc/toplev.c index 014a6605a36..39b92e10b23 100644 --- a/gnu/gcc/gcc/toplev.c +++ b/gnu/gcc/gcc/toplev.c @@ -2031,6 +2031,9 @@ toplev_main (unsigned int argc, const char **argv) /* Initialization of GCC's environment, and diagnostics. */ general_init (argv[0]); + if (pledge ("stdio rpath wpath cpath", NULL) == -1) + fatal_error ("can't pledge"); + /* Parse the options and do minimal processing; basically just enough to default flags appropriately. */ decode_options (argc, argv); |