This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386-coff and i386-rtems problem
- To: joel at OARcorp dot com
- Subject: Re: i386-coff and i386-rtems problem
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Tue, 8 Dec 1998 18:24:14 -0800
- Cc: egcs at cygnus dot com
- Newsgroups: cygnus.egcs
- Organization: Cygnus Solutions, CA
In article <Pine.LNX.3.96.981207104712.11167U-100000.cygnus.egcs@oar3remote.oarcorp.com> you write:
>>> _floatdidf
>>> D:\TEMP\ccyxok8Y.s: Assembler messages:
>>> D:\TEMP\ccyxok8Y.s:112: Error: Alignment not a power of 2
I've seen the same problem a few times. I believe there is a bug in the
configure tests that are used for HAVE_GAS_BALIGN_AND_P2ALIGN and
HAVE_GAS_MAX_SKIP_P2ALIGN. Sometimes the configure tests set these
macros correctly, sometimes they don't. If these macros are set incorrectly,
then the error that you reported occurs.
I haven't determined exactly what the problem is yet. However, if you
look at the configure tests, there are 5 cases, but only the last two
check to see if the macros should be set. I think what happens is if
./as exists at the time you configure, then the macros don't get set,
and the gcc build failures. If you do a single-tree build, this won't be
true at the initial configure, but it can be true on a reconfigure, causing
builds to fail after a reconfigure. It can also be true if you build
and install gas before trying to build egcs, and then create a ./as link
by hand.
>+ #undef ASM_OUTPUT_ALIGN
>+ #define ASM_OUTPUT_ALIGN(FILE,LOG) \
>+ if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
This isn't safe in general, since not all i386 assemblers implement align
the same way. I think not even all versions of gas do it the same way.
Hence it is safer to use balign/p2align instead of align if we can.
It is probably safe enough for the i386-coff tm.h file though.
Jim