Path: utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!maddog.llnl.gov!brooks From: brooks@maddog.llnl.gov (Eugene Brooks) Newsgroups: gnu.gcc.bug Subject: (none) Message-ID: <8812240010.AA02293@maddog.llnl.gov> Date: 24 Dec 88 00:10:01 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 254 The following patches are required to get GCC 1.32 to build and install correctly on a SUN3-OS4, Sequent Balance (with support for the -fshared-data flag), or Sequent Symmetry (with support for the -fshared-data flag). I tested the Symmetry mods only as a cross compiler on the SUN3. The context diffs are relative to the virgin GCC 1.32 release from prep.ai.mit.edu. The Makefile patches have been reported previously for other releases, the new items here are the patches for proper support for -fshared-data. For those people who fetched my patches of GCC 1.30 for support of the -mshared flag, use these patches on GCC 1.32 and the -fshared-data flag to obtain the same results. *** /tmp/,RCSt1a02101 Fri Dec 23 15:57:43 1988 --- Makefile Fri Dec 23 15:44:43 1988 *************** *** 434,440 if [ -f cc1 ] ; then $(INSTALL) cc1 $(libdir)/gcc-cc1 ;fi if [ -f cc1plus ] ; then $(INSTALL) cc1plus $(libdir)/gcc-cc1plus ;fi $(INSTALL) gnulib $(libdir)/gcc-gnulib ! if [ -f /usr/bin/ranlib ] ; then (cd $(libdir); ranlib /gcc-gnulib) ;fi $(INSTALL) cpp $(libdir)/gcc-cpp $(INSTALL) gcc $(bindir) -mkdir $(libdir)/gcc-include --- 434,440 ----- if [ -f cc1 ] ; then $(INSTALL) cc1 $(libdir)/gcc-cc1 ;fi if [ -f cc1plus ] ; then $(INSTALL) cc1plus $(libdir)/gcc-cc1plus ;fi $(INSTALL) gnulib $(libdir)/gcc-gnulib ! if [ -f /usr/bin/ranlib ] ; then (cd $(libdir); ranlib gcc-gnulib) ;fi $(INSTALL) cpp $(libdir)/gcc-cpp $(INSTALL) gcc $(bindir) -mkdir $(libdir)/gcc-include *************** *** 441,447 chmod ugo+rx $(libdir)/gcc-include cd $(libdir)/gcc-include; rm -f $(USER_H) cp $(USER_H) $(libdir)/gcc-include ! cp gcc.1 mandir # do make -f ../gcc/Makefile maketest DIR=../gcc # in the intended test directory to make it a suitable test directory. --- 441,447 ----- chmod ugo+rx $(libdir)/gcc-include cd $(libdir)/gcc-include; rm -f $(USER_H) cp $(USER_H) $(libdir)/gcc-include ! cp gcc.1 $(mandir) # do make -f ../gcc/Makefile maketest DIR=../gcc # in the intended test directory to make it a suitable test directory. *** /tmp/,RCSt1a02107 Fri Dec 23 15:57:46 1988 --- ns32k.md Thu Dec 22 21:48:41 1988 *************** *** 1108,1114 } } } - } return \"andd %2,%0\"; }") --- 1108,1113 ----- } } } return \"andd %2,%0\"; }") *** /tmp/,RCSt1a02116 Fri Dec 23 15:57:56 1988 --- tm-ns32k.h Thu Dec 22 21:55:23 1988 *************** *** 471,477 fputc (',', FILE); \ } \ fprintf (FILE, "],%d\n", SIZE); \ ! } else while (*bufp >= 0) \ fprintf (FILE, "\tmovd r%d,tos\n", *bufp++); \ fbufp = used_fregs_buf; \ --- 471,477 ----- fputc (',', FILE); \ } \ fprintf (FILE, "],%d\n", SIZE); \ ! } \ else while (*bufp >= 0) \ fprintf (FILE, "\tmovd r%d,tos\n", *bufp++); \ fbufp = used_fregs_buf; \ *************** *** 1069,1075 /* This is how to align the code that follows an unconditional branch. */ ! #define ASM_OUTPUT_ALIGN_CODE(FILE) fprintf (FILE, "\t.align 4\n") /* This is how to output an assembler line defining a `double' constant. */ --- 1069,1075 ----- /* This is how to align the code that follows an unconditional branch. */ ! #define ASM_OUTPUT_ALIGN_CODE(FILE) \ fprintf (FILE, "\t.align 4\n") /* This is how to output an assembler line defining a `double' constant. */ *** /tmp/,RCSt1a02122 Fri Dec 23 15:58:02 1988 --- tm-seq386.h Fri Dec 23 13:08:23 1988 *************** *** 28,33 #define TARGET_DEFAULT 1 /* Specify predefined symbols in preprocessor. */ #define CPP_PREDEFINES "-Dunix -Di386 -Dsequent" --- 28,52 ----- #define TARGET_DEFAULT 1 + /* Assember pseudo-op for shared data segment. */ + #define SHARED_SECTION_ASM_OP ".shdata" + + /* This says how to output an assembler line + to define a global common symbol in shared memory. */ + + #define ASM_OUTPUT_SHARED_COMMON(FILE, NAME, SIZE, ROUNDED) \ + ( fputs (".shdata\n.comm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (ROUNDED))) + + /* This says how to output an assembler line + to define a local common symbol in shared memory. */ + + #define ASM_OUTPUT_SHARED_LOCAL(FILE, NAME, SIZE, ROUNDED) \ + ( fputs (".shdata\n.lcomm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (ROUNDED))) + /* Specify predefined symbols in preprocessor. */ #define CPP_PREDEFINES "-Dunix -Di386 -Dsequent" *** /tmp/,RCSt1a02128 Fri Dec 23 15:58:03 1988 --- tm-sequent.h Fri Dec 23 13:06:50 1988 *************** *** 36,41 #define TARGET_DEFAULT 1 /* Print subsidiary information on the compiler version in use. */ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (32000, Sequent syntax)"); --- 36,60 ----- #define TARGET_DEFAULT 1 + /* Assember pseudo-op for shared data segment. */ + #define SHARED_SECTION_ASM_OP ".shdata" + + /* This says how to output an assembler line + to define a global common symbol in shared memory. */ + + #define ASM_OUTPUT_SHARED_COMMON(FILE, NAME, SIZE, ROUNDED) \ + ( fputs (".shdata\n.comm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (ROUNDED))) + + /* This says how to output an assembler line + to define a local common symbol in shared memory. */ + + #define ASM_OUTPUT_SHARED_LOCAL(FILE, NAME, SIZE, ROUNDED) \ + ( fputs (".shdata\n.lcomm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (ROUNDED))) + /* Print subsidiary information on the compiler version in use. */ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (32000, Sequent syntax)"); *************** *** 46,52 /* This is how to align the code that follows an unconditional branch. */ #undef ASM_OUTPUT_ALIGN_CODE ! #define ASM_OUTPUT_ALIGN_CODE(FILE) fprintf (FILE, "\t.align 2\n") /* %$ means print the prefix for an immediate operand. --- 65,71 ----- /* This is how to align the code that follows an unconditional branch. */ #undef ASM_OUTPUT_ALIGN_CODE ! #define ASM_OUTPUT_ALIGN_CODE(FILE) \ fprintf (FILE, "\t.align 2\n") /* %$ means print the prefix for an immediate operand. *** /tmp/,RCSt1a02134 Fri Dec 23 15:58:05 1988 --- varasm.c Fri Dec 23 13:02:00 1988 *************** *** 347,353 / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); if (TREE_PUBLIC (decl)) ! ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded); else ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded); return; --- 347,362 ----- / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); if (TREE_PUBLIC (decl)) ! if (flag_shared_data) { ! #ifdef ASM_OUTPUT_SHARED_COMMON ! ASM_OUTPUT_SHARED_COMMON (asm_out_file, name, size, rounded); ! #else ! ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded); ! #endif ! } ! else { ! ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded); ! } else if (flag_shared_data) { #ifdef ASM_OUTPUT_SHARED_LOCAL *************** *** 349,355 if (TREE_PUBLIC (decl)) ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded); else ! ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded); return; } --- 358,373 ----- ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded); } else ! if (flag_shared_data) { ! #ifdef ASM_OUTPUT_SHARED_LOCAL ! ASM_OUTPUT_SHARED_LOCAL (asm_out_file, name, size, rounded); ! #else ! ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded); ! #endif ! } ! else { ! ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded); ! } return; }