[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gcc 3.4.2 cpu32 patch
- Date: Wed, 17 Nov 2004 16:25:47 -0800
- From: aaron at frye.com (Aaron J. Grier)
- Subject: gcc 3.4.2 cpu32 patch
On Thu, Nov 18, 2004 at 10:58:21AM +1100, Chris Johns wrote:
> Aaron J. Grier wrote:
> >attached is a patch to gcc 3.4.2 to fix added preprocessor #defines
> >for cpu32 targets. I've included comments for clarity.
> >I've successfully built an rtems-m68k cross-compiler for my 68331
> >target with this patch. (I was using peter barada's gcc 3.4.2 CVS
> >repository, but this patch should apply to the trunk version as
> Is the patch fixing a code gen problem in GCC for the cpu32 ? Just
> wishing clarify the purpose of the patch.
not code generation; just macro definition, as you've discovered.
> If so it maybe a good idea to raise a GCC bug and to attach the patch.
I was hoping it could be put into an "omnibus" patch from either ralf
(on the RTEMS end) or peter (on the m68k/coldfire end).
> I have a patch for RTEMS which fixes __mc68020__ being defined on all
> m68k -m<cpu> options. This breaks RTEMS. I am not sure why this change
> has occured.
it seems to be a result of the newly-introduced TARGET_CPU_CPP_BUILTINS
macro in gcc/config/m68k/m68k.h , which adds a preprocessor definition
for __mc68020__ if TARGET_68020. -mcpu32 defines MASK_68020, which
prior to my patch would cause TARGET_68020 to evaluate to true.
my patch changes TARGET_68020 to be true only if MASK_68020 and
MASK_BITFIELD are set, hence __mc68020__ doesn't get defined, hence
RTEMS can compile.
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron at frye.com
"Note that many bands' backline amps produce levels exceeding OSHA
standards for industrial facilities. Yet this is considered normal
working conditions for musicians. That's showbiz." -- Scott Dorsey