[parisc-linux] Compiler switches

John David Anglin dave@hiauly1.hia.nrc.ca
Sun, 2 Feb 2003 00:49:14 -0500 (EST)


> Lamont still saw some function-section failures with Debian gcc 
> 3.2.2-pre7 (20030128)

If this is building C++ code, then the problem is likely in the linker.
Try this:

Index: emultempl/hppaelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/hppaelf.em,v
retrieving revision 1.24
diff -u -3 -p -r1.24 hppaelf.em
--- emultempl/hppaelf.em	30 Nov 2002 08:39:46 -0000	1.24
+++ emultempl/hppaelf.em	2 Feb 2003 05:41:38 -0000
@@ -50,7 +50,7 @@ static int need_laying_out = 0;
 /* Maximum size of a group of input sections that can be handled by
    one stub section.  A value of +/-1 indicates the bfd back-end
    should use a suitable default size.  */
-static bfd_signed_vma group_size = 1;
+static bfd_signed_vma group_size = -1;
 
 /* Stops the linker merging .text sections on a relocatable link,
    and adds millicode library to the list of input files.  */

This reduces the stub pressure by about 50%.  I also installed this
yesterday to fix a related problem:

2003-01-31  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move
	updating of total_code_bytes from prologue to epilogue.

The updating of total_code_bytes in the prologue changed caused the call
sizes to change in a function that spanned the 240000 byte boundary.  This
caused the branch distance of any branch over a call to increase, and
sometimes exceed the range of the branch.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)