[gnu.gcc.bug] patch for hp-ux 7.0

glenne@HPLSLA.HP.COM (Glenn Engel) (12/02/89)

I found the following patches necessary for hp-ux 7.0 on the 9000/300.

The first patch involves setting cpp pre-defines and the second involves
the loader.  ld needs to set __edata,__etext, and __end instead of 
_edata, _etext, and _end.  

Glenn 

*** config/tm-hp9k320.h.orig	Mon Nov 27 11:10:22 1989
--- config/tm-hp9k320.h	Thu Nov 30 20:45:51 1989
***************
*** 101,107
  /* These are the ones defined by HPUX cc, plus mc68000 for uniformity with
     GCC on other 68000 systems.  */
  
! #define CPP_PREDEFINES "-Dhp9000s200 -Dhp9000s300 -DPWB -Dhpux -Dunix"
  
  /* Every structure or union's size must be a multiple of 2 bytes.  */
  

--- 101,107 -----
  /* These are the ones defined by HPUX cc, plus mc68000 for uniformity with
     GCC on other 68000 systems.  */
  
! #define CPP_PREDEFINES "-Dhp9000s200 -Dhp9000s300 -DPWB -Dhpux -Dunix -D__hp9000s300 -D_HPUX_SOURCE"
  
  /* Every structure or union's size must be a multiple of 2 bytes.  */
  

*** ld.c.orig	Fri Dec  1 06:37:31 1989
--- ld.c	Fri Dec  1 16:48:09 1989
***************
*** 4375,4380
  symtab_init ()
  {
  #ifndef nounderscore
    edata_symbol = getsym ("_edata");
    etext_symbol = getsym ("_etext");
    end_symbol = getsym ("_end");

--- 4375,4385 -----
  symtab_init ()
  {
  #ifndef nounderscore
+ # ifdef doubleunderscore
+   edata_symbol = getsym ("__edata");
+   etext_symbol = getsym ("__etext");
+   end_symbol = getsym ("__end");
+ # else
    edata_symbol = getsym ("_edata");
    etext_symbol = getsym ("_etext");
    end_symbol = getsym ("_end");
***************
*** 4378,4383
    edata_symbol = getsym ("_edata");
    etext_symbol = getsym ("_etext");
    end_symbol = getsym ("_end");
  #else
    edata_symbol = getsym ("edata");
    etext_symbol = getsym ("etext");

--- 4383,4389 -----
    edata_symbol = getsym ("_edata");
    etext_symbol = getsym ("_etext");
    end_symbol = getsym ("_end");
+ # endif
  #else
    edata_symbol = getsym ("edata");
    etext_symbol = getsym ("etext");