patches/linux/2.6.11.3/170-linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Aug 07 14:05:47 2008 +0000 (2008-08-07)
changeset 766 717efd8b78b4
permissions -rw-r--r--
Update all samples to the latest set of options.
Update some samples to use newer features.
Add patches for the uClibc-20080801 snapshot to be able to build with gcc-4.3.
Add a patch against glibc-2.7 to allow building PPC with latest kernel headers.
Add a patch to gcc to use an alternate unwinding when built against uClibc (after a private explanation/request by Daniel Egger <daniel@eggers-club.de>)

/trunk/patches/glibc/2.7/230-powerpc-private_futex.patch | 15 15 0 0 +
/trunk/patches/uClibc/20080801/300-fix-asm.patch | 175 175 0 0 +++++++++
/trunk/patches/uClibc/20080801/100-ifaddrs.patch | 190 190 0 0 +++++++++
/trunk/patches/uClibc/20080801/200-mips-typeof.patch | 112 112 0 0 ++++++
/trunk/patches/gcc/4.3.1/330-unwind-for-uClibc.patch | 25 25 0 0 +
/trunk/samples/x86_64-unknown-linux-gnu/crosstool.config | 17 10 7 0 +
/trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 14 11 3 0 +
/trunk/samples/x86_64-unknown-linux-uclibc/uClibc-20080801.config | 232 232 0 0 ++++++++++++
/trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 34 21 13 0 +-
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 10 7 3 0 +
/trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/mips-unknown-linux-uclibc/uClibc-20080801.config | 249 249 0 0 ++++++++++++
/trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 38 23 15 0 +-
/trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 10 4 0 +
/trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/i586-geode-linux-uclibc/uClibc-20080801.config | 261 261 0 0 +++++++++++++
/trunk/samples/i586-geode-linux-uclibc/crosstool.config | 32 20 12 0 ++
/trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 12 9 3 0 +
/trunk/samples/mipsel-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 16 10 6 0 +
25 files changed, 1428 insertions(+), 84 deletions(-)
     1 
     2 Fixes
     3 
     4 In file included from arch/ppc/kernel/time.c:68:
     5 arch/ppc/kernel/time.c:92: error: static declaration of 'time_offset' follows non-static declaration
     6 include/linux/timex.h:236: error: previous declaration of 'time_offset' was here
     7 make[1]: *** [arch/ppc/kernel/time.o] Error 1
     8 
     9 when compiling with gcc-4.0
    10 
    11 Taken from
    12 http://user.it.uu.se/~mikpe/linux/patches/2.6/patch-gcc4-fixes-v2-2.6.11
    13 Also removes some obsolete externs that caused problems for Mike
    14 Mike's patch has a bit more stuff in it, but this was enough for me
    15 
    16 
    17 diff -rupN linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c
    18 --- linux-2.6.11/arch/ppc/kernel/time.c	2005-03-02 19:24:14.000000000 +0100
    19 +++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c	2005-03-02 19:36:26.000000000 +0100
    20 @@ -89,7 +89,7 @@ unsigned long tb_to_ns_scale;
    21  
    22  extern unsigned long wall_jiffies;
    23  
    24 -static long time_offset;
    25 +static long ppc_time_offset;
    26  
    27  DEFINE_SPINLOCK(rtc_lock);
    28  
    29 @@ -172,7 +172,7 @@ void timer_interrupt(struct pt_regs * re
    30  		     xtime.tv_sec - last_rtc_update >= 659 &&
    31  		     abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
    32  		     jiffies - wall_jiffies == 1) {
    33 -		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
    34 +		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + ppc_time_offset) == 0)
    35  				last_rtc_update = xtime.tv_sec+1;
    36  			else
    37  				/* Try again one minute later */
    38 @@ -289,7 +289,7 @@ void __init time_init(void)
    39  	unsigned old_stamp, stamp, elapsed;
    40  
    41          if (ppc_md.time_init != NULL)
    42 -                time_offset = ppc_md.time_init();
    43 +                ppc_time_offset = ppc_md.time_init();
    44  
    45  	if (__USE_RTC()) {
    46  		/* 601 processor: dec counts down by 128 every 128ns */
    47 @@ -334,10 +334,10 @@ void __init time_init(void)
    48  	set_dec(tb_ticks_per_jiffy);
    49  
    50  	/* If platform provided a timezone (pmac), we correct the time */
    51 -        if (time_offset) {
    52 -		sys_tz.tz_minuteswest = -time_offset / 60;
    53 +        if (ppc_time_offset) {
    54 +		sys_tz.tz_minuteswest = -ppc_time_offset / 60;
    55  		sys_tz.tz_dsttime = 0;
    56 -		xtime.tv_sec -= time_offset;
    57 +		xtime.tv_sec -= ppc_time_offset;
    58          }
    59          set_normalized_timespec(&wall_to_monotonic,
    60                                  -xtime.tv_sec, -xtime.tv_nsec);
    61 diff -rupN linux-2.6.11/arch/ppc/syslib/open_pic_defs.h linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h
    62 --- linux-2.6.11/arch/ppc/syslib/open_pic_defs.h	2005-03-02 19:24:14.000000000 +0100
    63 +++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h	2005-03-02 19:36:26.000000000 +0100
    64 @@ -172,9 +172,6 @@ struct OpenPIC {
    65      OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
    66  };
    67  
    68 -extern volatile struct OpenPIC __iomem *OpenPIC;
    69 -
    70 -
    71      /*
    72       *  Current Task Priority Register
    73       */
    74 diff -rupN linux-2.6.11/include/asm-ppc/prom.h linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h
    75 --- linux-2.6.11/include/asm-ppc/prom.h	2003-09-28 12:19:57.000000000 +0200
    76 +++ linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h	2005-03-02 19:36:26.000000000 +0100
    77 @@ -13,9 +13,6 @@
    78  typedef void *phandle;
    79  typedef void *ihandle;
    80  
    81 -extern char *prom_display_paths[];
    82 -extern unsigned int prom_num_displays;
    83 -
    84  struct address_range {
    85  	unsigned int space;
    86  	unsigned int address;