This is the mail archive of the mailing list for the binutils 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: RFC & patch: Rework MIPS command-line handling

At Mon, 15 Jul 2002 17:54:45 +0000 (UTC), "Thiemo Seufer" wrote:
> There seems to be some misconception about the term 'ABI', maybe
> because the current -mabi=FOO option basically means "select calling
> conventions and register sizes". But an ABI is a much more powerful
> concept than pushing a few compiler options. It defines a platform
> over a variety of hardware which allows to run the same binary code.

I prefer to think of it that there are two competing definitions.  8-)

All of the binary formats in question have a field, EF_MIPS_ARCH,
which can easily be used to determine which ISA is used to compile the

According to your strict definition, only one value of that field is
allowed per ABI.

However, it is much more useful to people creating optimized code to
be able to generate code for specific ISAs, it is almost free from the
POV of checking whether said code is compatible with the current
system(*), and it doesn't really diminish the value of the ABI for
'binary portability' if the portable binaries are compiled with
the options that produce the exact ABI.

If somebody's using, say, mips64-linux, I'd say that they expect
-mabi=X to get them the either 'portable' ABI 'X', or the "-mips3" ISA
version, depending on how they look at things.

If they're using a target like, say, mipsisa64-linux, then they almost
certainly want -mabi=X to get them the ABI 'X' for binary format,
calling conventions, etc., but with use of MIPS64 instructions.

If they're using mipsisa64sb1-linux, they probably expect built-in
support for, say, MIPS-3D, MDMX .ob, and the few SB-1 extensions as
well, regardless of the ABI they choose on the command line.

I'm wondering if the right thing to do here is have flags like
-mstrict-abi=XXX, which also set the ISA type, or -mabi=strict-XXX...

There's use for it: people building e.g. userland binary distributions
would want it, and would encourage users building e.g. RPMs to use it
so they didn't have to remember the exact ISA to use to get things

I think there're a large number of people out there doing embedded
work with systems that use the standard ABIs (E.g. linux), whose lives
would be a fair bit harder if -mabi=X always implied ISA.

(*) Alas, it's almost free to check ISA, but not really possible to
check CPU extensions.

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