This is the mail archive of the
mailing list for the GCC project.
Re: Give a better error for PCH with exec-shield-randomize
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Ian Lance Taylor <ian at wasabisystems dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 04 Mar 2004 00:34:26 -0800
- Subject: Re: Give a better error for PCH with exec-shield-randomize
- References: <email@example.com>
It seems like this is a fairly complex and fragile workaround for an
OS bug. Is there some reason you can't just fix your kernel? If not,
the autoconf test for HAVE_MINCORE should be extended to test for the
bug and ignore mincore() if it doesn't work. Perhaps you could just
test for linux in general, since the whole mincore() stuff itself
was written to work around a Solaris "feature".
+ /* A Linux kernel with exec-shield-randomize set to a non-zero
+ value won't work. Give a nice error message for this common
+ case. */
+ FILE *pf;
+ pf = fopen ("/proc/sys/kernel/exec-shield-randomize", "r");
+ if (pf != NULL)
is Linux-specific code in the generic part of the compiler, and should
not be there.
sorry ("had to relocate PCH");
+ abort ();
abort() is certainly wrong here, as Zack pointed out.
- Geoffrey Keating <firstname.lastname@example.org>