Re: some ports are broken after upgrading GCC 3.3.1

2003-07-18 Thread Terry Lambert
Alexander Kabaev wrote:
 On Thu, 17 Jul 2003 14:02:20 -0700
 Kris Kennaway [EMAIL PROTECTED] wrote:
 
  Sorry, I missed the patch in your email.  I'm not certain about your
  approach...can someone who understands the issues comment on it?
 
 I'd rather see all varargs.h consumers be converted to stdarg.h. Old
 varargs GCC builtins were _removed_ altogether from the compiler sources
 and we should follow.

I've posted cdefs.h patches several times that allow you to
switch between implementations.  Now that ANSI C is default
in FreeBSD, they probably aren't necessary, but it's pretty
obvious how to implement it, if you think you need it (the
biggie is dealing with the ... in the prototype).

If you need them for FreeBSD, and don't want to work it out,
let me know.

-- Terry
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: some ports are broken after upgrading GCC 3.3.1

2003-07-17 Thread Motoyuki Konno
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:


[EMAIL PROTECTED] % 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__)));
 
 #defineva_alist__builtin_va_alist
+#if __GNUC__ == 3  __GNUC_MINOR__ = 3
+#defineva_dcl  __builtin_va_alist_t __builtin_va_alist;
+#else
 #defineva_dcl  __builtin_va_alist_t __builtin_va_alist; ...
+#endif
 #defineva_start(ap)__builtin_varargs_start(ap)
 #defineva_arg(ap, type)__builtin_va_arg((ap), type)
 #defineva_end(ap)  __builtin_va_end(ap)


--

Motoyuki Konno  [EMAIL PROTECTED] (Home)
[EMAIL PROTECTED]  (FreeBSD Project)
http://www.freebsd.org/~motoyuki/ (WWW)

Shin-ichi YOSHIMOTO [EMAIL PROTECTED] 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 ?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: some ports are broken after upgrading GCC 3.3.1

2003-07-17 Thread Kris Kennaway
On Fri, Jul 18, 2003 at 12:11:39AM +0900, Motoyuki Konno wrote:
 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.

This is a known problem.  Can you develop a fix?

Kris


pgp0.pgp
Description: PGP signature


Re: some ports are broken after upgrading GCC 3.3.1

2003-07-17 Thread Kris Kennaway
On Thu, Jul 17, 2003 at 01:59:46PM -0700, Kris Kennaway wrote:
 On Fri, Jul 18, 2003 at 12:11:39AM +0900, Motoyuki Konno wrote:
  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.
 
 This is a known problem.  Can you develop a fix?

Sorry, I missed the patch in your email.  I'm not certain about your
approach...can someone who understands the issues comment on it?

Kris




pgp0.pgp
Description: PGP signature


Re: some ports are broken after upgrading GCC 3.3.1

2003-07-17 Thread Alexander Kabaev
On Thu, 17 Jul 2003 14:02:20 -0700
Kris Kennaway [EMAIL PROTECTED] wrote:
 
 Sorry, I missed the patch in your email.  I'm not certain about your
 approach...can someone who understands the issues comment on it?
 
 Kris
 
I'd rather see all varargs.h consumers be converted to stdarg.h. Old
varargs GCC builtins were _removed_ altogether from the compiler sources
and we should follow.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: some ports are broken after upgrading GCC 3.3.1

2003-07-17 Thread Kris Kennaway
On Thu, Jul 17, 2003 at 11:37:17PM -0400, Alexander Kabaev wrote:
 On Thu, 17 Jul 2003 14:02:20 -0700
 Kris Kennaway [EMAIL PROTECTED] wrote:
  
  Sorry, I missed the patch in your email.  I'm not certain about your
  approach...can someone who understands the issues comment on it?
  
  Kris
  
 I'd rather see all varargs.h consumers be converted to stdarg.h. Old
 varargs GCC builtins were _removed_ altogether from the compiler sources
 and we should follow.

Can you develop a patch for e.g. 

http://bento.freebsd.org/errorlogs/i386-5-latest/ecu-4.30.log

and post it to the thread Fixing gcc 3.3 compile failures so others
can see how to do it?

Kris


pgp0.pgp
Description: PGP signature