tools: build some commands without -pedantic
PATCH 1/1 tools: build some commands without -pedantic
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.
--- tools/Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
tools/Makefile +3 -3
@@ -83,8 +83,8 @@ OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o NOPED_OBJ_FILES-y += default_image.o OBJ_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc.o NOPED_OBJ_FILES-y += fit_image.o -OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o -OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o +NOPED_OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o +NOPED_OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += imximage.o
@@ -168,7 +168,7 @@ $(obj)envcrc$(SFX): $(obj)crc32.o $(obj)env_embedded.o $(obj)envcrc.o $(obj)sha1 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(obj)gen_eth_addr$(SFX): $(obj)gen_eth_addr.o - $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ + $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $^ $(HOSTSTRIP) $@ $(obj)img2srec$(SFX): $(obj)img2srec.o
Signature · 1 line
1.7.6
PATCH 1/1 tools: build some commands without -pedantic
Dear Linus Walleij,
Quoted 9 lines · In message <[email protected]> you…
On this GCC in Fedora (4.6.0 20110530) the tools
gen_eth_addrand img2srec become size zero if compiled with -pedantic (no warnings are emitted however). Marking them_NOPEDsolves the issue for me.Signed-off-by Linus Walleij <[email protected]>--- 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.
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.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Writing a book is like washing an elephant: there's no good place to begin or end, and it's hard to keep track of what you've already covered.
PATCH 1/1 tools: build some commands without -pedantic
Quoted 8 lines · Wolfgang Denk
Dear Linus Walleij,
Quoted 5 lines · In message <[email protected]> you…
On this GCC in Fedora (4.6.0 20110530) the tools
gen_eth_addrand img2srec become size zero if compiled with -pedantic (no warnings are emitted however). Marking them_NOPEDsolves the issue for me.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Linus Walleij <[email protected]>---
?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...
Quoted 3 lines
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:
include/configs/integratorap.h +1 -11
@@ -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 <config_cmd_default.h> #define CONFIG_BOOTDELAY 2#define CONFIG_BOOTARGS "root=/dev/mtdblock0 mem=32M console=ttyAM0
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 -DCONFIG_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
PATCH 1/1 tools: build some commands without -pedantic
Quoted 2 lines · Linus Walleij
I do this, first I apply the patches I sent for Integrator support, then I apply this patch to test with network support:
no changes at all should be necessary to include/configs/. build the tools in an unconfigured tree to avoid any of that cruft.
$ git clean -x -d $ make tools $ size tools/gen_eth_addr.o -mike
PATCH 1/1 tools: build some commands without -pedantic
Quoted 10 lines · Mike Frysinger
Quoted 2 lines · Linus Walleij
I do this, first I apply the patches I sent for Integrator support, then I apply this patch to test with network support:
no changes at all should be necessary to
include/configs/. ?build the tools in an unconfigured tree to avoid any of that cruft.$ git clean -x -d $ make tools $ size tools/gen_eth_addr.o
If you do this gen_eth_addr.o isn't even built, since it is only built if you first
configure a board with CONFIG_CMD_NET of some kind.
$ git clean -x -d $ make tools (... some clean build logs ...) $ size tools/gen_eth_addr.o size: 'tools/gen_eth_addr.o': No such file
If I do the minimal test case like this:
$ make tools CONFIG_CMD_NET=y
I indeed get the same error again:
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/include2 -idirafter /home/linus/u-boot/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE= -DUSE_HOSTCC
-D__KERNEL_STRICT_NAMES -pedantic -o 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/include2 -idirafter /home/linus/u-boot/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE= -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o gen_eth_addr gen_eth_addr.o gen_eth_addr.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make[1]: *** [gen_eth_addr] Error 1
make[1]: Leaving directory `/home/linus/u-boot/tools'
make: *** [tools] Error 2
So yes, I can positively repeat this on a clean tree. It's still -pendantic that is the culprit, if I copy the above and run manually without -pedantic it compiles
fine.
Thanks,
Linus Walleij
PATCH 1/1 tools: build some commands without -pedantic
Quoted 8 lines · Linus Walleij
Quoted 7 lines · Mike Frysinger
Quoted 2 lines · Linus Walleij
I do this, first I apply the patches I sent for Integrator support, then I apply this patch to test with network support:
no changes at all should be necessary to
include/configs/. ?build the tools in an unconfigured tree to avoid any of that cruft.
Quoted 6 lines
Quoted 3 lines
$ git clean -x -d $ make tools $ size tools/gen_eth_addr.oIf you do this gen_eth_addr.o isn't even built, since it is only built if you first configure a board with
CONFIG_CMD_NETof some kind.
not really. either use make tools-all, or make CONFIG_CMD_NET=y tools. but you figured that out already ...
Quoted 20 lines
I indeed get the same error again:
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/include2(quoted diff) +0
-4-idirafter /home/linus/u-boot/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE= -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic ? -o gen_eth_addr.o gen_eth_addr.c -cgcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter
/home/linus/u-boot/include-idirafter/home/linus/u-boot/include2(quoted diff) +0
-3-idirafter /home/linus/u-boot/include -I /home/linus/u-boot/lib/libfdt -I /home/linus/u-boot/tools -DCONFIG_SYS_TEXT_BASE= -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic ?-o gen_eth_addr gen_eth_addr.ogen_eth_addr.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make[1]: *** [gen_eth_addr] Error 1
make[1]: Leaving directory `/home/linus/u-boot/tools'
make: *** [tools] Error 2
Quoted 3 lines
So yes, I can positively repeat this on a clean tree. It's still -pendantic that is the culprit, if I copy the above and run manually without -pedantic it compiles fine.
are you using ccache ?
-mike
PATCH 1/1 tools: build some commands without -pedantic
Quoted 6 lines · Mike Frysinger
[Me]
Quoted 3 lines
So yes, I can positively repeat this on a clean tree. It's still -pendantic that is the culprit, if I copy the above and run manually without -pedantic it compiles fine.
are you using ccache ?
Yes :-P
I didn't think so, but nowadays it's apparently in the Fedora development tools groupinstall. Removing the package and spawning a new shell indeed solves the problem, like I guess deleting the ccache database would.
Thanks Mike!
I wonder if we could autodetect this so noone else runs into it?
Linus Walleij
PATCH 1/1 tools: build some commands without -pedantic
Quoted 10 lines · Linus Walleij
Quoted 6 lines · Mike Frysinger
[Me]
Quoted 3 lines
So yes, I can positively repeat this on a clean tree. It's still -pendantic that is the culprit, if I copy the above and run manually without -pedantic it compiles fine.
are you using ccache ?
Yes :-P
Quoted 7 lines
I didn't think so, but nowadays it's apparently in the Fedora development tools groupinstall. Removing the package and spawning a new shell indeed solves the problem, like I guess deleting the ccache database would.
Thanks Mike!
I wonder if we could autodetect this so noone else runs into it?
not really. sounds like ccache db corruption (lose power recently?), and as with any corruption, "detecting" it in arbitrary build systems isnt exactly a trivial task. if you get back a valid ELF object, but not the right one, how is u-boot to know ?
i'd ccache -C and forget about the whole thing :P -mike
PATCH 1/1 tools: build some commands without -pedantic
In reply to Linus WalleijDear Linus Walleij,
Quoted 6 lines · In message <CACRpkdaDsMRw3Uu6Q7_MaBsb-WpaEy-WMkYf7Q0wAxNby126Fw@mail.gmail.com>…
Quoted 5 lines · Mike Frysinger
[Me]
Quoted 3 lines
So yes, I can positively repeat this on a clean tree. It's still -pendantic that is the culprit, if I copy the above and run manually without -pedantic it compiles fine.
Quoted 7 lines
Quoted 1 line
are you using ccache ?
Yes :-P
I didn't think so, but nowadays it's apparently in the Fedora development tools groupinstall. Removing the package and spawning a new shell indeed solves the problem, like I guess deleting the ccache database would.
I'm using ccache as well, and always did. Never saw such an issue before.
Did you have any I/O errors (like corrupt data) on your system lately?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There are very few personal problems that cannot be solved through a suitable application of high explosives.
PATCH 1/1 tools: build some commands without -pedantic
Quoted 11 lines · Wolfgang Denk
Quoted 10 lines · Linus Walleij
Quoted 6 lines · Mike Frysinger
[Me]
Quoted 3 lines
So yes, I can positively repeat this on a clean tree. It's still -pendantic that is the culprit, if I copy the above and run manually without -pedantic it compiles fine.
are you using ccache ?
Yes :-P
Quoted 8 lines
Quoted 3 lines
I didn't think so, but nowadays it's apparently in the Fedora development tools groupinstall. Removing the package and spawning a new shell indeed solves the problem, like I guess deleting the ccache database would.
I'm using ccache as well, and always did. ?Never saw such an issue before.
Did you have any I/O errors (like corrupt data) on your system lately?
with Gentoo, we've often seen unexpected reboots (power loss / oom / oops / etc...) result in zero byte files being left in the cache. comes up semi-frequently for us since so many people are using ccache and building from source. the zero byte aspect makes sense when using ext4 due to the fs design (metadata gets committed, but contents are in transit and lost).
perhaps ccache itself should grow a 0 byte file check. i cant imagine any valid compiled object being 0 bytes ...
-mike
PATCH 1/1 tools: build some commands without -pedantic
In reply to Wolfgang DenkQuoted 4 lines · Wolfgang Denk
Quoted 2 lines
Yes I'm reluctant about the whole thing, doesn't say from the patch it was indeed intended as a discussion item...
You should have marked it as "RFC" in the subject, then.
I forgot, mea culpa.
Quoted 8 lines
Quoted 3 lines
I didn't think so, but nowadays it's apparently in the Fedora development tools groupinstall. Removing the package and spawning a new shell indeed solves the problem, like I guess deleting the ccache database would.
I'm using ccache as well, and always did. ?Never saw such an issue before.
Did you have any I/O errors (like corrupt data) on your system lately?
Yep it's a laptop, it boots from a USB drive, sometimes I even drop the drive and disconnect it in transit so data corruption is happening every day.
I removed ccache since I don't trust it anymore, sorry about the fuzz.
Thanks Wolfgang,
Linus Walleij
PATCH 1/1 tools: build some commands without -pedantic
In reply to Linus WalleijDear Linus Walleij,
Quoted 3 lines · In message <CACRpkdaqvK3730mB67C8Bmpfm6fLHb1Tz-Bzr=Lhxn1bFw2i3g@mail.gmail.com>…
Yes I'm reluctant about the whole thing, doesn't say from the patch it was indeed intended as a discussion item...
You should have marked it as "RFC" in the subject, then.
Quoted 26 lines
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.ogen_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
Quoted 3 lines
Which is because:
ls -albuild/tools/gen_eth_addr.o
-rw-rw-r--. 1 linus linus 0 Jul 12 17:16build/tools/gen_eth_addr.o
This is what I see:
Short:
-> ./MAKEALL ap920t
Configuring for ap920t board...
Variant: Core module CM920T with core arm920tpci.c: In function 'pci_init_board':
pci.c:392: warning: implicit declaration of function 'pciauto_config_init'
text data bss dec hex filename
162650 3236 36260 202146 315a2 ./u-boot
--------------------- SUMMARY ---------------------------- Boards compiled: 1
Boards with warnings or errors: 1 ( ap920t )
----------------------------------------------------------
Long:
...
make -C tools all
make[1]: Entering directory `/home/wd/git/u-boot/work/tools'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/wd/git/u-boot/work/include -idirafter /home/wd/git/u-boot/work/include2 -idirafter /home/wd/git/u-boot/work/include -I /home/wd/git/u-boot/work/lib/libfdt -I /home/wd/git/u-boot/work/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o gen_eth_addr.o gen_eth_addr.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/wd/git/u-boot/work/include -idirafter /home/wd/git/u-boot/work/include2 -idirafter /home/wd/git/u-boot/work/include -I /home/wd/git/u-boot/work/lib/libfdt -I /home/wd/git/u-boot/work/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o gen_eth_addr gen_eth_addr.o strip gen_eth_addr
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/wd/git/u-boot/work/include -idirafter /home/wd/git/u-boot/work/include2 -idirafter /home/wd/git/u-boot/work/include -I /home/wd/git/u-boot/work/lib/libfdt -I /home/wd/git/u-boot/work/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o img2srec.o img2srec.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/wd/git/u-boot/work/include -idirafter /home/wd/git/u-boot/work/include2 -idirafter /home/wd/git/u-boot/work/include -I /home/wd/git/u-boot/work/lib/libfdt -I /home/wd/git/u-boot/work/tools -DCONFIG_SYS_TEXT_BASE=0x01000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o img2srec img2srec.o strip img2srec
...
Quoted 1 line
Not many hints here though :-(
Something in your host system appears to be broken.
I've tested both on 32 bit (gcc-4.6.0-9.fc15.i686) and 64 bit (gcc-4.6.0-9.fc15.x86_64) systems, without seeing any such problems.
Sorry...
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. - Dick Brandon