This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fixinclude "make check" differences.


Roger Sayle wrote:
> 
> It looks like Adam Nement's recent patch checked in incorrect versions
> of the base files tests/base/sys/time.h and tests/base/stdlib.h whose
> include guards don't match the hackname in inclhack.def.  The fix's
> are named "lynxos_no_warning_in_sys_time_h" and "lynxos_missing_putenv"
> but the base files use "LYNX_" instead if "LYNXOS_".
> 
> Is fixing such mistakes considered obvious?  Do you want to do it or
> shall I?

A)  It looks obvious to me.
B)  The files in tests/base should be the files created in
    by "make check" in tests/res and not hand edited at all.
C)  Adam Nement ought to do it, I won't get to it for a bit, so
    you may wish to do it.
D)  The README should (if it doesnt) say to run "make check"
    before changing anything and complain straight away if there
    is a problem.
E)  After you have finished with your work and committed your
    changes, please run "make check" so somebody else doesn't
    come along and whack your wrist.  :-)

> The reason I ask is that I'm currently struggling with a inclhack.def
> patch to fix the current ia64-unknown-linux-gnu bootstrap failure on
> older versions of RedHat.  Could you take a look at the following and
> point out what it is that I'm doing wrong?  Doh! Ignore the "#if 0" :>
> I was just trying to confirm that it wasn't this change that was
> causing "make check" to fail.

The reason I insert those "#ifdef LYNXOS_MISSING_PUTENV_CHECK" things
in the file is just so it is clear which piece of the puzzle is breaking.
You have dug up clear evidence of a hand edited tests/base file.

Anyway, RE: your fix:

+ #if 0
+ fix = {
+     hackname = linux_ia64_ucontext;
+     files = "sys/ucontext.h";
+     mach = "ia64-*-linux*";
+     select = "\(\(\(char \*\) &\(\(struct sigcontext \*\) 0\)"
+              "->sc_gr[0]\) - \(char \*\) 0\)";
+     c_fix = format;
+     c_fixarg = "__builtin_offsetof \(struct sigcontext, sc_gr[0]\)";
+     test_text = "# define _SC_GR0_OFFSET      \\\n"
+       "\t(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)\n";
+ };
+ #endif

The select clause is set to a "cooked" string.  It will cook away
all those backslashes.  I don't think that is what you want.  Use
the raw/uncooked string quote (viz., the apostrophe).  You'll also
need to escape square brackets, as they are used in RE's to enclose
character sets.

Regards, Bruce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]