From owner-freebsd-toolchain@freebsd.org Fri Jan 3 10:35:04 2020 Return-Path: Delivered-To: freebsd-toolchain@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07D841ED92F for ; Fri, 3 Jan 2020 10:35:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-21.consmr.mail.gq1.yahoo.com (sonic301-21.consmr.mail.gq1.yahoo.com [98.137.64.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47q1WB4zgsz3BnZ for ; Fri, 3 Jan 2020 10:35:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: z3J9ZlUVM1lvNDj60HXH5QK4ld3yhWT2aM8Vb5abyAZ3kAeoMTehAQvTce0rQzk X8CHW3EF3c4pq1Bwdd2oIlsY_QGluHc70Nf1Kq05wBh9T38MQRV_gpiY9S_.u60X6A3xdprs_QHY IjCoNM_HuHJVoC.kWtZ8NCtxJl7kf.NGSiEVaMrMOrfKI7Lh3Sny1O.NNgOYpY8ph3rIHD9aDRHE 4AZmhEze0BCSmu0mpDLydpZuwUhztqHYy1PjiC4sUD8keM8A3h00IYa57bQSkjwFiV7aPKJS7MkE I7wa21rONO7rwLZU576xdtg9o37tbDGme0noCgW10RCKMMq3GqCVK42vMHg3Cgm8qIrDCw26zItl ttdkcDH4WtH._atN9TPQraZkfyEaCrm1h5ZdN38EIihC_PA.jOmsnQ_Fd7qbzqW3AUUgGvColUKq 7_mu.YoMJg2mYZJ370sGGWbtxfGlFEGboP3QCwHYp38BaUPtgb1nOanc4kYcFybQKUlVuI2LJnmH KrwRk3DnxSzAt1wllqsxgFjk7XAxA7k5EUYajwE3h.L5GTNVIA7NNiG8zKG2dzuYQV0gFfZimZbM Iw.KNTvBZIWI31wVxTVDlM2UQFYr0VN0.9fIDMMSLxgNHtAUDjIwF3iloMd_tbKmO_WopluzRe8. iLhkWoD.QHhhQkuAZ5SM.DJNTkcIccF_V82_nnCOaUGqxHrVvRYtlkod6qMK.AKUIihwLwAHFbO9 MC30izMAQZB2I1BdJcE4VkzEJG_EKf0KUJBOMCqfvD4cRgbBaSo7Os4DBhfTRV7liySVRFKZQg_T gSYkDCji42zEVOXJvwtMPwcu9oA4Jpd9Pxw9UyDBe4woSfi_gU_rWw..tCENRNvHU0Ym4vSan8Bk 59OwuJRN0dUOZt7eeH9vH6wzn3cqQ_QRk.BgyCpL2nRPnQuG98.yYx00hU4O8HBc3BWzJACepTlu yYMjHI9ivaI4rZZnHJsoUEHhOI7NNrZKmKKzXu8uYikIVV3KweaYfuK2qmiGUKp0ueLwYra1w37k xW2zTnBh3TSyPGrcbEYjScKWwuTIDbinKvvQB2wOIlDs6.WOoV4r416wGo60Z5nT.m_SWHjzDDVy DoKFs3E9_OH4Jm_qzB1mD4BBH_7wCP7R7mfWr.ym6WrtOM_z1DmUZAEoPrWDP_qRmjXCGC6zJVxH CZD11a88T2gUSUjSs5a4jrikIY76L5p3MV2zcpUsYmQt_fiH.K7l7qH8nVGQ6oeOgICeY_NVi7Sl LCdBDwcROl5G6jPORmPFaZiGAEILzFrRVbbACEG0J9hcP7xgW0q_F.7kRiuyZKKI2XzTeyH.M3CS PQYHBHAe5XC8.UxAzAvdMxLkS.qkerEhflBjGhkbJHZ.ZL8JHinU_y5wXWwJzkmrpC_TOqhOOotS dY7X4ooPvf2kIqwNHSHPDJO7RB1V4N574EHplXr5V Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Fri, 3 Jan 2020 10:35:00 +0000 Received: by smtp430.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c999ce3654d1cbc9969140fa1871acef; Fri, 03 Jan 2020 10:34:58 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: svn commit: r356289 - head Message-Id: Date: Fri, 3 Jan 2020 02:34:56 -0800 Cc: FreeBSD Toolchain To: John Baldwin , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.40.2.2.4) References: X-Rspamd-Queue-Id: 47q1WB4zgsz3BnZ X-Spamd-Bar: - X-Spamd-Result: default: False [-1.23 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.39)[-0.389,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.34)[-0.337,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[147.64.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (5.65), ipnet: 98.137.64.0/21(0.88), asn: 36647(0.70), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jan 2020 10:35:04 -0000 John Baldwin jhb at FreeBSD.org wrote on Thu Jan 2 21:41:07 UTC 2020 : > On 1/2/20 1:34 PM, John Baldwin wrote: > > Author: jhb > > Date: Thu Jan 2 21:34:44 2020 > > New Revision: 356289 > > URL: https://svnweb.freebsd.org/changeset/base/356289 > >=20 > > Log: > > Look for cross toolchain makefiles in /usr/share/toolchains. > > =20 > > The freebsd-binutils and freebsd-gcc* packages install toolchain > > makefiles to /usr/share/toolchains rather than LOCALBASE. >=20 > The short version is that you can do something like this to use GCC > as the system compiler (/usr/bin/cc): >=20 > cd /usr/ports/base/binutils ; make install clean > cd ../gcc6 ; make install clean >=20 > Then 'make CROSS_TOOLCHAIN=3Dfreebsd-gcc6 buildworld', etc. If you = aren't > planning on doing cross-builds you can set CROSS_TOOLCHAIN in = /etc/src.conf. >=20 > As described elsewhere, the base/* packages can be cross-built (along > with pkg), so for any architectures not yet using clang we could = fairly > easily provide a cross-built package repo (though that architecture = list > is becoming rather small). I will probably add a base/gcc9 port once = we > can build a full system with gcc9. Just an FYI from some experiments that I did recently: devel/binutils@powerpc and devel/binutils@powerpc64 and base/binutils@powerpc and base_binutils@powerpc64 do not put out the same content as lld or the old toolchain's ld (still used normally for 32-bit powerpc). buildkernel runs to completion but the result crashes from the kernel sseflf-loading and what was produced not matching. For example, binutils put out very few ABS symbols compared to lld/old-ld and classifies the kernel as ET_EXEC, not ET_DYN, because of the non-zero VirtAddr in: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg = Align . . . LOAD 0x000000 0x00100000 0x00100000 0xd9786c 0x1083648 RWE = 0x10000 . . . (I'm not claiming that is all there is that matters.) These points are true using system-clang as the compiler. (I've only cross-built so far.) I do not know if other architectures have similar issues or not. But, it appears that in some cases, there is more work to allowing the GNU linker to be used, for at least buildkernel . I do not know if there is an intent to support a (modern) GNU binutils ld (in addition to lld) or not. So it may be that the effort would not be put in. (I'm not claiming which side(s) would change if the effort was put in.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)