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]

PATCH FOR Re: Building libstdc++ on Alpha


Bruce, thanks for the quick guide to the exact point of interest.  I
started a bootstrap on alphaev67-dec-osf5.0 and alphaev56-dec-osf4.0A.
After the bootstrap on 4.0A made it past the fixinclude step, I
checked the fixed headers (it is still not to the actual failure
Richard sees).  Sure enough, reg_types.h is broken in exactly the way
which would produce the errors that Richard sees.

Attached is the obvious patch for Richard's build problem on OSF-4.0C
with a note on when it was introduced... (I understand the zeal to
convert all old sed expressions to c_fix format, but perhaps only
those fixes that you can personally bootstrap should be changed. ;-)

In article <3936F176.8F12848B@sco.com>, Bruce Korb <bkorb@sco.COM> writes:

>> Please inspect
>> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0c/2.96/include/reg_types.h
>> on your system closely, I think it has been munged badly by the
>> fixincludes process.

> Here is the relevant include fix.  [...]

This patch, introduced in version 1.71 of fixinc/inclhack.def about
11 days ago:

@@ -1584,23 +1605,33 @@
     test     = " -n \"`grep '} regex_t;' reg_types.h`\"";
     test     = " -z \"`grep __regex_t regex.h`\"";
 
-    sed      = "s/regex_t/__regex_t/g";
-    sed      = "s/regoff_t/__regoff_t/g";
-    sed      = "s/regmatch_t/__regmatch_t/g";
+    c_fix     = format;
+    c_fix_arg = "__%0";
+    c_fix_arg = "reg(ex|off|match)_t[^;]";
+
+    test_text = "`touch inc/sys/lc_core.h`"
+    "typedef struct {\n  int stuff, mo_suff;\n} regex_t;\n"
+    "extern regex_t    re;\n"
+    "extern regoff_t   ro;\n"
+    "extern regmatch_t rm;\n";
 };
 
broke OSF-4.0A and OSF-4.0D (and thus I presume 4.0C) since it now
requires that a ';' is not at the end of the matching expression.
Note that the sed expressions being replaced have no such restriction.

[...patches of fixed headers circa 2.95.1 removed...]

> The fix has correctly trashed the "regex_t", "regoff_t" and "regmatch_t" types.
> "regex.h" should now typdef the correct types into these renamed types.
> Where is that diff?

I didn't include it but that fixed header file looked OK back then as well.

Here is a portion of the fixed reg_types.h on OSF4.0A with mainline CVS
before the patch attached below:

[...]
typedef off_t regoff_t;

typedef struct {                /* substring locations - from regexec() */
        __regoff_t   rm_so;     /* Byte offset from start of string to  */
                                /*   start of substring                 */
        __regoff_t   rm_eo;     /* Byte offset from start of string of  */
                                /*   first character after substring    */
} regmatch_t;
[...]

Notice the inconsistent renaming that was applied.

> I will have to beg for you to do it.
> I will be gone after tomorrow for a couple of weeks.  :-)

I don't have write privs, so if Bruce is gone, who can install obvious
bug fixes in this area?

2000-06-01  Loren J. Rittle  <ljrittle@acm.org>

	* fixinc/inclhack.def (osf_namespace_a): Relax expression to
	  match that used before the conversion to c_fix style.

Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.74
diff -c -p -r1.74 inclhack.def
*** inclhack.def	2000/05/31 14:26:47	1.74
--- inclhack.def	2000/06/02 03:25:35
*************** fix = {
*** 1610,1616 ****
  
      c_fix     = format;
      c_fix_arg = "__%0";
!     c_fix_arg = "reg(ex|off|match)_t[^;]";
  
      test_text = "`touch sys/lc_core.h`"
      "typedef struct {\n  int stuff, mo_suff;\n} regex_t;\n"
--- 1610,1616 ----
  
      c_fix     = format;
      c_fix_arg = "__%0";
!     c_fix_arg = "reg(ex|off|match)_t";
  
      test_text = "`touch sys/lc_core.h`"
      "typedef struct {\n  int stuff, mo_suff;\n} regex_t;\n"

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