From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13745 invoked by alias); 28 Mar 2002 20:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 13719 invoked by uid 71); 28 Mar 2002 20:56:00 -0000 Date: Thu, 28 Mar 2002 12:56:00 -0000 Message-ID: <20020328205600.13718.qmail@sources.redhat.com> To: vmakarov@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Vladimir Makarov Subject: Re: bootstrap/3589: GCC 3.0-CVS illegal instruction on hppa1.1-proelf Reply-To: Vladimir Makarov X-SW-Source: 2002-03/txt/msg01089.txt.bz2 List-Id: The following reply was made to PR bootstrap/3589; it has been noted by GNATS. From: Vladimir Makarov To: John David Anglin , gcc-patches@gcc.gnu.org Cc: "gcc-gnats@gcc.gnu.org" , "gcc-bugs@gcc.gnu.org" Subject: Re: bootstrap/3589: GCC 3.0-CVS illegal instruction on hppa1.1-proelf Date: Thu, 28 Mar 2002 15:51:52 -0500 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 * 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));}