mpd@amd64

Peter Wemm peter at wemm.org
Tue Dec 28 15:26:48 PST 2004


On Tuesday 28 December 2004 02:39 pm, Archie Cobbs wrote:
> Peter Wemm wrote:
> >>Attached is a slightly different patch.  This is against the source
> >>currently in ports, and it fixes two additional questionable uses
> >> of va_start ().
> >
> > Just as a BTW; powerpc platforms need this series of changes too,
> > not just amd64.
>
> Thanks.. this change should work for all.
>
> > BTW2:  I wonder if some of the attached changes really could be
> > done more simply with va_copy()...  Not that it matters of course.
>
> Probably.. that's new though? No va_copy() on 4.x.

Yes, its formerly part of C99, but gcc has had it for a while.  In 
gcc-2.95 it is implemented in the gnu version of stdarg.h as 
__va_copy(), but we neglected to add it to our includes in 4.x:

default implementation:
gcc/ginclude/stdarg.h:#define __va_copy(dest, src) (dest) = (src)
gcc/ginclude/varargs.h:#define __va_copy(dest, src) (dest) = (src)

platform override for ppc:
gcc/ginclude/va-ppc.h:#define __va_copy(dest, src) *(dest) = *(src)

The same variation for ppc there would work for amd64 as well.  I have 
run into quite a number of ports that have this knowledge built in so 
that they can compile on ppc with older gcc's without the includes.

Anyway, never mind. :-)

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


More information about the freebsd-amd64 mailing list