Date: Fri, 18 Jul 2003 00:11:39 +0900 From: Motoyuki Konno <motoyuki@bsdclub.org> To: Shin-ichi YOSHIMOTO <yosimoto@waishi.jp> Cc: freebsd-ports@freebsd.org Subject: Re: some ports are broken after upgrading GCC 3.3.1 Message-ID: <200307171511.h6HFBdPa000471@mail.mk.bsdclub.org> References: <20030713010957.2181af46.yosimoto@waishi.jp> <20030717092556.70a96dc9.yosimoto@waishi.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Add Cc: to -current list. This seems to be "varargs.h" problem. It seems that all C source which use varargs.h and va_dcl become error on GCC 3.3.1 system. Please try compiling following varargs.h sample program. -------- #include <varargs.h> void test(va_alist) va_dcl { va_list args; char *fmt; va_start(args); fmt = va_arg(args,char *); va_end(args); } -------- The result is as follows: -------- motoyuki@sakura[38] % cc -c varargs_test.c varargs_test.c: In function `test': varargs_test.c:3: error: syntax error before '...' token varargs_test.c:8: error: syntax error before "__builtin_varargs_start" -------- I think following patch to /usr/include/varargs.h is needed to solve this problem. ---- --- varargs.h.orig Thu May 15 09:57:11 2003 +++ varargs.h Fri Jul 18 00:10:23 2003 @@ -55,7 +55,11 @@ typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); #define va_alist __builtin_va_alist +#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 +#define va_dcl __builtin_va_alist_t __builtin_va_alist; +#else #define va_dcl __builtin_va_alist_t __builtin_va_alist; ... +#endif #define va_start(ap) __builtin_varargs_start(ap) #define va_arg(ap, type) __builtin_va_arg((ap), type) #define va_end(ap) __builtin_va_end(ap) ---- -- ------------------------------------------------------------------------ Motoyuki Konno motoyuki@bsdclub.org (Home) motoyuki@FreeBSD.ORG (FreeBSD Project) http://www.freebsd.org/~motoyuki/ (WWW) Shin-ichi YOSHIMOTO <yosimoto@waishi.jp> wrote: > Subject: some ports are broken after upgrading GCC 3.3.1, > On Sun, 13 Jul 2003 01:09:57 +0900, Shin-ichi YOSHIMOTO wrote: > > ** The following packages were not installed or upgraded (*:skipped / !:fai led) > > ! graphics/libungif (libungif-4.1.0b1) (bad C++ code) > > ! x11-servers/XFree86-4-Server (XFree86-Server-4.3.0_8) (unknown bu ild error) > > ! x11/XFree86-4-clients (XFree86-clients-4.3.0_2) (coredump) > > XFree86-4-Server and XFree86-4-clients are fine, but libungif is still bad, > > [snip] > /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -O -pip e -march=pentium4 -I/usr/X11R6/include -c qprintf.c > rm -f .libs/qprintf.lo > cc -DHAVE_CONFIG_H -I. -I. -I.. -O -pipe -march=pentium4 -I/usr/X11R6/include -c qprintf.c -fPIC -DPIC -o .libs/qprintf.lo > qprintf.c: In function `GifQprintf': > qprintf.c:38: error: syntax error before '...' token > qprintf.c:43: error: syntax error before "__builtin_varargs_start" > *** Error code 1 > > Any idea ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307171511.h6HFBdPa000471>