* cmpxchg() in recent kernels @ 2010-10-09 9:32 Alex Sverdlin 2010-10-15 4:26 ` Aras Vaichas 0 siblings, 1 reply; 12+ messages in thread From: Alex Sverdlin @ 2010-10-09 9:32 UTC (permalink / raw) To: linux-arm-kernel Hello! I've probably missed something, but how to compile recent kernels on ARM? I've been using GCC 3.4.3 from Cirrus for my EP9302 boards up to 2.6.35.4 But 2.6.36-rc and upper won't compile anymore. The problem is appearing in multiplatform code of cmpxchg() function. First in kernel/pid.c (2.6.36-rc4 - 2.6.36-rc6) Then 4 times in 2.6.36-rc7-next... atomic_cmpxchg compiles fine, and when I replace cmpxhg with atomic_ version, everything compiles fine. Here is output of make from 2.6.36-rc7-next: ... CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o LD init/built-in.o LD vmlinux kernel/built-in.o: In function `alloc_pid': elfcore.c:(.text+0x1c258): undefined reference to `wrong_size_cmpxchg' net/built-in.o: In function `rt_bind_peer': sysctl_net.c:(.text+0x3bb38): undefined reference to `wrong_size_cmpxchg' net/built-in.o: In function `inet_add_protocol': sysctl_net.c:(.text+0x3f4dc): undefined reference to `wrong_size_cmpxchg' net/built-in.o: In function `inet_del_protocol': sysctl_net.c:(.text+0x3f5a8): undefined reference to `wrong_size_cmpxchg' net/built-in.o: In function `build_ehash_secret': sysctl_net.c:(.text+0x6a034): undefined reference to `wrong_size_cmpxchg' make[1]: *** [vmlinux] Error 1 ... Best regards! ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-09 9:32 cmpxchg() in recent kernels Alex Sverdlin @ 2010-10-15 4:26 ` Aras Vaichas 2010-10-24 21:43 ` Kristoffer Ericson 0 siblings, 1 reply; 12+ messages in thread From: Aras Vaichas @ 2010-10-15 4:26 UTC (permalink / raw) To: linux-arm-kernel On 9 October 2010 20:32, Alex Sverdlin <alex@gai.ru> wrote: > > Hello! > > I've probably missed something, but how to compile recent kernels on ARM? > I've been using GCC 3.4.3 from Cirrus for my EP9302 boards up to 2.6.35.4 > But 2.6.36-rc and upper won't compile anymore. > The problem is appearing in multiplatform code of cmpxchg() function. > First in kernel/pid.c (2.6.36-rc4 - 2.6.36-rc6) > Then 4 times in 2.6.36-rc7-next... atomic_cmpxchg compiles fine, and when I > replace cmpxhg with atomic_ version, everything compiles fine. > > Here is output of make from 2.6.36-rc7-next: > ... > ?CHK ? ? include/generated/compile.h > ?UPD ? ? include/generated/compile.h > ?CC ? ? ?init/version.o > ?LD ? ? ?init/built-in.o > ?LD ? ? ?vmlinux > kernel/built-in.o: In function `alloc_pid': > elfcore.c:(.text+0x1c258): undefined reference to `wrong_size_cmpxchg' > net/built-in.o: In function `rt_bind_peer': > sysctl_net.c:(.text+0x3bb38): undefined reference to `wrong_size_cmpxchg' > net/built-in.o: In function `inet_add_protocol': > sysctl_net.c:(.text+0x3f4dc): undefined reference to `wrong_size_cmpxchg' > net/built-in.o: In function `inet_del_protocol': > sysctl_net.c:(.text+0x3f5a8): undefined reference to `wrong_size_cmpxchg' > net/built-in.o: In function `build_ehash_secret': > sysctl_net.c:(.text+0x6a034): undefined reference to `wrong_size_cmpxchg' > make[1]: *** [vmlinux] Error 1 > ... Sorry, no answer, but I can confirm that I am having the same problem as well. ARM AT91RM9200, 2.6.33.7 + at91 + rt kernel/built-in.o: In function `__tasklet_hi_schedule': utsname_sysctl.c:(.text+0xca1c): undefined reference to `wrong_size_cmpxchg' kernel/built-in.o: In function `__tasklet_schedule': utsname_sysctl.c:(.text+0xcb7c): undefined reference to `wrong_size_cmpxchg' kernel/built-in.o: In function `__tasklet_action': utsname_sysctl.c:(.text+0xce4c): undefined reference to `wrong_size_cmpxchg' kernel/built-in.o: In function `sched_init_smp': utsname_sysctl.c:(.init.text+0xec): undefined reference to `____ilog2_NaN' make: *** [.tmp_vmlinux1] Error 1 also kernel/built-in.o: In function `__tasklet_hi_schedule': slow-work.c:(.text+0xc86c): undefined reference to `wrong_size_cmpxchg' kernel/built-in.o: In function `__tasklet_schedule': slow-work.c:(.text+0xc9cc): undefined reference to `wrong_size_cmpxchg' kernel/built-in.o: In function `__tasklet_action': slow-work.c:(.text+0xcc9c): undefined reference to `wrong_size_cmpxchg' kernel/built-in.o: In function `sched_init_smp': slow-work.c:(.init.text+0xec): undefined reference to `____ilog2_NaN' make: *** [.tmp_vmlinux1] Error 1 Aras ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-15 4:26 ` Aras Vaichas @ 2010-10-24 21:43 ` Kristoffer Ericson 2010-10-24 22:08 ` Russell King - ARM Linux 0 siblings, 1 reply; 12+ messages in thread From: Kristoffer Ericson @ 2010-10-24 21:43 UTC (permalink / raw) To: linux-arm-kernel On Fri, Oct 15, 2010 at 03:26:34PM +1100, Aras Vaichas wrote: > On 9 October 2010 20:32, Alex Sverdlin <alex@gai.ru> wrote: > > > > Hello! > > > > I've probably missed something, but how to compile recent kernels on ARM? > > I've been using GCC 3.4.3 from Cirrus for my EP9302 boards up to 2.6.35.4 > > But 2.6.36-rc and upper won't compile anymore. > > The problem is appearing in multiplatform code of cmpxchg() function. > > First in kernel/pid.c (2.6.36-rc4 - 2.6.36-rc6) > > Then 4 times in 2.6.36-rc7-next... atomic_cmpxchg compiles fine, and when I > > replace cmpxhg with atomic_ version, everything compiles fine. > > > > Here is output of make from 2.6.36-rc7-next: > > ... > > ?CHK ? ? include/generated/compile.h > > ?UPD ? ? include/generated/compile.h > > ?CC ? ? ?init/version.o > > ?LD ? ? ?init/built-in.o > > ?LD ? ? ?vmlinux > > kernel/built-in.o: In function `alloc_pid': > > elfcore.c:(.text+0x1c258): undefined reference to `wrong_size_cmpxchg' > > net/built-in.o: In function `rt_bind_peer': > > sysctl_net.c:(.text+0x3bb38): undefined reference to `wrong_size_cmpxchg' > > net/built-in.o: In function `inet_add_protocol': > > sysctl_net.c:(.text+0x3f4dc): undefined reference to `wrong_size_cmpxchg' > > net/built-in.o: In function `inet_del_protocol': > > sysctl_net.c:(.text+0x3f5a8): undefined reference to `wrong_size_cmpxchg' > > net/built-in.o: In function `build_ehash_secret': > > sysctl_net.c:(.text+0x6a034): undefined reference to `wrong_size_cmpxchg' > > make[1]: *** [vmlinux] Error 1 > > ... > > Sorry, no answer, but I can confirm that I am having the same problem as well. > ARM AT91RM9200, 2.6.33.7 + at91 + rt > > kernel/built-in.o: In function `__tasklet_hi_schedule': > utsname_sysctl.c:(.text+0xca1c): undefined reference to `wrong_size_cmpxchg' > kernel/built-in.o: In function `__tasklet_schedule': > utsname_sysctl.c:(.text+0xcb7c): undefined reference to `wrong_size_cmpxchg' > kernel/built-in.o: In function `__tasklet_action': > utsname_sysctl.c:(.text+0xce4c): undefined reference to `wrong_size_cmpxchg' > kernel/built-in.o: In function `sched_init_smp': > utsname_sysctl.c:(.init.text+0xec): undefined reference to `____ilog2_NaN' > make: *** [.tmp_vmlinux1] Error 1 > > also > > kernel/built-in.o: In function `__tasklet_hi_schedule': > slow-work.c:(.text+0xc86c): undefined reference to `wrong_size_cmpxchg' > kernel/built-in.o: In function `__tasklet_schedule': > slow-work.c:(.text+0xc9cc): undefined reference to `wrong_size_cmpxchg' > kernel/built-in.o: In function `__tasklet_action': > slow-work.c:(.text+0xcc9c): undefined reference to `wrong_size_cmpxchg' > kernel/built-in.o: In function `sched_init_smp': > slow-work.c:(.init.text+0xec): undefined reference to `____ilog2_NaN' > make: *** [.tmp_vmlinux1] Error 1 > > Aras Im seeing something similiar, using GCC 3.4.5 ARM HP Jornada 720, 2.6.36 GZIP kernel/config_data.gz IKCFG kernel/config_data.h CC kernel/configs.o LD kernel/built-in.o LD drivers/pcmcia/built-in.o LD drivers/built-in.o LD vmlinux.o MODPOST vmlinux.o WARNING: modpost: Found 1 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 kernel/built-in.o(.text+0x1d038): In function `alloc_pid': include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' make: *** [.tmp_vmlinux1] Error 1 Kristoffer > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-24 21:43 ` Kristoffer Ericson @ 2010-10-24 22:08 ` Russell King - ARM Linux 2010-10-25 1:33 ` Aras Vaichas 0 siblings, 1 reply; 12+ messages in thread From: Russell King - ARM Linux @ 2010-10-24 22:08 UTC (permalink / raw) To: linux-arm-kernel On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: > Im seeing something similiar, using GCC 3.4.5 > ARM HP Jornada 720, 2.6.36 > > GZIP kernel/config_data.gz > IKCFG kernel/config_data.h > CC kernel/configs.o > LD kernel/built-in.o > LD drivers/pcmcia/built-in.o > LD drivers/built-in.o > LD vmlinux.o > MODPOST vmlinux.o > WARNING: modpost: Found 1 section mismatch(es). > To see full details build your kernel with: > 'make CONFIG_DEBUG_SECTION_MISMATCH=y' > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC init/version.o > LD init/built-in.o > LD .tmp_vmlinux1 > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' > make: *** [.tmp_vmlinux1] Error 1 Probably needs to be bisected, but I think in the long run we'll have to accept that gcc 4 will become the minimum compiler version. ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-24 22:08 ` Russell King - ARM Linux @ 2010-10-25 1:33 ` Aras Vaichas 2010-10-25 6:37 ` Uwe Kleine-König ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Aras Vaichas @ 2010-10-25 1:33 UTC (permalink / raw) To: linux-arm-kernel On 25 October 2010 09:08, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: > > Im seeing something similiar, using GCC 3.4.5 > > ARM HP Jornada 720, 2.6.36 snip ... > > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': > > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' > > make: *** [.tmp_vmlinux1] Error 1 > > Probably needs to be bisected, but I think in the long run we'll have > to accept that gcc 4 will become the minimum compiler version. I just tested a build with GCC 4.2.3 and it linked correctly. The only problem is that the kernel image size is now 3x as big. Using gcc-3.4.4-glibc-2.3.5: * fails to link without patch to cmpxchg-local.h, but size is similar to my previous builds Created: Mon Oct 25 11:59:04 2010 Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 1471354 Bytes = 1436.87 kB = 1.40 MB Using gcc-4.2.3-glibc-2.7: * compiles and links correctly, but size is way too big Created: Mon Oct 25 11:48:26 2010 Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 4576155 Bytes = 4468.90 kB = 4.36 MB Exact same code, I just changed my CROSS symbol to point to different GCC directories. Aras ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-25 1:33 ` Aras Vaichas @ 2010-10-25 6:37 ` Uwe Kleine-König 2010-10-25 15:13 ` Russell King - ARM Linux 2010-10-25 21:07 ` Kristoffer Ericson 2 siblings, 0 replies; 12+ messages in thread From: Uwe Kleine-König @ 2010-10-25 6:37 UTC (permalink / raw) To: linux-arm-kernel Hello Aras, On Mon, Oct 25, 2010 at 12:33:49PM +1100, Aras Vaichas wrote: > On 25 October 2010 09:08, Russell King - ARM Linux > <linux@arm.linux.org.uk> wrote: > > > > On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: > > > Im seeing something similiar, using GCC 3.4.5 > > > ARM HP Jornada 720, 2.6.36 > snip ... > > > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': > > > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' > > > make: *** [.tmp_vmlinux1] Error 1 > > > > Probably needs to be bisected, but I think in the long run we'll have > > to accept that gcc 4 will become the minimum compiler version. > > I just tested a build with GCC 4.2.3 and it linked correctly. The only > problem is that the kernel image size is now 3x as big. > > > Using gcc-3.4.4-glibc-2.3.5: > > * fails to link without patch to cmpxchg-local.h, but size is similar > to my previous builds > > Created: Mon Oct 25 11:59:04 2010 > Image Type: ARM Linux Kernel Image (gzip compressed) > Data Size: 1471354 Bytes = 1436.87 kB = 1.40 MB > > > Using gcc-4.2.3-glibc-2.7: > > * compiles and links correctly, but size is way too big > > Created: Mon Oct 25 11:48:26 2010 > Image Type: ARM Linux Kernel Image (gzip compressed) > Data Size: 4576155 Bytes = 4468.90 kB = 4.36 MB > > > Exact same code, I just changed my CROSS symbol to point to different > GCC directories. Can you compare the section headers of the resulting vmlinux images? (I.e. $CROSS-objdump -h vmlinux) and report bag which section(s) got bigger? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-25 1:33 ` Aras Vaichas 2010-10-25 6:37 ` Uwe Kleine-König @ 2010-10-25 15:13 ` Russell King - ARM Linux 2010-10-25 22:48 ` Aras Vaichas 2010-10-25 21:07 ` Kristoffer Ericson 2 siblings, 1 reply; 12+ messages in thread From: Russell King - ARM Linux @ 2010-10-25 15:13 UTC (permalink / raw) To: linux-arm-kernel On Mon, Oct 25, 2010 at 12:33:49PM +1100, Aras Vaichas wrote: > On 25 October 2010 09:08, Russell King - ARM Linux > <linux@arm.linux.org.uk> wrote: > > > > On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: > > > Im seeing something similiar, using GCC 3.4.5 > > > ARM HP Jornada 720, 2.6.36 > snip ... > > > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': > > > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' > > > make: *** [.tmp_vmlinux1] Error 1 > > > > Probably needs to be bisected, but I think in the long run we'll have > > to accept that gcc 4 will become the minimum compiler version. > > I just tested a build with GCC 4.2.3 and it linked correctly. The only > problem is that the kernel image size is now 3x as big. > > > Using gcc-3.4.4-glibc-2.3.5: > > * fails to link without patch to cmpxchg-local.h, but size is similar > to my previous builds > > Created: Mon Oct 25 11:59:04 2010 > Image Type: ARM Linux Kernel Image (gzip compressed) > Data Size: 1471354 Bytes = 1436.87 kB = 1.40 MB > > > Using gcc-4.2.3-glibc-2.7: > > * compiles and links correctly, but size is way too big > > Created: Mon Oct 25 11:48:26 2010 > Image Type: ARM Linux Kernel Image (gzip compressed) > Data Size: 4576155 Bytes = 4468.90 kB = 4.36 MB This sounds like a regression - can you please bisect to try and find which change caused tihs? ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-25 15:13 ` Russell King - ARM Linux @ 2010-10-25 22:48 ` Aras Vaichas 2010-10-26 6:44 ` Uwe Kleine-König 0 siblings, 1 reply; 12+ messages in thread From: Aras Vaichas @ 2010-10-25 22:48 UTC (permalink / raw) To: linux-arm-kernel On 26 October 2010 02:13, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Mon, Oct 25, 2010 at 12:33:49PM +1100, Aras Vaichas wrote: >> On 25 October 2010 09:08, Russell King - ARM Linux >> <linux@arm.linux.org.uk> wrote: >> > >> > On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: >> > > Im seeing something similiar, using GCC 3.4.5 >> > > ARM HP Jornada 720, 2.6.36 >> snip ... >> > > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': >> > > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' >> > > make: *** [.tmp_vmlinux1] Error 1 >> > >> > Probably needs to be bisected, but I think in the long run we'll have >> > to accept that gcc 4 will become the minimum compiler version. >> >> I just tested a build with GCC 4.2.3 and it linked correctly. The only >> problem is that the kernel image size is now 3x as big. >> >> >> Using gcc-3.4.4-glibc-2.3.5: >> >> * fails to link without patch to cmpxchg-local.h, but size is similar >> to my previous builds >> >> Created: ? ? ?Mon Oct 25 11:59:04 2010 >> Image Type: ? ARM Linux Kernel Image (gzip compressed) >> Data Size: ? ?1471354 Bytes = 1436.87 kB = 1.40 MB >> >> >> Using gcc-4.2.3-glibc-2.7: >> >> * compiles and links correctly, but size is way too big >> >> Created: ? ? ?Mon Oct 25 11:48:26 2010 >> Image Type: ? ARM Linux Kernel Image (gzip compressed) >> Data Size: ? ?4576155 Bytes = 4468.90 kB = 4.36 MB > > This sounds like a regression - can you please bisect to try and find > which change caused tihs? OK, problem solved. I had this problem: http://lists.busybox.net/pipermail/buildroot/2008-June/021158.html The fix for this problem was included as a patch for the kernel as shown here: http://lists.busybox.net/pipermail/buildroot/2008-June/021162.html But my U-Boot uImage build script does its own objcopy and thus didn't get patched. I've added the extra objcopy arguments to my script and my final image size is now 1.36MB. For reference, this is my uImage make script: make ARCH=arm CROSS_COMPILE=${CROSS_PATH} INSTALL_MOD_PATH=${FS_PATH} Image ${CROSS_PATH}objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -S vmlinux linux.bin gzip -v9 linux.bin ${MKIMAGE} -A arm -O linux -C gzip -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage Aras ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-25 22:48 ` Aras Vaichas @ 2010-10-26 6:44 ` Uwe Kleine-König 2010-10-26 12:10 ` Aras Vaichas 0 siblings, 1 reply; 12+ messages in thread From: Uwe Kleine-König @ 2010-10-26 6:44 UTC (permalink / raw) To: linux-arm-kernel Hello Aras, > For reference, this is my uImage make script: > > make ARCH=arm CROSS_COMPILE=${CROSS_PATH} INSTALL_MOD_PATH=${FS_PATH} Image > > ${CROSS_PATH}objcopy -O binary -R .note -R .note.gnu.build-id -R > .comment -S vmlinux linux.bin Why don't you use arch/arm/boot/Image instead of doing the objcopy yourself? (If it's intended you might want to make vmlinux only instead of Image.) Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-26 6:44 ` Uwe Kleine-König @ 2010-10-26 12:10 ` Aras Vaichas 0 siblings, 0 replies; 12+ messages in thread From: Aras Vaichas @ 2010-10-26 12:10 UTC (permalink / raw) To: linux-arm-kernel 2010/10/26 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>: > Hello Aras, > >> For reference, this is my uImage make script: >> >> make ARCH=arm CROSS_COMPILE=${CROSS_PATH} INSTALL_MOD_PATH=${FS_PATH} Image >> >> ${CROSS_PATH}objcopy -O binary -R .note -R .note.gnu.build-id -R >> .comment -S vmlinux linux.bin > > Why don't you use arch/arm/boot/Image instead of doing the objcopy > yourself? ?(If it's intended you might want to make vmlinux only instead > of Image.) My best guess is that it's carried over from my 2.4.x days. A quick Google search shows several U-Boot image building tutorials that do this. e.g. http://www.ronetix.at/an008_ARM_Linux_Debugging.html It was never a problem until GCC v4 was required for a clean kernel build but I will certainly review my build scripts with this in mind. :) I only do kernel work every few years as needed for the company product, so I tend to play catchups on these changes. Aras ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-25 1:33 ` Aras Vaichas 2010-10-25 6:37 ` Uwe Kleine-König 2010-10-25 15:13 ` Russell King - ARM Linux @ 2010-10-25 21:07 ` Kristoffer Ericson 2010-10-25 22:37 ` Alexander Sverdlin 2 siblings, 1 reply; 12+ messages in thread From: Kristoffer Ericson @ 2010-10-25 21:07 UTC (permalink / raw) To: linux-arm-kernel On Mon, Oct 25, 2010 at 12:33:49PM +1100, Aras Vaichas wrote: > On 25 October 2010 09:08, Russell King - ARM Linux > <linux@arm.linux.org.uk> wrote: > > > > On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: > > > Im seeing something similiar, using GCC 3.4.5 > > > ARM HP Jornada 720, 2.6.36 > snip ... > > > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': > > > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' > > > make: *** [.tmp_vmlinux1] Error 1 > > > > Probably needs to be bisected, but I think in the long run we'll have > > to accept that gcc 4 will become the minimum compiler version. > > I just tested a build with GCC 4.2.3 and it linked correctly. The only > problem is that the kernel image size is now 3x as big. > Im using a GCC 4.2.2 here and Im not seeing those issues, size is pretty much exactly the same. Just FYI. > > Using gcc-3.4.4-glibc-2.3.5: > > * fails to link without patch to cmpxchg-local.h, but size is similar > to my previous builds > > Created: Mon Oct 25 11:59:04 2010 > Image Type: ARM Linux Kernel Image (gzip compressed) > Data Size: 1471354 Bytes = 1436.87 kB = 1.40 MB > > > Using gcc-4.2.3-glibc-2.7: > > * compiles and links correctly, but size is way too big > > Created: Mon Oct 25 11:48:26 2010 > Image Type: ARM Linux Kernel Image (gzip compressed) > Data Size: 4576155 Bytes = 4468.90 kB = 4.36 MB > > > Exact same code, I just changed my CROSS symbol to point to different > GCC directories. > > Aras ^ permalink raw reply [flat|nested] 12+ messages in thread
* cmpxchg() in recent kernels 2010-10-25 21:07 ` Kristoffer Ericson @ 2010-10-25 22:37 ` Alexander Sverdlin 0 siblings, 0 replies; 12+ messages in thread From: Alexander Sverdlin @ 2010-10-25 22:37 UTC (permalink / raw) To: linux-arm-kernel On Mon, 2010-10-25 at 23:07 +0200, Kristoffer Ericson wrote: > On Mon, Oct 25, 2010 at 12:33:49PM +1100, Aras Vaichas wrote: > > On 25 October 2010 09:08, Russell King - ARM Linux > > <linux@arm.linux.org.uk> wrote: > > > > > > On Sun, Oct 24, 2010 at 11:43:38PM +0200, Kristoffer Ericson wrote: > > > > Im seeing something similiar, using GCC 3.4.5 > > > > ARM HP Jornada 720, 2.6.36 > > snip ... > > > > kernel/built-in.o(.text+0x1d038): In function `alloc_pid': > > > > include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' > > > > make: *** [.tmp_vmlinux1] Error 1 > > > > > > Probably needs to be bisected, but I think in the long run we'll have > > > to accept that gcc 4 will become the minimum compiler version. > > > > I just tested a build with GCC 4.2.3 and it linked correctly. The only > > problem is that the kernel image size is now 3x as big. > > > > Im using a GCC 4.2.2 here and Im not seeing those issues, size > is pretty much exactly the same. Just FYI. > Since I've switched from gcc 3.4.3 to gcc 4.4.1, problem with cmpxchg() disappeared. And yes, size for my config is pretty much the same as before, about 1.2-1.4mb. Alexander. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-10-26 12:10 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-09 9:32 cmpxchg() in recent kernels Alex Sverdlin 2010-10-15 4:26 ` Aras Vaichas 2010-10-24 21:43 ` Kristoffer Ericson 2010-10-24 22:08 ` Russell King - ARM Linux 2010-10-25 1:33 ` Aras Vaichas 2010-10-25 6:37 ` Uwe Kleine-König 2010-10-25 15:13 ` Russell King - ARM Linux 2010-10-25 22:48 ` Aras Vaichas 2010-10-26 6:44 ` Uwe Kleine-König 2010-10-26 12:10 ` Aras Vaichas 2010-10-25 21:07 ` Kristoffer Ericson 2010-10-25 22:37 ` Alexander Sverdlin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).