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]

Gcc copies of system headers.


Description:
Gcc "fixes" some system header files and keeps its own 
copies in the install directory.  This causes serious 
problems when upgrading NetBSD.  In these situations, gcc's 
copies need to be edited by hand.  On NetBSD, these headers 
don't need fixing.

NOTE: This patch includes a change for sys/types.h specific 
to NetBSD and a change to math.h for all targets.  I can't 
exhaustively  test the math.h as I don't have all targets.  
Please take a closer look at that part of the patch.

Test Cases
A test case would involve an os upgrade and reboot.  I think 
this is outside the scope of DejaGnu.

Change Log
Removed unnecessary fixes to NetBSD's sys/types.h and 
math.h.

Bootstrap & test
Target/Host: i386-unknown-netbsdelf5.99.7
gcc tests are identical between the patched and unpatched 
builds.

diff -Naur gcc-4.3.3.orig/fixincludes/inclhack.def gcc-4.3.3/fixincludes/inclhack.def
--- gcc-4.3.3.orig/fixincludes/inclhack.def	2009-01-05 16:02:55.000000000 -0800
+++ gcc-4.3.3/fixincludes/inclhack.def	2009-03-23 23:04:44.000000000 -0700
@@ -1288,6 +1288,7 @@
     /*  If matherr has a prototype already, the header needs no fix.  */
     bypass    = 'matherr.*(struct exception|__MATH_EXCEPTION|[ \t]*__FP_EXCEPTION[ \t]*\*[ \t]*)';
     select    = matherr;
+    bypass    = '__cplusplus';
 
     c_fix     = wrap;
     c_fix_arg = "struct exception;\n";
@@ -1508,6 +1509,7 @@
     c_fix     = gnu_type;
     /* The Solaris 10 headers already define these types correctly.  */
     mach   = '*-*-solaris2.1[0-9]*';
+    mach   = '*-*-netbsd*';
     not_machine = true;
 
     test_text = "typedef long int ptrdiff_t; /* long int */\n"

Attachment: signature.asc
Description: This is a digitally signed message part.


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