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: PATCH: PR target/26189: ia64-hp-hpux11.23: Header file fixup


Here is a new patch to fix PR target/26189.  Rather than change the
extern statement that GCC doesn't like I am just hiding it behind
'#ifdef _KERNEL'.  The type of the variable being declared is only
defined when _KERNEL is set, so only declaring the variable then _KERNEL
is set seems reasonable.  In truth, none of the declarations in this
header make sense when _KERNEL is not set but I wanted to make the
minimal change so that GCC and the HP compiler see the same header file
contents as much as possible.

Re-tested with no regressions, OK for checkin on main line and 4.1?


2006-02-17  Steve Ellcey  <sje@cup.hp.com>

	PR target/26189
	* inclhack.def (hpux_spu_info): New.
	* fixincl.x: Regenerate


Index: inclhack.def
===================================================================
--- inclhack.def	(revision 111202)
+++ inclhack.def	(working copy)
@@ -1681,6 +1681,23 @@ fix = {
 
 
 /*
+ *  Wrap spu_info in ifdef _KERNEL.  GCC cannot handle an array of unknown
+ *  type and mpinfou is only defined when _KERNEL is set.
+ */
+fix = {
+    hackname = hpux_spu_info;
+    mach     = "*-hp-hpux*";
+    files    = ia64/sys/getppdp.h;
+    select   = "^.*extern.*spu_info.*";
+
+    c_fix     = format;
+    c_fix_arg = "#ifdef _KERNEL\n%0\n#endif";
+
+    test_text = "extern union mpinfou spu_info[];";
+};
+
+
+/*
  *  Fix glibc definition of HUGE_VAL in terms of hex floating point constant
  */
 fix = {


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