From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10084 invoked by alias); 28 Dec 2002 23:45:45 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10070 invoked from network); 28 Dec 2002 23:45:43 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by 209.249.29.67 with SMTP; 28 Dec 2002 23:45:43 -0000 Received: from hiauly1.hia.nrc.ca (localhost [127.0.0.1]) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) with ESMTP id gBSNjOot004461; Sat, 28 Dec 2002 18:45:25 -0500 (EST) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) id gBSNjNJJ004460; Sat, 28 Dec 2002 18:45:23 -0500 (EST) Date: Sat, 28 Dec 2002 19:11:00 -0000 From: John David Anglin To: Matthias Klose Cc: gcc@gcc.gnu.org, parisc-linux@lists.parisc-linux.org, gcc-patches@gcc.gnu.org, John David Anglin Subject: Re: [parisc-linux] [gcc-3_3-branch] bootstrap failure on hppa-linux Message-ID: <20021228234523.GA4443@hiauly1.hia.nrc.ca> References: <15884.48522.342368.76461@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15884.48522.342368.76461@gargle.gargle.HOWL> User-Agent: Mutt/1.4i X-SW-Source: 2002-12/txt/msg01511.txt.bz2 > $ gcc-3.2 -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -fno-common -DHAVE_CONFIG_H -o cc1 c-parse.o c-lang.o c-pretty-print.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-objc-common.o c-dump.o libcpp.a main.o libbackend.a ../libiberty/libiberty.a > /usr/bin/ld: libbackend.a(expr.o)(.text+0x3f744): cannot reach 000002c9_$$dyncall+0, recompile with -ffunction-sections > /usr/bin/ld: libbackend.a(expr.o)(.text+0x3f744): cannot handle R_PARISC_PCREL17F for $$dyncall I confirmed the above problem and installed the enclosed patch on the 3.2 branch to correct it. pa_output_function_prologue is changed so that the total number of code bytes in the translation unit is accumulated on hppa-linux except when doing function sections. This is a backport of a portion of a patch previously installed on the main. Tested on hppa-unknown-linux-gnu. I also checked that the main will bootstrap using gcc-3.2. Dave 2002-12-28 John David Anglin * pa.h (TARGET_SOM): Define if not defined. * som.h (OBJ_SOM): Rename to TARGET_SOM. * pa.c (pa_output_function_prologue): Don't accumulate the total code bytes in the translation unit when using gas, som and not the portable runtime, or when using function sections. Index: config/pa/pa.h =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.h,v retrieving revision 1.138.2.7.2.1 diff -u -3 -p -r1.138.2.7.2.1 pa.h --- config/pa/pa.h 12 Dec 2002 22:37:08 -0000 1.138.2.7.2.1 +++ config/pa/pa.h 27 Dec 2002 22:48:57 -0000 @@ -159,6 +159,11 @@ extern int target_flags; #define TARGET_ELF32 0 #endif +/* Generate code for SOM ABI. */ +#ifndef TARGET_SOM +#define TARGET_SOM 0 +#endif + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } Index: config/pa/som.h =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/pa/som.h,v retrieving revision 1.31.2.1 diff -u -3 -p -r1.31.2.1 som.h --- config/pa/som.h 6 Mar 2002 05:20:29 -0000 1.31.2.1 +++ config/pa/som.h 27 Dec 2002 22:48:57 -0000 @@ -19,7 +19,8 @@ the Free Software Foundation, 59 Temple Boston, MA 02111-1307, USA. */ /* So we can conditionalize small amounts of code in pa.c or pa.md. */ -#define OBJ_SOM +#undef TARGET_SOM +#define TARGET_SOM 1 /* We do not use BINCL stabs in SOM. ??? If it does not hurt, we probably should to avoid useless divergence Index: config/pa/pa.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.c,v retrieving revision 1.148.2.7 diff -u -3 -p -r1.148.2.7 pa.c --- config/pa/pa.c 11 Jul 2002 18:22:02 -0000 1.148.2.7 +++ config/pa/pa.c 27 Dec 2002 22:48:57 -0000 @@ -3078,9 +3078,11 @@ pa_output_function_prologue (file, size) fputs ("\n\t.ENTRY\n", file); - /* If we're using GAS and not using the portable runtime model, then - we don't need to accumulate the total number of code bytes. */ - if (TARGET_GAS && ! TARGET_PORTABLE_RUNTIME) + /* If we're using GAS, SOM and not the portable runtime model, or if + we're using function sections, then we don't need to accumulate the + total number of code bytes in the translation unit. */ + if ((TARGET_GAS && TARGET_SOM && !TARGET_PORTABLE_RUNTIME) + || flag_function_sections) total_code_bytes = 0; else if (INSN_ADDRESSES_SET_P ()) {