🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6145

HPPA branch problems

#6145
From: Paul Flinders
Date: Fri, 15 Nov 1996 00:00
49 lines
2288 bytes
I've recently been having problems with the HP linker complaining "target
of unconditional
branch out of range" when building a largeish C++ program

The problem stems from two things. Firstly that I have a large file into
which I place
all of the template instantiations which I need. The resulting object file
can get a little
large.

The second problem is  the fact that the GNU compiler always uses BL for
function calls and not BLE (I note that the HP compiler seems to always use
BLE).
The object file grows sufficiently large that BL can no longer reach
functions in the
same file 

I know that there are other ways of dealing with templates than a large
file full of 
explicit instantiations (the repository hacks, #pragma
interface/implementation)
but I've tried these and they either take much longer to compile or produce
larger
executables than compiling everything with -fno-implicit-templates and
instantiating
the required templates (some 1400 of them!) manually.

Would it be reasonable to modify gcc to always use BLE for function calls.
I
know that it's two instructions longer but would have thought that the
difference in 
performance would not be measureable in practice.

Failing that how about a -mlong-branches for the PA architecture so that it
is
possible to enable this per file. I could then compile the template
instantiation
file alone with this option.

I'd do the latter myself but I really don't understand how the machine
descriptions
work well enough to want to attempt it. Failing making either of the above
changes
a hint as to what I have to change would be appreciated.

Regards

Paul Flinders
Technical Details
Message-ID: <199611151634.QAA15650@mailhost.datasci.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,3e72fc630d8f240,start
X-Google-Attributes: gid113d02,public
From: "Paul Flinders" <ptf@datasci.co.uk>
Subject: HPPA branch problems
Date: 1996/11/15
Message-ID: <199611151634.QAA15650@mailhost.datasci.co.uk>
X-Deja-AN: 196686399
sender: bug-gcc-request@prep.ai.mit.edu
x-priority: 3
content-type: text/plain; charset=ISO-8859-1
x-gateway: relay4.UU.NET from bug-gcc to gnu.gcc.bug; Fri, 15 Nov 1996 12:14:53 EST
x-msmail-priority: Normal
mime-version: 1.0
newsgroups: gnu.gcc.bug
x-mailer: Microsoft Internet Mail 4.70.1155