ports/172209: devel/avr-gbd fails to build using clang
Miklos Magyari
magyarimiki at gmail.com
Mon Oct 1 13:50:01 UTC 2012
>Number: 172209
>Category: ports
>Synopsis: devel/avr-gbd fails to build using clang
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 01 13:50:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Miklos Magyari
>Release: 9.0-RELEASE
>Organization:
>Environment:
FreeBSD mira 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
devel/avr-gbd fails to build using clang:
[...snip...]
/bin/sh ./libtool --tag=CC --mode=compile clang -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_bfd_elf32_avr_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -O2 -pipe -fno-strict-aliasing -MT bfdio.lo -MD -MP -MF .deps/bfdio.Tpo -c -o bfdio.lo bfdio.c
libtool: compile: clang -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_bfd_elf32_avr_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -O2 -pipe -fno-strict-aliasing -MT bfdio.lo -MD -MP -MF .deps/bfdio.Tpo -c bfdio.c -o bfdio.o
bfdio.c:580:31: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror,-Wsizeof-pointer-memaccess]
memset (statbuf, 0, sizeof (statbuf));
~~~~~~~ ^~~~~~~
1 error generated.
gmake[4]: *** [bfdio.lo] Error 1
gmake[4]: Leaving directory `/work/a/ports/devel/avr-gdb/work/gdb-7.3.1/bfd'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/work/a/ports/devel/avr-gdb/work/gdb-7.3.1/bfd'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/work/a/ports/devel/avr-gdb/work/gdb-7.3.1/bfd'
gmake[1]: *** [all-bfd] Error 2
gmake[1]: Leaving directory `/work/a/ports/devel/avr-gdb/work/gdb-7.3.1'
gmake: *** [all] Error 2
*** Error code 1
Stop in /a/ports/devel/avr-gdb.
>How-To-Repeat:
# cd /usr/ports/devel/avr-gdb
# make
>Fix:
patch to the port Makefile:
--- Makefile.orig 2012-10-01 15:45:38.000000000 +0200
+++ Makefile 2012-10-01 15:26:38.000000000 +0200
@@ -22,6 +22,8 @@
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --target=avr --program-prefix=avr --disable-nls
+CFLAGS+= -Wno-unused-value
+
pre-configure:
cd ${WRKSRC} ; ${RM} -rf dejagnu expect tcl texinfo
another patch in needed under files/ :
a# cat files/patch-bfd::bfdio.c
--- bfd/bfdio.c.orig 2012-10-01 15:32:52.000000000 +0200
+++ bfd/bfdio.c 2012-10-01 15:28:13.000000000 +0200
@@ -577,7 +577,7 @@
{
struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
- memset (statbuf, 0, sizeof (statbuf));
+ memset (statbuf, 0, sizeof (struct stat));
statbuf->st_size = bim->size;
return 0;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list