This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: [PATCH] work around gcc 3.3.4 ICE on armeb (PR23256)


On Sun, 2005-08-14 at 20:40, Dan Kegel wrote:
> Lennert Buytenhek wrote:
> > Dan, would you consider adding the attached patch to crosstool?
> 
> Can we get another ARM user to confirm the problem
> and that this fixes it?  Then I'd be happy to.
> It'll be in contrib until then.
> 

Anybody suffering from problems on big-endian builds of gcc-3.3 for arm
should check out the patch I recently attached to PR 22528:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22528

This would almost certainly match the evidence reported here (fails on
arm6 but works for arm7tdmi).

R.
> > $ cat crosstool-0.38/patches/gcc-3.3.4/gcc-3.3.4-pr23256.patch
> > On big-endian ARM platforms, gcc 3.3.x miscompiles itself, glibc,
> > and potentially other programs as well, when SUBTARGET_CPU_DEFAULT
> > is TARGET_CPU_arm6.
> > 
> > As gcc 3.3.4 switched the default to TARGET_CPU_arm6, this causes gcc
> > 3.3.[456] to fail to compile itself on armeb.  gcc 3.3.3 and earlier
> > (inadvertently, see PR12527) defaulted to TARGET_CPU_arm7tdmi, which
> > prevents this miscompilation from occuring.
> > 
> > We don't know what exactly goes wrong when TARGET_CPU_arm6 is used, but
> > we do know for sure that it's this hunk that triggers the miscompilation,
> > so let's just change the default back to arm7tdmi so that everyone can
> > be happy once again.
> > 
> > Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
> > 
> > 
> > --- gcc-3.3.4/gcc/config/arm/linux-elf.h.orig	2005-08-14 20:58:17.000000000 +0200
> > +++ gcc-3.3.4/gcc/config/arm/linux-elf.h	2005-08-14 20:58:24.000000000 +0200
> > @@ -48,7 +48,7 @@
> >  #undef  TARGET_DEFAULT
> >  #define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
> >  
> > -#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
> > +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi
> >  
> >  #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
> >  
> > 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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