glenne%hplsla@HPLABS.HP.COM (Glenn Engel) (11/23/88)
The patches in this file do the following: 1) add comment for CFLAGS in Makefile when making for gas/gdb compatibility. 2) add macro for standard_exec_prefix in gcc.c to allow the gnu format of hp-ux gcc to specify a special directory for gnu format libraries. 3) adds ASM_SPEC in tm for case when USE_GAS is true. 4) fixes function prologue for hp-ux assembler. It emitted a link.w instead of link.l for long frame sizes. 5) fixed xm-hp9k320.h to use new 'xm' names for include files. Thanks in advance for adding these in, -- | Glenn R. Engel | Hewlett-Packard | (206) 335-2066 | glenne%hplsla@hplabs.hp.com *** orig/Makefile Fri Nov 18 09:16:15 1988 --- Makefile Tue Nov 22 08:00:32 1988 *************** *** 38,43 # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700 # For CCLIBFLAGS you might want to specify the switch that # forces only 68000 instructions to be used. # If you are making gcc for the first time, and if you are compiling it with # a non-gcc compiler, and if your system doesn't have a working alloca() in any --- 38,47 ----- # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700 # For CCLIBFLAGS you might want to specify the switch that # forces only 68000 instructions to be used. + # + # If you are using gas on hp-ux you need the following to fake up some + # system file definitions: + # CFLAGS = -g -I../hp-include # If you are making gcc for the first time, and if you are compiling it with # a non-gcc compiler, and if your system doesn't have a working alloca() in any *** orig/gcc.c Thu Nov 17 10:39:33 1988 --- gcc.c Mon Nov 21 22:05:02 1988 *************** *** 366,372 char *standard_exec_prefix = STANDARD_EXEC_PREFIX; char *standard_exec_prefix_1 = "/usr/lib/gcc-"; ! char *standard_startfile_prefix = "/lib/"; char *standard_startfile_prefix_1 = "/usr/lib/"; /* Clear out the vector of arguments (after a command is executed). */ --- 366,376 ----- char *standard_exec_prefix = STANDARD_EXEC_PREFIX; char *standard_exec_prefix_1 = "/usr/lib/gcc-"; ! #ifndef STANDARD_STARTFILE_PREFIX ! #define STANDARD_STARTFILE_PREFIX "/usr/" ! #endif /* !defined STANDARD_STARTFILE_PREFIX */ ! ! char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; char *standard_startfile_prefix_1 = "/usr/lib/"; /* Clear out the vector of arguments (after a command is executed). */ *** orig/tm-hp9k320.h Thu Nov 17 09:06:42 1988 --- tm-hp9k320.h Mon Nov 21 22:09:53 1988 *************** *** 47,52 know which assembler is being used so that the correct `asm' instructions can be used. */ #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__} -D__HPUX_ASM__" #else #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" #endif --- 47,53 ----- know which assembler is being used so that the correct `asm' instructions can be used. */ #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__} -D__HPUX_ASM__" + #define ASM_SPEC "%{m68000:+X}" #else #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" *************** *** 49,54 #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__} -D__HPUX_ASM__" #else #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" #endif /* Names to predefine in the preprocessor for this target machine --- 50,63 ----- #define ASM_SPEC "%{m68000:+X}" #else #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" + + /* -m68000 requires special flags to gas */ + #define ASM_SPEC \ + "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}" + + /* special directory for gnu libs on hp-ux system */ + #ifndef STANDARD_STARTFILE_PREFIX + #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/gnu/" #endif #endif *************** *** 51,56 #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" #endif /* Names to predefine in the preprocessor for this target machine (for non-strict-ANSI programs only). */ --- 60,67 ----- #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/gnu/" #endif + #endif + /* Names to predefine in the preprocessor for this target machine (for non-strict-ANSI programs only). */ *************** *** 107,113 #define TARGET_VERSION printf (" (68k, SGS/hpux syntax)"); - #define ASM_SPEC "%{m68000:+X}" #define REGISTER_NAMES \ {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ --- 118,123 ----- #define TARGET_VERSION printf (" (68k, SGS/hpux syntax)"); #define REGISTER_NAMES \ {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ *************** *** 121,127 extern char call_used_regs[]; \ int fsize = (SIZE); \ if (frame_pointer_needed) \ ! { if (TARGET_68020 || fsize < 0x8000) \ fprintf (FILE, "\tlink.w %%a6,&%d\n", -fsize); \ else \ fprintf (FILE, "\tlink.w %%a6,&0\n\tsub.l &%d,%%sp\n", fsize); } \ --- 131,137 ----- extern char call_used_regs[]; \ int fsize = (SIZE); \ if (frame_pointer_needed) \ ! { if (fsize < 0x8000) \ fprintf (FILE, "\tlink.w %%a6,&%d\n", -fsize); \ else \ if (TARGET_68020) \ *************** *** 123,128 if (frame_pointer_needed) \ { if (TARGET_68020 || fsize < 0x8000) \ fprintf (FILE, "\tlink.w %%a6,&%d\n", -fsize); \ else \ fprintf (FILE, "\tlink.w %%a6,&0\n\tsub.l &%d,%%sp\n", fsize); } \ for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) \ --- 133,141 ----- if (frame_pointer_needed) \ { if (fsize < 0x8000) \ fprintf (FILE, "\tlink.w %%a6,&%d\n", -fsize); \ + else \ + if (TARGET_68020) \ + fprintf (FILE, "\tlink.l %%a6,&%d\n", -fsize); \ else \ fprintf (FILE, "\tlink.w %%a6,&0\n\tsub.l &%d,%%sp\n", fsize); } \ for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) \ *** orig/xm-hp9k320.h Thu May 19 13:50:36 1988 --- xm-hp9k320.h Mon Nov 21 17:16:36 1988 *************** *** 1,6 #define USG ! #include "config-m68k.h" #define bcopy(a,b,c) memcpy (b,a,c) #define bzero(a,b) memset (a,0,b) --- 1,6 ----- #define USG ! #include "xm-m68k.h" #define bcopy(a,b,c) memcpy (b,a,c) #define bzero(a,b) memset (a,0,b)