From owner-freebsd-current@FreeBSD.ORG Thu Oct 18 14:50:35 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC3916A41B for ; Thu, 18 Oct 2007 14:50:35 +0000 (UTC) (envelope-from wearabnet@yahoo.ca) Received: from web33707.mail.mud.yahoo.com (web33707.mail.mud.yahoo.com [68.142.201.204]) by mx1.freebsd.org (Postfix) with SMTP id D8DFC13C44B for ; Thu, 18 Oct 2007 14:50:34 +0000 (UTC) (envelope-from wearabnet@yahoo.ca) Received: (qmail 56941 invoked by uid 60001); 18 Oct 2007 14:50:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jZVSmAXaouYnxUO35jHnThfzBYnObUym4ZiQINC+8WvpaIZQV7OH8PsuYsUt293O0/1eO6iwXHa3wYastEyfelPAFgLY2DjQe7vN5I+9415tqHlodwAOdT3Bu7njI6zzNG+CdCSlgoJ5cFNxcc1c59GOhWoDYX14N+Vc+/QezcQ=; X-YMail-OSG: 0Zkc5XsVM1lFp1MNpKQhD4Z.MfUnuc9OPV_EsMPhqyk6SsP0aAfxRbUAFh9dQQrtrLWOUw3mRaW.lrPqM.VjpL37go0Vob0guxbRXFs_nu_RR9ksDEs- Received: from [86.62.225.4] by web33707.mail.mud.yahoo.com via HTTP; Thu, 18 Oct 2007 07:50:33 PDT X-Mailer: YahooMailRC/814.05 YahooMailWebService/0.7.134.12 Date: Thu, 18 Oct 2007 07:50:33 -0700 (PDT) From: Abdullah Ibn Hamad Al-Marri To: Ed Schouten MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <766820.55482.qm@web33707.mail.mud.yahoo.com> Cc: FreeBSD Current Subject: Re: PCC and FreeBSD in the future? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 14:50:35 -0000 ----- Original Message ----=0A> From: Ed Schouten =0A> To: Abdul= lah Ibn Hamad Al-Marri =0A> Cc: FreeBSD Current =0A> Sent: Wednesday, October 17, 2007 9:27:58 PM=0A>= Subject: Re: PCC and FreeBSD in the future?=0A> =0A> * Ed Schouten wrote:= =0A> > One of the major obstacles for PCC is that it didn't support a way t= o=0A> > pack structures in a comfortable way. Most of the FreeBSD=0A> userl= and=0A> =0A just=0A> > built with it. Most of the stuff that didn't compile= properly, was=0A> > related to kernel headers, using __attribute__ stuff, = instead of the=0A> > cdef'd stuff, like __packed. It seems things have chan= ged in the mean=0A> > time.=0A> =0A> Indeed; PCC now supports _Pragma("pack= ed"). I've attached a patch for=0A> sys/cdefs.h that should make at least s= rc/bin compile like it should.=0A> The patch is in no way meant to be compl= ete.=0A> =0A> -- =0A> Ed Schouten =0A> WWW: http://g-rave.nl/=0A> =0A> = =0A> -----Inline Attachment Follows-----=0A> =0A> --- src/sys/sys/cdefs.h = 2006-09-21 03:38:58.000000000 +0200=0A> +++ src/sys/sys/cdefs.h 2007-1= 0-17 19:56:42.000000000 +0200=0A> @@ -111,7 +111,7 @@=0A> /*=0A> * Macro= to test if we're using a specific version of gcc or later.=0A> */=0A> -#= if defined(__GNUC__) && !defined(__INTEL_COMPILER)=0A> +#if defined(__GNUC_= _) && !defined(__INTEL_COMPILER)=0A> &&=0A> =0A !defined(__PCC__)=0A> #def= ine __GNUC_PREREQ__(ma, mi) \=0A> (__GNUC__ > (ma) || __GNUC__ = =3D=3D (ma) && __GNUC_MINOR__ >=3D (mi))=0A> #else=0A> @@ -140,7 +140,7 @@= =0A> #define __const const /* define reserved names=0A> t= o=0A> =0A standard */=0A> #define __signed signed=0A> #define __= volatile volatile=0A> -#if defined(__cplusplus)=0A> +#if defined(__cplus= plus) || defined(__PCC__)=0A> #define __inline inline /* conv= ert to C++ keyword */=0A> #else=0A> #if !(defined(__CC_SUPPORTS___INLINE)= )=0A> @@ -221,6 +221,15 @@=0A> #define __aligned(x) __attribute__((__al= igned__(x)))=0A> #define __section(x) __attribute__((__section__(x)))= =0A> #endif=0A> +#if defined(__PCC__)=0A> +#define __dead2=0A> +#define __= pure2=0A> +#define __unused=0A> +#define __used=0A> +#define __packed _P= ragma("packed")=0A> +#define __aligned(x)=0A> +#define __section(x)=0A> +#e= ndif=0A> #endif=0A> =0A> #if __GNUC_PREREQ__(2, 96)=0A=0AVery interestin= g, I just noticed David O'Brien is the maintainer of the pcc port in the Fr= eeBSD ports, and it was added in Sep, 17, 07, so I think FreeBSD is very in= terested on it ;)=0A=0A ---=0ARegards, =0A-Abdullah Ibn Hamad Al-Marri=0AAr= ab Portal=0Ahttp://www.WeArab.Net/=0A=0A=0A=0A=0A=0A_______________________= ___________________________=0ADo You Yahoo!?=0ATired of spam? Yahoo! Mail = has the best spam protection around =0Ahttp://mail.yahoo.com