From owner-svn-src-all@FreeBSD.ORG Thu May 29 05:18:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B996C80 for ; Thu, 29 May 2014 05:18:03 +0000 (UTC) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C65ED2CA3 for ; Thu, 29 May 2014 05:18:02 +0000 (UTC) Received: by mail-pb0-f45.google.com with SMTP id um1so12396285pbc.4 for ; Wed, 28 May 2014 22:18:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=y0bUQ3thDqAOIYnnyWSeJAwQy2nqj7YbnGgo2VdFmbE=; b=WQbmkxMsd6D7sGYe8iSa5vOFewQrAbcEeqZjKRet3IX/KZ0SzqRBMG+dJ/nC8oc9IY OG1dhr5rM3usxnSfaBxMAYtb8LQGrxLFp/SkztHLJyUDRHIszxPJdWRiXi1AyDBdTT/4 VjH5KTI3NvMZ2ZqeKGQuM0V1kmNZP3S9x6661Fgdl8tZ7fPJM6S/1OtJeJRCv/ZWfWZS 5U2ZuR056BUtBPCr4cvQJ0fBOk3jAuc8NdIpHPjSD2GbFr7MssjnTBxDG4x83NjfaAhg uCfpUiQjtqJ7DmLsf79/EnkvZ1KCXPzQHqmyYlOxN6relEcAOLmXSty/EwY93AajWLbP 2I2A== X-Gm-Message-State: ALoCoQlIDsOS5fr7SMb3UiCCL8ErLQd0G7E1yMty3lpN/7HhBF9yTdG/h9IgMGc5DzFwmx33QpmZ X-Received: by 10.68.191.39 with SMTP id gv7mr5716528pbc.90.1401340681557; Wed, 28 May 2014 22:18:01 -0700 (PDT) Received: from lgmac-rtangirala.corp.netflix.com (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id au4sm31256950pbc.10.2014.05.28.22.17.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 22:18:00 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_754AA036-3FBC-4A8A-8520-DE04FB774F76"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: svn commit: r266553 - head/release/scripts From: Warner Losh In-Reply-To: <5386C289.5030007@freebsd.org> Date: Wed, 28 May 2014 23:18:18 -0600 Message-Id: <5ADEEFAD-6374-4E1B-BF11-EED8BA882BC8@bsdimp.com> References: <20140527093633.0a922e13@kalimero.tijl.coosemans.org> <85FABD2B-81BB-4E1A-B61E-4216A144A9DB@bsdimp.com> <20140527214038.17d00369@kalimero.tijl.coosemans.org> <13EB325C-3882-46AA-9B17-3BF19997C978@bsdimp.com> <20140528125027.6d0cc4fb@kalimero.tijl.coosemans.org> <5E038619-5921-4B7A-A4EE-D1E83614934B@bsdimp.com> <20140528152820.GA3991@kib.kiev.ua> <20140528154728.GB3991@kib.kiev.ua> <20140529015330.GG3991@kib.kiev.ua> <5386C289.5030007@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1878.2) Cc: Baptiste Daroussin , src-committers@freebsd.org, Ian Lepore , Glen Barber , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Konstantin Belousov , Tijl Coosemans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 05:18:03 -0000 --Apple-Mail=_754AA036-3FBC-4A8A-8520-DE04FB774F76 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On May 28, 2014, at 11:15 PM, Nathan Whitehorn = wrote: > On 05/28/14 18:53, Konstantin Belousov wrote: >> On Wed, May 28, 2014 at 01:53:28PM -0600, Warner Losh wrote: >>> On May 28, 2014, at 9:47 AM, Konstantin Belousov = wrote: >>>=20 >>>> On Wed, May 28, 2014 at 09:35:27AM -0600, Warner Losh wrote: >>>>> On May 28, 2014, at 9:28 AM, Konstantin Belousov = wrote: >>>>>=20 >>>>>> On Wed, May 28, 2014 at 08:26:58AM -0600, Warner Losh wrote: >>>>>>> Then we disagree on this point. However, the disagreement here = is >>>>>>> kinda foundational: to build a set of libraries or sys root, you = have >>>>>>> to have a MACHINE_ARCH to make it work. Even in our current = system, we >>>>>>> set MACHINE_ARCH to i386 or powerpc when building the 32-bit = binaries >>>>>>> (note: we don?t do this for mips). This means that if we do grow = x32 >>>>>>> support, we?ll need to grow a MACHINE_ARCH for it. That?s my = point: >>>>>>> all ABIs have MACHINE_ARCH associated with them, and those are = the >>>>>>> names users are used to specifying, and are the ones that are = the most >>>>>>> natural for script writers to use. With nathan?s patches, we?re = to the >>>>>>> point where those are used, though there?s also the option of = using >>>>>>> the non-standard names if you want (e.g. amd64:32 instead of = x32). >>>>>>>=20 >>>>>> I am not sure if this comment would add anything to the = discussion, >>>>>> but other build systems do not require MACHINE_ARCH. In our = terms, >>>>>> other build systems are happy to build: >>>>>> i386 binary when MACHINE is amd64 and CFLAGS contains -m32; >>>>>> x32 binary when MACHINE is amd64 and CFLAGS contains -mx32. >>>>>>=20 >>>>>> For HEAD and stable/10 we finally reached the point where -m32 = works, >>>>>> on amd64; it worked on powerpc64 from inception, AFAIU Nathan. At = least >>>>>> this is true for dependencies limited to the base system, and not = to the >>>>>> ports (the later is since ports do not know about multiarch). >>>>>>=20 >>>>>> It is limitation of our build that we require MACHINE_ARCH to = build >>>>>> other natively supported ABI binary on the host. Ideally, the = hacks that >>>>>> treat lib32 build as the cross-compilation would go away = eventually. >>>>> I doubt it. The MACHINE_ARCH is used to select which files to = build. >>>> Do I understand you right that the comment references e.g. a = selection >>>> of arch-specific subdir in lib/libc or libexec/rtld-elf for = inclusion >>>> into the build ? If yes, I cannot disagree with the statement. >>> As far as I can tell, that?s the only reason we?re doing it.. But = it is a critically important reason... >>>=20 >>>> My note was about our build system which currently requires >>>> full-fledged cross-build to even create i386 binary on amd64 vs. = other >>>> builds which consider this as a (often minor) variations of the = host >>>> target. Sure, some variances must be allowed, e.g. to select proper = .S >>>> file for the ABI, but we do not need cross-build to get i386 on = amd64. >>> lib32 uses -m32 and some other flags to achieve its ends. So it = doesn?t create a full i386 compiler, etc. It just uses the amd64 one = with special flags/args. So I don?t think it requires a full-fledged = cross-build environment, or I misunderstand what you mean by that = phrase. >> We install the headers for the MACHINE_ARCH into the compat32 build = tree, >> and use them instead of the target MACHINE headers. The fact that >> -m32 works as the cross-compiler just saves the build >> time. >=20 > Ah, OK. That's probably pointless most of the time now. It was always = pointless on PowerPC and MIPS, since they share the same headers anyway, = and is probably also now unnecessary on x86 now that regular -m32 works. = I don't think ia64 builds lib32 (which would require a real = cross-compiler). Yea, this is an area that can likely be cleaned up from the original = gross hacks that were necessary before -m32 actually worked. Warner --Apple-Mail=_754AA036-3FBC-4A8A-8520-DE04FB774F76 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJThsMaAAoJEGwc0Sh9sBEAeWcQAKS4rkvEXWmO1xnprW8TLGRd x95CU5yTjae5HzUx45GHdbEzA8vDe8C+zh0yaiJCES4IQgbo5I0PWyADBPtyMokc IhyDSVIQs3azPIMclGiC94/aO+aD2/M4KHEfBV7gHaRlwkOhJ1Ui91bSc0YjKVRI B8DVhpHm91wy/X0PaohiYxF1PtbzNyRwvD268LzxrvbIatxTRNMMuCcquHdG7RaA Vw4WidLwod+BKsqO58oP0/Zuu5z3YSYwzHtbxoxAf7WM6mf3x7LTBnG0cEeF470Z 8e7Y7bXBvQPeqc5pOdiYTV9lutbXOMwdAblq9s2xxXYIJjBiIdIciTo69PBIiQqm sWSNtcGvDGd7umSg393EKpBPlCw+65zUGeJ+8+Q/VYZEIzqLl0VCvUpjVVjnU73D 8dIG13XHcufXeHrgk/M1jumciNhwTCH6B6p4VJrxR7ie38T21LtbITfiGY/J6ttP oy5/9jaatHgRfdEIbKAdmfBhznRML6+VsH54nvMfkVF4zFi4saMMciyl5SWidaEl 8qALWwAWb7o5MtGGN7DH5A0CZI3n1fvm1pMcZ4xkvqwe9b5e365nn0VQ75ee+09y eQMDwoMDLmjDXc0EoKTcGnSX7vLfFvsVACjm5vo/vdOr3ooIQqIR0BoL4Hdp5qic TGMbKX51iB8kLpWrfAcJ =J+lU -----END PGP SIGNATURE----- --Apple-Mail=_754AA036-3FBC-4A8A-8520-DE04FB774F76--