From owner-freebsd-ppc@freebsd.org Thu Oct 18 15:27:32 2018 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2CFC10DF729 for ; Thu, 18 Oct 2018 15:27:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-13.consmr.mail.bf2.yahoo.com (sonic315-13.consmr.mail.bf2.yahoo.com [74.6.134.123]) (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 3A2DA8FF6B for ; Thu, 18 Oct 2018 15:27:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: xDy_OXsVM1nWU1xZ.hl3.35PCBK__MVEjZ6y4.DtrC_lnSzi1GLAKIS7H8F6OMy oXYOMlt.herlMhzdknv2hLgSEWL01Ris97r1e_RieSuqk2REO9sl2ftr81hcCagbWuuKAMZRvbpY g485ZE8R2L6m3eykWyjbVz7BLRrPTvmwnGlD4DLZuVloY5YW5mVZbAU_xjx3DODU8RxJpswlY6VC _DiRadEuZ4__svMMSzIZ9.VsBHWSEYJY3000fm0OxkyJPzeUZ9pQfiXpQ1hkzp0egZAANIxJfHFC t3A.Xud8fOOGgN617lGqZW5R0CnWE3msl8AKF18ih3DeysSLIT0CybmQ4U6cogED42OZfAM_gMFX hvlsvIRFmQi7PZWoty.Um6UQ4bslSDJF8GLAZAwKiQqx646Ws43k5k0golc9hNLpgsxSLKwazGZp dkrJewE2fcmMcBeIAtJhrFsop3bG1wbp8DCa5vThGZKWi7nt0y9VRA3PZhxZOTSMXKtdSJGihVw1 .HPk3gghW5AlHnqP4Cvs5EqfRVck41iNvrb1E2gVW7VvMpTa1i9BhzAusmZfSkeCxkNuHzroPOTg XlmYpj4VQJbljjPULKwSL6klj30BkfEg3TkuCRPhE84qLm6opFmm06SzJ6GKnZ7BIYXkOBiWAAgh _gnLpRlCMiA5p81n2nGINUhKiVp.yJY3Z2wuGHgYOW3NZonmcahWh7AZ8TLrEA5VR7p5w3CHq9uj ksRczX8Umb0lPoX9Y9MvZIjPAcmSvTueVPWEUz9Fd9_F0IarVf0CTytMhCJ.l_nsFrjcLDMnwrn3 DHrsbzFzMhAUzXDlCTmSIZ2aD_RWCXrwsgpdvRWl5q7Jv_9ZpvgT3aXFokkqaz91xnmdKGkd.yQv AbiQBfYdvP_N3DIBrCReK.OnFoJ0RBT.Ow3Myc7P9nKJ8wtojxEt2G_.k9kukRnoppZPhJoJWPHU hA6bqasPSqHvVfQsFC.qSnyaOJoprA9VMttPHkyWVYryLGQsyxDTMBxIA8ZeWi5zN6r9l7APHqZI XXZ6DDcjn7FFsZJ04vFVXZKdZbgQ1G4czdWjcSkp0x1eXqTuCcVDX1Uwc0ewIgNkRWfTVxnTrobh H5DPAgmnetQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Thu, 18 Oct 2018 15:27:26 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp410.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 69a1cb364fe6e02169fe50961f9109f1; Thu, 18 Oct 2018 15:27:24 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Reasons to still not build buildworld buildkernel via system-clang --John Baldwin notes one I was unaware of Message-Id: <23400842-E5CB-4251-BFE5-78D524A64012@yahoo.com> Date: Thu, 18 Oct 2018 08:27:22 -0700 To: Justin Hibbits , Nathan Whitehorn , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2018 15:27:32 -0000 I described to John Baldwin what I know of for why clang is not yet appropriate to buildworld buildkernel for powerpc64 and powerpc: QUOTE Unfortunately, clang is broken in other ways for buildworld buildkernel use for targeting powerpc64 or powerpc: A) it silently ignores __builtin_eh_return(offset,handler) and so produces system-library code that is broken relative to handling thrown C++ exceptions. B) it produces types of linkage for buildkernel that FreeBSD does not handle, leading to dynamic loads of .ko files that crash the system. (Back in clang 4 days it did not have this problem and I was running kernels built by clang.) END QUOTE John Baldwin reported back something of which I was unaware: QUOTE It will also get the TLS model wrong for powerpc. Both MIPS and powerpc have an implicit default to PIC mode and llvm interprets this implicit PIC to mean that it should use dynamic TLS models (intended for use in shared libraries) always. GCC only uses dynamic models if -fPIC is explicitly passed on the command line. I have a hack to force the TLS model for static libraries and binaries for MIPS in bsd.*.mk that isn't in-tree, but it really needs to be fixed in clang and llvm. END QUOTE I wonder if there is anything in llvm's bugzilla about this, or FreeBSD's bugzilla for that matter. Are there other known issues not covered by the above 3? === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)