diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-12 02:16:46 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-12 02:16:46 +0000 |
commit | eb54bdbdf9e10f5c2fac3f4d99779125aef5de80 (patch) | |
tree | 743ad4a7d130f0376f5a69b500437fcf54a84cf5 /gcc/toplev.c | |
parent | cc4ca72396452c816ef47250e516295a7d7b2629 (diff) | |
download | gcc-eb54bdbdf9e10f5c2fac3f4d99779125aef5de80.tar.gz |
PR c++/9393
* doc/invoke.texi (Debugging Options): Document -frandom-seed.
* configure.in: Check for gettimeofday.
* tree.c (flag_random_seed): Define.
(default_flag_random_seed): New.
(append_random_chars): Use flag_random_seed rather than trying
to acquire randomness here.
* tree.h (default_flag_random_seed): Declare.
* toplev.c (display_help): Add -frandom-seed and -fstack-limit-*
descriptions.
(decode_f_option): Handle -frandom-seed.
(print_switch_values): Call default_flag_random_seed.
* flags.h (flag_random_seed): Declare.
* configure: Regenerate.
* config.in: Regenerate.
* config/alpha/t-crtfm: Use -frandom-seed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65500 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 25a6905095a..3af0bd8bfe2 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3842,6 +3842,10 @@ display_help () printf (_(" -fmessage-length=<number> Limits diagnostics messages lengths to <number> characters per line. 0 suppresses line-wrapping\n")); printf (_(" -fdiagnostics-show-location=[once | every-line] Indicates how often source location information should be emitted, as prefix, at the beginning of diagnostics when line-wrapping\n")); printf (_(" -ftls-model=[global-dynamic | local-dynamic | initial-exec | local-exec] Indicates the default thread-local storage code generation model\n")); + printf (_(" -fstack-limit-register=<register> Trap if the stack goes past <register>\n")); + printf (_(" -fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>\n")); + printf (_(" -frandom-seed=<string> Make compile reproducible using <string>\n")); + for (i = ARRAY_SIZE (f_options); i--;) { @@ -4199,6 +4203,10 @@ decode_f_option (arg) } else if (!strcmp (arg, "no-stack-limit")) stack_limit_rtx = NULL_RTX; + else if ((option_value = skip_leading_substring (arg, "random-seed="))) + flag_random_seed = option_value; + else if (!strcmp (arg, "no-random-seed")) + flag_random_seed = NULL; else if (!strcmp (arg, "preprocessed")) /* Recognize this switch but do nothing. This prevents warnings about an unrecognized switch if cpplib has not been linked in. */ @@ -4759,6 +4767,12 @@ print_switch_values (file, pos, max, indent, sep, term) size_t j; char **p; + /* Fill in the -frandom-seed option, if the user didn't pass it, so + that it can be printed below. This helps reproducibility. Of + course, the string may never be used, but we can't tell that at + this point in the compile. */ + default_flag_random_seed (); + /* Print the options as passed. */ pos = print_single_switch (file, pos, max, indent, *indent ? " " : "", term, |