From owner-freebsd-arch@FreeBSD.ORG Wed Feb 20 15:59:45 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7303B863 for ; Wed, 20 Feb 2013 15:59:45 +0000 (UTC) (envelope-from damjan.jov@gmail.com) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) by mx1.freebsd.org (Postfix) with ESMTP id D234AE1F for ; Wed, 20 Feb 2013 15:59:44 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id er20so7757847lab.4 for ; Wed, 20 Feb 2013 07:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=OFTq7Afd6aHqX7pbtMXoDnLJbjkm1aHqdmplHTqYZPg=; b=eYeKSR6coU7hXolrTrlOaP4grw59purtk8qoCEHYiNaAeNF1AWeQu8AS/Q9GTD2NFU NuUVbklyI+dvWfGEf4T9CRGHAk6HiaNNuIBQsCdEk7k+dovSXvZghS1kySKD6zYDujys 3Z56Jd/JebLWcCFsSAYTboCZvQO8X4Q8pyj9w1qWEg1XQMSrO46h9NabuRdGkIGHuEFr b3yWsXpwlt/e/+hs943+VMk160UHEkpExqjalnsXGMv2kmN1V4gyqG5mu9EI6+Di7l5h KleRU8ieZ65ZbbpshzFF0WNSZkKbepkwer7qq06c1fqpmGiAjlp+pI4f5Tbv3v0RsWzr yOgg== X-Received: by 10.152.108.203 with SMTP id hm11mr18098037lab.4.1361375983816; Wed, 20 Feb 2013 07:59:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.20.138 with HTTP; Wed, 20 Feb 2013 07:59:23 -0800 (PST) In-Reply-To: <20120223171210.GB79013@zim.MIT.EDU> References: <201202061916.45998.tijl@coosemans.org> <20120223171210.GB79013@zim.MIT.EDU> From: Damjan Jovanovic Date: Wed, 20 Feb 2013 17:59:23 +0200 Message-ID: Subject: Re: amd64 cc -m32 support and headers project branch To: Tijl Coosemans , freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 15:59:45 -0000 On Thu, Feb 23, 2012 at 7:12 PM, David Schultz wrote: > On Mon, Feb 06, 2012, Tijl Coosemans wrote: >> After a hiatus of almost a year I'd like to continue with merging i386 >> and amd64 headers to get "cc -m32" working on amd64. Previously I tried >> to fix any problems with the headers first before merging, but this turned >> out to be a long tedious process. So, because lack of -m32 support is >> blocking other development I'd like to just merge a minimal set of >> headers without any macro/type definition changes or other >> reorganisations. The result will be similar to existing powerpc and mips >> headers which already support both 32 and 64 bit. >> >> When that's done I can create a development branch to work on the >> problems that have come up. Possible goals for such a branch are: >> >> - Fix inconsistencies such as types defined in sys/ and their limits >> in machine/. Also, sometimes the limits don't have the correct type. >> - For types/limits defined under machine/ there is a lot of duplication >> between architectures. Try to move some to sys/. >> - Try to make headers compiler agnostic; limit use of __attribute__, >> __builtin_* to a single file. >> - Maybe remove support for gcc 2.*. The oldest version in ports is 3.4 >> and I suspect some headers don't compile anymore with gcc 2.*. >> - Add support for new compiler attributes/built-ins. >> - Add missing POSIX prototypes, maybe commented out with /* UNIMPL ... */ >> or similar so they can be grepped. >> - The gcc ports currently patch some system headers where they think >> something is non-standard. These patched headers override the system >> headers which means you have to rebuild these ports whenever you do >> installworld to make sure they contain the latest changes. Some headers >> are trivial to fix, others less so. >> >> >> If there are no objections, I'd like to start with the -m32 work in >> a week or so. > > This sounds like it could degenerate into an error-prone ifdef > hell. Wouldn't it be much easier to just have a /usr/include32 > directory? But we don't have include32 for any other architecture. And how would it be implemented, compiler magic or #ifdef __LP64__ ..... #else #include <../include32/myself.h> #endif? On a possibly unrelated note, please let's try avoid the colossal fail that Debian's/Ubuntu's "multiarch" ideas has become, where they succeeded in separating 32 and 64 bit libraries into /usr/lib/i386-linux-gnu and /usr/lib/x86_64-linux-gnu, only to fail at doing the same for /usr/include, causing you to be able to parallel install the 32 and 64 bit binary versions of a package, but not the 32 and 64 bit development packages...