[2.4 patch][5/6] asm-i386/smpboot.h: fix gcc 3.4 compilation

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/26/04

  • Next message: Matt Mackall: "[PATCH 4/5] netpoll: increase NAPI budget"
    Date:	Thu, 26 Aug 2004 22:04:44 +0200
    To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
    
    

    I got the following compile error when trying to build 2.4.28-pre2 using
    gcc 3.4:

    <-- snip -->

    ...
    gcc-3.4 -D__KERNEL__
    -I/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/include -Wall
    -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
    -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon
    -fno-unit-at-a-time -nostdinc -iwithprefix include
    -DKBUILD_BASENAME=process -c -o process.o process.c
    In file included from process.c:47:
    /home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/include/asm/smpboot.h:
    In function `target_cpus':
    /home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/include/asm/smpboot.h:133:
    error: label at end of compound statement
    make[1]: *** [process.o] Error 1
    make[1]: Leaving directory `/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/arch/i386/kernel'

    <-- snip -->

    The patch below fixes this issue.

    Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

    --- linux-2.4.28-pre2-full/include/asm-i386/smpboot.h.old 2004-08-26 19:45:06.000000000 +0200
    +++ linux-2.4.28-pre2-full/include/asm-i386/smpboot.h 2004-08-26 19:48:47.000000000 +0200
    @@ -130,8 +130,8 @@
                             cpu = (cpu+1)%smp_num_cpus;
                             return cpu_to_physical_apicid(cpu);
                     default:
    + return cpu_online_map;
             }
    - return cpu_online_map;
     }
     #else
     #define target_cpus() (cpu_online_map)

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Matt Mackall: "[PATCH 4/5] netpoll: increase NAPI budget"

    Relevant Pages

    • [patch] 2.6.4-mm2: ALSA au88x0.c doesnt compile with gcc 2.95
      ... The following compile error with gcc 2.95 comes from Linus' tree: ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • 2.6.0-test5-mm4: wanxl doesnt compile with gcc 2.95
      ... I'm getting the following compile error with gcc 2.95: ... For gcc 2.95, all variable declarations must be at the beginning. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • 2.6.7-mm2: compile error SCHED_SMT + NUMA + gcc 2.95
      ... I'm getting the following compile error in 2.6.7-mm2 with SCHED_SMT=y ... and NUMA=y when using gcc 2.95: ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • -mm: md-merging-fix causes ICE with gcc 2.95
      ... I got the following compile error in 2.6.5-rc2-mm3 using the gcc 2.95 ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • fs/proc/array.c Compile Error
      ... I'm getting a neat compile error in fs/proc/array.c: ... bailing out ... The GCC version I'm using is ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)