From patchwork Tue Jul 12 15:24:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 104401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 7EABFB6F62 for ; Wed, 13 Jul 2011 01:25:10 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25408280B3; Tue, 12 Jul 2011 17:25:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ohkZppyP4YlR; Tue, 12 Jul 2011 17:25:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7F1C2280C3; Tue, 12 Jul 2011 17:25:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD427280C3 for ; Tue, 12 Jul 2011 17:25:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G7AUrj3VYcOI for ; Tue, 12 Jul 2011 17:25:01 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by theia.denx.de (Postfix) with ESMTPS id 8B9E2280B3 for ; Tue, 12 Jul 2011 17:24:59 +0200 (CEST) Received: by qwc23 with SMTP id 23so2532104qwc.3 for ; Tue, 12 Jul 2011 08:24:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.201.8 with SMTP id ey8mr37470qab.340.1310484298409; Tue, 12 Jul 2011 08:24:58 -0700 (PDT) Received: by 10.224.37.149 with HTTP; Tue, 12 Jul 2011 08:24:58 -0700 (PDT) In-Reply-To: <20110712115814.2A91416F53F9@gemini.denx.de> References: <1310469889-12999-1-git-send-email-linus.walleij@linaro.org> <20110712115814.2A91416F53F9@gemini.denx.de> Date: Tue, 12 Jul 2011 17:24:58 +0200 Message-ID: From: Linus Walleij To: Wolfgang Denk Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] tools: build some commands without -pedantic X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On Tue, Jul 12, 2011 at 1:58 PM, Wolfgang Denk wrote: > Dear Linus Walleij, > > In message <1310469889-12999-1-git-send-email-linus.walleij@linaro.org> you wrote: >> On this GCC in Fedora (4.6.0 20110530) the tools gen_eth_addr >> and img2srec become size zero if compiled with -pedantic (no >> warnings are emitted however). Marking them _NOPED solves the >> issue for me. >> >> Signed-off-by: Linus Walleij >> --- >>  tools/Makefile |    6 +++--- >>  1 files changed, 3 insertions(+), 3 deletions(-) > > NAK.  I hate papering over obvious problems.  Please let's analyze > what's going wrong, and fix the cause instead. Yes I'm reluctant about the whole thing, doesn't say from the patch it was indeed intended as a discussion item... > This is all the more so, as I'm running Fedora 15 here on our machines > [with gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC)], and I don;t > see any such problems. Hm! Then I must be doing something wrong... I do this, first I apply the patches I sent for Integrator support, then I apply this patch to test with network support: console=tty" @@ -155,11 +145,14 @@ * PCI definitions */ +#define CONFIG_PCI #ifdef CONFIG_PCI /* pci support */ #undef CONFIG_PCI_PNP #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ #define DEBUG +#define CONFIG_NET_MULTI +#define CONFIG_TULIP #define CONFIG_EEPRO100 #define CONFIG_SYS_RX_ETH_BUFFER 8 /* use 8 rx buffer on eepro100 */ Then I build like this: cd u-boot mkdir build make O=build CROSS_COMPILE=arm-none-eabi- distclean make O=build CROSS_COMPILE=arm-none-eabi- ap920t_config make O=build CROSS_COMPILE=arm-none-eabi- all Then this happens on my side: make -C tools all make[1]: Entering directory `/home/linus/u-boot/tools' gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/linus/u-boot/include -idirafter /home/linus/u-boot/build/include2 -idirafter /home/linus/u-boot/build/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o /home/linus/u-boot/build/tools/gen_eth_addr.o gen_eth_addr.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/linus/u-boot/include -idirafter /home/linus/u-boot/build/include2 -idirafter /home/linus/u-boot/build/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o /home/linus/u-boot/build/tools/gen_eth_addr /home/linus/u-boot/build/tools/gen_eth_addr.o /home/linus/u-boot/build/tools/gen_eth_addr.o: file not recognized: File truncated collect2: ld returned 1 exit status make[1]: *** [/home/linus/u-boot/build/tools/gen_eth_addr] Error 1 make[1]: Leaving directory `/home/linus/u-boot/tools' make: *** [tools] Error 2 Which is because: ls -al build/tools/gen_eth_addr.o -rw-rw-r--. 1 linus linus 0 Jul 12 17:16 build/tools/gen_eth_addr.o If I copy+paste the buildline and remove -pedantic like this: u-boot]$ cd tools && gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/linus/u-boot/include -idirafter /home/linus/u-boot/build/include2 -idirafter /home/linus/u-boot/build/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o /home/linus/u-boot/build/tools/gen_eth_addr.o gen_eth_addr.c -c && cd .. ls -al build/tools/gen_eth_addr.o -rw-rw-r--. 1 linus linus 1380 Jul 12 17:21 build/tools/gen_eth_addr.o It's the same effect as if I tag on _NOPED of course. If I repeat it with "-pedantic -v" to see more what's happening in GCC: cd tools && gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/linus/u-boot/include -idirafter /home/linus/u-boot/build/include2 -idirafter /home/linus/u-boot/build/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -v -o /home/linus/u-boot/build/tools/gen_eth_addr.o gen_eth_addr.c -c && cd .. Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC) COLLECT_GCC_OPTIONS='-Wall' '-Wstrict-prototypes' '-O2' '-fomit-frame-pointer' '-idirafter' '/home/linus/u-boot/include' '-idirafter' '/home/linus/u-boot/build/include2' '-idirafter' '/home/linus/u-boot/build/include' '-I' '/home/linus/u-boot/lib/libfdt' '-I' '/home/linus/u-boot/tools' '-D' 'CONFIG_SYS_TEXT_BASE=0x01000000' '-D' 'USE_HOSTCC' '-D' '__KERNEL_STRICT_NAMES' '-pedantic' '-v' '-c' '-E' '-mtune=generic' '-march=i686' /usr/libexec/gcc/i686-redhat-linux/4.6.0/cc1 -E -quiet -v -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -D CONFIG_SYS_TEXT_BASE=0x01000000 -D USE_HOSTCC -D __KERNEL_STRICT_NAMES -idirafter /home/linus/u-boot/include -idirafter /home/linus/u-boot/build/include2 -idirafter /home/linus/u-boot/build/include gen_eth_addr.c -mtune=generic -march=i686 -Wall -Wstrict-prototypes -pedantic -fomit-frame-pointer -O2 ignoring nonexistent directory "/usr/lib/gcc/i686-redhat-linux/4.6.0/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/i686-redhat-linux/4.6.0/../../../../i686-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /home/linus/u-boot/lib/libfdt /home/linus/u-boot/tools /usr/lib/gcc/i686-redhat-linux/4.6.0/include /usr/local/include /usr/include /home/linus/u-boot/include /home/linus/u-boot/build/include2 /home/linus/u-boot/build/include End of search list. COMPILER_PATH=/usr/libexec/gcc/i686-redhat-linux/4.6.0/:/usr/libexec/gcc/i686-redhat-linux/4.6.0/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.6.0/:/usr/lib/gcc/i686-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/i686-redhat-linux/4.6.0/:/usr/lib/gcc/i686-redhat-linux/4.6.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-Wall' '-Wstrict-prototypes' '-O2' '-fomit-frame-pointer' '-idirafter' '/home/linus/u-boot/include' '-idirafter' '/home/linus/u-boot/build/include2' '-idirafter' '/home/linus/u-boot/build/include' '-I' '/home/linus/u-boot/lib/libfdt' '-I' '/home/linus/u-boot/tools' '-D' 'CONFIG_SYS_TEXT_BASE=0x01000000' '-D' 'USE_HOSTCC' '-D' '__KERNEL_STRICT_NAMES' '-pedantic' '-v' '-c' '-E' '-mtune=generic' '-march=i686' Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC) COLLECT_GCC_OPTIONS='-Wall' '-Wstrict-prototypes' '-O2' '-fomit-frame-pointer' '-idirafter' '/home/linus/u-boot/include' '-idirafter' '/home/linus/u-boot/build/include2' '-idirafter' '/home/linus/u-boot/build/include' '-I' '/home/linus/u-boot/lib/libfdt' '-I' '/home/linus/u-boot/tools' '-D' 'CONFIG_SYS_TEXT_BASE=0x01000000' '-D' 'USE_HOSTCC' '-D' '__KERNEL_STRICT_NAMES' '-pedantic' '-v' '-c' '-o' '/home/linus/.ccache/b/e/640dda2a6bea0b502be1a40f20250c-70431.o.tmp.finux.16608' '-mtune=generic' '-march=i686' /usr/libexec/gcc/i686-redhat-linux/4.6.0/cc1 -fpreprocessed /home/linus/.ccache/tmp/gen_eth_ad.tmp.finux.16608.i -quiet -dumpbase gen_eth_ad.tmp.finux.16608.i -mtune=generic -march=i686 -auxbase-strip /home/linus/.ccache/b/e/640dda2a6bea0b502be1a40f20250c-70431.o.tmp.finux.16608 -O2 -Wall -Wstrict-prototypes -pedantic -version -fomit-frame-pointer -o /tmp/ccWF9IMp.s GNU C (GCC) version 4.6.0 20110530 (Red Hat 4.6.0-9) (i686-redhat-linux) compiled by GNU C version 4.6.0 20110530 (Red Hat 4.6.0-9), GMP version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C (GCC) version 4.6.0 20110530 (Red Hat 4.6.0-9) (i686-redhat-linux) compiled by GNU C version 4.6.0 20110530 (Red Hat 4.6.0-9), GMP version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 0738d5e4529b180665bca6e0f3477eb6 COLLECT_GCC_OPTIONS='-Wall' '-Wstrict-prototypes' '-O2' '-fomit-frame-pointer' '-idirafter' '/home/linus/u-boot/include' '-idirafter' '/home/linus/u-boot/build/include2' '-idirafter' '/home/linus/u-boot/build/include' '-I' '/home/linus/u-boot/lib/libfdt' '-I' '/home/linus/u-boot/tools' '-D' 'CONFIG_SYS_TEXT_BASE=0x01000000' '-D' 'USE_HOSTCC' '-D' '__KERNEL_STRICT_NAMES' '-pedantic' '-v' '-c' '-o' '/home/linus/.ccache/b/e/640dda2a6bea0b502be1a40f20250c-70431.o.tmp.finux.16608' '-mtune=generic' '-march=i686' as --32 -o /home/linus/.ccache/b/e/640dda2a6bea0b502be1a40f20250c-70431.o.tmp.finux.16608 /tmp/ccWF9IMp.s COMPILER_PATH=/usr/libexec/gcc/i686-redhat-linux/4.6.0/:/usr/libexec/gcc/i686-redhat-linux/4.6.0/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.6.0/:/usr/lib/gcc/i686-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/i686-redhat-linux/4.6.0/:/usr/lib/gcc/i686-redhat-linux/4.6.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-Wall' '-Wstrict-prototypes' '-O2' '-fomit-frame-pointer' '-idirafter' '/home/linus/u-boot/include' '-idirafter' '/home/linus/u-boot/build/include2' '-idirafter' '/home/linus/u-boot/build/include' '-I' '/home/linus/u-boot/lib/libfdt' '-I' '/home/linus/u-boot/tools' '-D' 'CONFIG_SYS_TEXT_BASE=0x01000000' '-D' 'USE_HOSTCC' '-D' '__KERNEL_STRICT_NAMES' '-pedantic' '-v' '-c' '-o' '/home/linus/.ccache/b/e/640dda2a6bea0b502be1a40f20250c-70431.o.tmp.finux.16608' '-mtune=generic' '-march=i686' Not many hints here though :-( Any suggestions on how to drill into this are deeply welcome! Thanks, Linus Walleij diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h index 26eac8b..39c84b5 100644 --- a/include/configs/integratorap.h +++ b/include/configs/integratorap.h @@ -80,17 +80,7 @@ /* * Command line configuration. */ - - -#define CONFIG_CMD_IMI -#define CONFIG_CMD_BDI -#define CONFIG_CMD_BOOTD -#define CONFIG_CMD_MEMORY -#define CONFIG_CMD_FLASH -#define CONFIG_CMD_IMLS -#define CONFIG_CMD_LOADB -#define CONFIG_CMD_LOADS - +#include #define CONFIG_BOOTDELAY 2 #define CONFIG_BOOTARGS "root=/dev/mtdblock0 mem=32M console=ttyAM0