Mike Frysinger <[EMAIL PROTECTED]> writes:
> i was trying to cross-compile glibc-2.4 with gcc-4.1.1 when it failed on me
> while building ioperm.c ... poking around a bit, looks like the same issue
> discussed here:
> http://gcc.gnu.org/ml/gcc/2005-07/msg00371.html
> however, this seems to have stalled ?
>
> the glibc build system appends -Wa,-mev6 to the CFLAGS for ioperm.c, but when
> gcc is run without a -mcpu flag (or with ev4/ev5 specified), the resulting
> asm produced includes '.arch ev4' or '.arch ev5', and then gas aborts with
> the fun errors:
> {standard input}: Assembler messages:
> {standard input}:181: Error: macro requires $at register while noat in effect
> {standard input}:199: Error: macro requires $at register while noat in effect
> {standard input}:235: Error: macro requires $at register while noat in effect
> {standard input}:255: Error: macro requires $at register while noat in effect
>
> and of course, adding -mcpu=ev6 or better to CFLAGS works just peachy
The cheap fix is to have gcc not emit .arch ev4. I was planning on
testing and submitting the following patch for this, but gcc didn't
bootstrap for a few days...
--
Falk
Index: alpha.c
===================================================================
--- alpha.c (revision 115263)
+++ alpha.c (working copy)
@@ -9372,7 +9372,7 @@
fputs ("\t.set nomacro\n", asm_out_file);
if (TARGET_SUPPORT_ARCH | TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX)
{
- const char *arch;
+ const char *arch = NULL;
if (alpha_cpu == PROCESSOR_EV6 || TARGET_FIX || TARGET_CIX)
arch = "ev6";
@@ -9382,10 +9382,9 @@
arch = "ev56";
else if (alpha_cpu == PROCESSOR_EV5)
arch = "ev5";
- else
- arch = "ev4";
- fprintf (asm_out_file, "\t.arch %s\n", arch);
+ if (arch)
+ fprintf (asm_out_file, "\t.arch %s\n", arch);
}
}
#endif