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: bootstrap/3589: GCC 3.0-CVS illegal instruction on hppa1.1-proelf


Vladimir Makarov wrote:
> 
> John David Anglin wrote:
> >
> > > John David Anglin wrote:
> > > >
> > > > > There is another problem of building toolchains hppa1.1-*-pro* and
> > > > > hppa1.1-*-rtems*.  The reason of problem is in that .comm has syntax
> > > > > different from standard elf one and has no field defining alignment.
> > >
> > >   There is elfos.h after pa/pa.h (please see config.gcc) for toolchains
> > > *rtems* and *pro*.  This file defines default ASM_OUTPUT_ALIGNED_LOCAL
> > > which can not be compiled by gas or hp assembler.  elfos.h is not used
> > > for hppa*64*-*-hpux* so the toolchain had no problem.  But the toolchain
> > > uses pa/elf.h as toolchains *rtems* and *pro* do.  Therefore I defined
> > > the macro exactly as in pa.h (although I thought about usage of .lcomm).
> >
> > Don't we also need to redefine ASM_OUTPUT_ALIGNED_COMMON?  It also
> > appears to use .comm with a different syntax in elfos.h.
> >
> 
> John, thanks for the feedback.  I've missed this part trying to solve
> problems of building hppa1.1-*-pro*.
> I should fix that too.  I'll send the reworked patch tomorrow.
> 
> > > > This patch affects hppa*64*-*-hpux* as well as the toolchains mentioned
> > > > above.  Thus, it should be tested to ensure that there are no regressions.
> > > >
> > >
> > > So there should be no problem with hppa*64*-*-hpux*.
> >
> > There appear to be some formatting problems in the patch as sent.  It
> > didn't apply cleanly when I tried it.
> >
> > I would like comment(s) added to indicate why the macro needs to be
> > redefined.  For example,
> >
> >   /* This define is identical to the one in pa.h.  We need to override the
> >      define in elfos.h on the rtems and pro ports.  */
> >
> > I don't like having to define the same thing in two places.
> 
> I'll try to solve this problem may be by moving it into pa-pro-end.h and
> rtems.h

Here the reworked patch is.

Vlad

2002-03-28  Vladimir Makarov  <vmakarov@redhat.com>

        * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON,
        ASM_OUTPUT_ALIGNED_LOCAL): Redefine them.

Index: gcc/config/pa/pa-pro-end.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-pro-end.h,v
retrieving revision 1.5.24.1
diff -c -p -r1.5.24.1 pa-pro-end.h
*** pa-pro-end.h        2002/03/27 03:54:40     1.5.24.1
--- pa-pro-end.h        2002/03/28 20:42:00
*************** Boston, MA 02111-1307, USA.  */
*** 40,42 ****
--- 40,65 ----
     linker script to pull it in.  */
  #undef STARTFILE_SPEC
  #define STARTFILE_SPEC ""
+ 
+ /* The following two macros are identical to the one in pa.h.  We need
+    to override the macros in elfos.h on the rtems and pro ports.  */
+ 
+ /* This says how to output an assembler line to define a global common
symbol
+    with size SIZE (in bytes) and alignment ALIGN (in bits).  */
+ 
+ #undef ASM_OUTPUT_ALIGNED_COMMON
+ #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGNED)         
\
+ { bss_section ();                                                    
\
+   assemble_name ((FILE), (NAME));                                    
\
+   fputs ("\t.comm ", (FILE));                                        
\
+   fprintf ((FILE), "%d\n", MAX ((SIZE), ((ALIGNED) /
BITS_PER_UNIT)));}
+ 
+ /* This says how to output an assembler line to define a local common
symbol
+    with size SIZE (in bytes) and alignment ALIGN (in bits).  */
+ 
+ #undef ASM_OUTPUT_ALIGNED_LOCAL
+ #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGNED)          
\
+ { bss_section ();                                                    
\
+   fprintf ((FILE), "\t.align %d\n", ((ALIGNED) / BITS_PER_UNIT));    
\
+   assemble_name ((FILE), (NAME));                                    
\
+   fprintf ((FILE), "\n\t.block %d\n", (SIZE));}


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