some ports are broken after upgrading GCC 3.3.1
Motoyuki Konno
motoyuki at bsdclub.org
Thu Jul 17 08:11:42 PDT 2003
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 at 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 at bsdclub.org (Home)
motoyuki at FreeBSD.ORG (FreeBSD Project)
http://www.freebsd.org/~motoyuki/ (WWW)
Shin-ichi YOSHIMOTO <yosimoto at 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 ?
More information about the freebsd-ports
mailing list