[U-Boot] [PATCH 1/7 V3] GCC4.6: Convert various empty macros to inline functions

Marek Vasut marek.vasut at gmail.com
Mon Oct 3 00:50:52 CEST 2011


On Sunday, October 02, 2011 09:08:52 PM Marek Vasut wrote:
> On Sunday, October 02, 2011 08:36:04 PM Wolfgang Denk wrote:
> > Dear Marek,
> 
> [...]
> 
> > Please fix.
> 
> Hi Wolfgang,
> 
> I have to admit I didn't test ppc boards. But by looking at the TQM pcmcia
> driver, the problem is in the driver itself. That's where I suspect it
> should be fixed.
> 
> Can you share the list of broken boards you detected please ?

Hi,

I'm running the compile tests for powerpc arch right now and I noticed many 
problems of this form:

Configuring for PCIPPC2 board...
interrupts.c: In function 'interrupt_init_cpu':
interrupts.c:38: warning: implicit declaration of function 'GTREGREAD'
interrupts.c:38: error: 'LOW_INTERRUPT_CAUSE_REGISTER' undeclared (first use in 
this function)
interrupts.c:38: error: (Each undeclared identifier is reported only once
interrupts.c:38: error: for each function it appears in.)
interrupts.c:39: error: 'HIGH_INTERRUPT_CAUSE_REGISTER' undeclared (first use in 
this function)
interrupts.c:41: error: 'ETHERNET0_INTERRUPT_CAUSE_REGISTER' undeclared (first 
use in this function)
interrupts.c:42: error: 'ETHERNET1_INTERRUPT_CAUSE_REGISTER' undeclared (first 
use in this function)
interrupts.c:43: error: 'ETHERNET2_INTERRUPT_CAUSE_REGISTER' undeclared (first 
use in this function)
interrupts.c:45: error: 'ETHERNET0_INTERRUPT_MASK_REGISTER' undeclared (first 
use in this function)
interrupts.c:46: error: 'ETHERNET1_INTERRUPT_MASK_REGISTER' undeclared (first 
use in this function)
interrupts.c:47: error: 'ETHERNET2_INTERRUPT_MASK_REGISTER' undeclared (first 
use in this function)
make[1]: *** [interrupts.o] Error 1
make: *** [arch/powerpc/cpu/74xx_7xx/lib74xx_7xx.o] Error 2
make: *** Waiting for unfinished jobs....
powerpc-linux-size: './u-boot': No such file

This seems like noone actually tested compiling those boards with DEBUG enabled 
... ever. Anyway, there seems to be an easy fix, add the following into the 
config file:

#ifndef __ASSEMBLY__
#include <galileo/core.h>
#endif

There is a catch I don't quite understand though, that is, some boards include 
board/Marvell/include/mv_gen_reg.h instead. Which should be included in those 
config files? Is there some way to tell please?

=========================================

As for the tqm-pcmcia problem, removing the #ifdef DEBUG fixed the problem with 
no growth in the u-boot.bin size. Though u-boot (elf binary) grew a bit (tested 
with ELDK4.2, gcc 4.2.2):

With no gcc4.6 patches and unfixed:

Configuring for TQM823L board...
   text    data     bss     dec     hex filename
 260523   13960   25704  300187   4949b ./u-boot

--------------------- SUMMARY ----------------------------
Boards compiled: 1
----------------------------------------------------------
[u-boot]$ ls -la u-boot.bin 
-rwxrwxr-x 1 user user 274568 Oct  3 00:10 u-boot.bin


With gcc4.6 patches and removed #ifdef DEBUG:

Configuring for TQM823L board...
   text    data     bss     dec     hex filename
 260547   13960   25704  300211   494b3 ./u-boot

--------------------- SUMMARY ----------------------------
Boards compiled: 1
----------------------------------------------------------
[u-boot]$ ls -la u-boot.bin 
-rwxrwxr-x 1 user user 274568 Oct  3 00:11 u-boot.bin

Cheers


More information about the U-Boot mailing list