[head tinderbox] failure on arm/arm

Ruslan Ermilov ru at freebsd.org
Sun Nov 12 14:46:19 UTC 2006


On Sun, Nov 12, 2006 at 03:27:10PM +0100, Stefan Farfeleder wrote:
> On Sun, Nov 12, 2006 at 05:00:10PM +0300, Ruslan Ermilov wrote:
> > On Sun, Nov 12, 2006 at 08:39:29AM -0500, FreeBSD Tinderbox wrote:
> > > >>> stage 4.2: building libraries
> > > [...]
> > > cc -O2 -pipe  -I/obj/arm/src/lib/libelf -I/src/lib/libelf -DLIBELF_TEST_HOOKS=1 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /src/lib/libelf/elf_getident.c
> > > cc -O2 -pipe  -I/obj/arm/src/lib/libelf -I/src/lib/libelf -DLIBELF_TEST_HOOKS=1 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /src/lib/libelf/elf_hash.c
> > > cc -O2 -pipe  -I/obj/arm/src/lib/libelf -I/src/lib/libelf -DLIBELF_TEST_HOOKS=1 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /src/lib/libelf/elf_kind.c
> > > cc -O2 -pipe  -I/obj/arm/src/lib/libelf -I/src/lib/libelf -DLIBELF_TEST_HOOKS=1 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /src/lib/libelf/elf_memory.c
> > > cc -O2 -pipe  -I/obj/arm/src/lib/libelf -I/src/lib/libelf -DLIBELF_TEST_HOOKS=1 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /src/lib/libelf/elf_next.c
> > > cc -O2 -pipe  -I/obj/arm/src/lib/libelf -I/src/lib/libelf -DLIBELF_TEST_HOOKS=1 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /src/lib/libelf/elf_rand.c
> > > /src/lib/libelf/elf_rand.c: In function `elf_rand':
> > > /src/lib/libelf/elf_rand.c:47: warning: cast increases required alignment of target type
> > > *** Error code 1
> > > 
> > > Stop in /src/lib/libelf.
> > > *** Error code 1
> > > 
> > This looks like a GCC bug to me.  The following code snippet,
> > when compiled on FreeBSD/arm, causes a -Wcast-align warning
> > which doesn't look right:
> > 
> > %%%
> > $ cat a.c
> > struct foo {
> > 	char x;
> > };
> > 
> > struct foo *
> > bubu(char *s)
> > {
> > 
> > 	return (struct foo *)s;
> > }
> > $ cc -c -Wcast-align a.c
> > a.c: In function `bubu':
> > a.c:9: warning: cast increases required alignment of target type
> > %%%
> > 
> > (None of other supported architecutes see the issue here.)
> 
> What is sizeof(struct foo)?  If it's > 1 it makes sense.
> 
Yes, it's four bytes on ARM.  But why?


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-tinderbox/attachments/20061112/ff9cdc56/attachment.pgp


More information about the freebsd-tinderbox mailing list