diff options
author | 2015-11-14 17:48:28 +0000 | |
---|---|---|
committer | 2015-11-14 17:48:28 +0000 | |
commit | ad8e4a7156d6d9f2fea409d6b8d81df45eb36268 (patch) | |
tree | 4c47d07e91b6b65af42cedd2c380091809d1020b | |
parent | Consolidate usage() checking for -c/-h/-s with other checks. Tweak (diff) | |
download | wireguard-openbsd-ad8e4a7156d6d9f2fea409d6b8d81df45eb36268.tar.xz wireguard-openbsd-ad8e4a7156d6d9f2fea409d6b8d81df45eb36268.zip |
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); |