Date: Thu, 18 Oct 2018 08:27:22 -0700 From: Mark Millard <marklmi@yahoo.com> To: Justin Hibbits <chmeeedalf@gmail.com>, Nathan Whitehorn <nwhitehorn@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> 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>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23400842-E5CB-4251-BFE5-78D524A64012>