This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386-rtems(i386-coff) failure in egcs-19980628
- To: Robert Lipe <robertl at dgii dot com>
- Subject: Re: i386-rtems(i386-coff) failure in egcs-19980628
- From: Joel Sherrill <joel at OARcorp dot com>
- Date: Tue, 7 Jul 1998 08:41:31 -0500 (CDT)
- cc: egcs at cygnus dot com
On Tue, 7 Jul 1998, Robert Lipe wrote:
> > version: egcs-19980628
> > host: RedHat Linux 5.0 (i686-pc-linux-gnu)
> > target: i386-rtems (based on i386-coff)
> > (NOTE: i386-rtemself has built successfully)
>
> Ha! It's not that I enjoy seeing you specifically suffer, Joel. It's
> just that I welcome somebody else into x86 assembler "what do you mean
> everything isn't linux?" hell. :-)
And everything i386 based is not a PC. :)
> It took me a couple of builds to duplicate this and I think I've spotted
> the offending code. However, I have little idea what the _best_
> solution to this is.
I have a proposal below for i386-coff and i386-rtems.
> > The failure occured while compiling __floatdidf from libgcc2.c. The
> [ munch ]
> > _floatdidf
> > /tmp/ccekaQTS: Assembler messages:
> > /tmp/ccekaQTS:112: Error: Alignment not a power of 2
>
> I was able to duplicate this only with the GNU assembler, but I see
> it fail on OSR5, too. i386-coff suffers from the same failure and
> has slightly fewer config files in the way. Fortunately, OSR5 is
> immune from this, but I couldn't at all point to sco5.h as a model for
> anything.
:(
> For i386-coff, ultimately i386/gas.h gets included. This combination of
> targets won't define ASM_OUTPUT_ALIGN, so we get the default one - the
> one that says the argument to .align is the power of 2 we should pad to,
> not the number of bytes that we should pad to.
>
> This patch is absolutely wrong and should not be committed. It will,
> I believe, get you going again, Joel.
>
> If you'd like to fix only (and specifically) the rtems target, you might
> think about cabbaging the definition and comments for ASM_OUTPUT_ALIGN
> and stuffing them into i386-rtems.h. I think that'll get you going.
> The comment about recent GAS versions sounds like somehing you should
> note.
>
> This is too sticky for me. I don't know the preferred way to make
> a common file like gas.h know which of the conventions are used. I
> suppose it could be autoconfiscated...
>
>
>
> Index: gas.h
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/gas.h,v
> retrieving revision 1.3
> diff -u -p -r1.3 gas.h
> --- gas.h 1998/05/21 19:12:18 1.3
> +++ gas.h 1998/07/07 04:38:49
> @@ -80,7 +80,7 @@ Boston, MA 02111-1307, USA. */
> doubt or guess work, and since this file is used for both a.out and other
> file formats, we use one of them. */
>
> -#if 0 /* ??? However, not every port uses binutils 2.6 yet. */
> +#if 1 /* ??? However, not every port uses binutils 2.6 yet. */
> #undef ASM_OUTPUT_ALIGN
> #define ASM_OUTPUT_ALIGN(FILE,LOG) \
> if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG))
How about this for a proposal?
+ binutils 2.6 is older than anything I have on-line. :)
+ According to gas/Changelog binutils 2.6 was released around Nov 16,
1995.
+ Anyone following the crossgcc instructions for building an i386-coff
toolset should be using a newer binutils since the instructions tell
you to do that.
+ i386-rtems was not even a patch for anything prior to binutils 2.8.
I propose that i386-coff.h be changed to include this version of
ASM_OUTPUT_ALIGN from go32.h:
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG) != 0) fprintf ((FILE), "\t.p2align %d\n", LOG)
I don't know what to do about gas.h. It is heavily used so I would be
scared to change it. But I think i386-coff can use this and I KNOW this
is OK for i386-rtems. Adding it to i386-coff.h fixes both targets.
It would not take much to convince me that gas.h should not support a
binutils that old. If the target is using that old a version, then the
"good" definition should be overridden in a target specific file. But
that is for someone else to decide on. I am comfortable with the idea of
fixing i386-coff.h for embedded users.
Comments welcomed.
--joel