From owner-freebsd-toolchain@freebsd.org Sun Aug 5 19:46:29 2018 Return-Path: Delivered-To: freebsd-toolchain@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 7AD68105BF76 for ; Sun, 5 Aug 2018 19:46:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-20.consmr.mail.gq1.yahoo.com (sonic314-20.consmr.mail.gq1.yahoo.com [98.137.69.83]) (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 EB48574F5F for ; Sun, 5 Aug 2018 19:46:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 5ZXtapQVM1mIERP5HeQ9tjc4ukZ96SZfjySEtdbC.mhfeYNd6mbcv4IJNaBuZpd QUzN0zXRpJfr3oQ6yXQlho2EIIcSEn2pzDNe8UnbabiL5ZaeOdX1_5tsSGGh9syHNTRA2RsTaPzR xr47siSjv_nWKoHiK2S0DIk.uVeyDPSffTdoM5zjj0sjl5fM.mIyYWRZQzLh6RHVuCv9nopByeRi LGIbCorzDhIu4y4MdXJXF6cIXYhjwSxnQfNu4JvKQNp4nLTyRNf4lkV3iyLmso1sVRLiVFvOKBVu rJm5T9Vv77ppcQjA_lorQjjnvrWPfmyNE2flLCo9q.okyGYoK9Tqi0V2RK0ARsi044GGLcTaZ5vj Dm6l66cKmfDj6FKsw52z0_Wvj1yTvL7k3g9oGCWqw.HVOjHkfU_GW1s0ZtJf6YdcFIv6ok6C5gTi NU8edmbSW8Zp0wZsgVIC6FH_afuCDD6aW6.chupHfmzK_t6pPqxtFbhthlekylt92_2pu3VTrP6b wlrAL4OVhRlPxZM20p.s2W3VFEBf2HtS1L_VPq.XOJQDCXDMw.9JVmVTeVYswoUrOt3Bj7rcqTIo DOSIfjTJYSHIqF0gZRfxQJfNxiBQ085U7U1ONwLCG2ZqcYO6GmTVybMaMiVJW6ZZuN8lWbWr5_N4 58oRHvOCg9Zkvgb_SVTkNF_FJJyteqwi266HYyu9ttpFHzgOYXn_D6WqkhuRPUrKyi32MTmpk4hg 7OwSyhDrGHDx2jEliTSO6qTt_.655icbQTExf3SaOR7V66RFHYoHBk8KyWpz7A_P1Hru5r5C5XUq eC27npvvT6.v40Ds5buWyhw3HRGzY27bEApPCL7Pe3AROYANZg0VGHh07RIuodNfdelQJprLGObz Guk.Hr1QI0yavPSz1yDMuJWD_Mui0VT.jX9_s8f6B53dXdBkkXZrRe308f8HBxo.BM006qdurwlW Q6XSaxieKnzw.Debynh6e73bZ9KQS0j82b2faXj2B_56zkX3m9wuDSsPdUzWCRhAIsa3jpy0SX1W 4LL470MrzWQk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Sun, 5 Aug 2018 19:46:27 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp417.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 55396c4ef1da540a3e6aadb19ae82289; Sun, 05 Aug 2018 19:46:25 +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 11.5 \(3445.9.1\)) Subject: projects/clang700 and powerpc64 (or powerpc): What is the goal? Is the Lex/Lexer.cpp altivec.h problem to be handled? Message-Id: <6F1CF8C0-84ED-49B2-8FC3-C566AEB15810@yahoo.com> Date: Sun, 5 Aug 2018 12:46:24 -0700 To: Dimitry Andric , FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2018 19:46:29 -0000 [I experiment with targeting powerpc family via modern toolchains. So this is outside the official range for FreeBSD. I've not tried clang 7 yet. The below is relative to system clang 6 behavior.] As stands amd64 -> powerpc64 cross builds fail building clang via the system clang because of errors like (from the bootstrap clang build here): --- Lex/Lexer.o --- /usr/src/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp:2401:10: fatal = error: 'altivec.h' file not found #include ^~~~~~~~~~~ 1 error generated. *** [Lex/Lexer.o] Error code 1 where it should be finding the clang/6.0.1/include/altivec.h listed in the below (clang's own altivec.h): # find /usr/obj/powerpc64vtsc_clang_altbinutils -name altivec.h -print = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/powerpc= .powerpc64/tmp/usr/include/machine/altivec.h = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/powerpc= .powerpc64/tmp/usr/lib/clang/6.0.1/include/altivec.h = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/powerpc= .powerpc64/obj-lib32/tmp/usr/include/machine/altivec.h clang's altivec.h serves a very different purpose than the freebsd ones and so is the right one to find for the above. The code that reports the error is: #ifdef __SSE2__ #include #elif __ALTIVEC__ #include #undef bool #endif Note: the clang altivec.h involvement is an example of clang not being a generic cross compiler as built for FreeBSD as far as I can tell: the involved code only is compiled into clang when explicitly targeting powerpc contexts if I understand right. SSE2 may have a similar status? Is projects/clang700 going to try to have the right altivec.h found or to avoid having the build try to find it? (Either would allow the build to get past the above point of failure.) Note: As stands cross-builds via devel/powerpc64-gcc and the like build clang without __ALTIVEC__ defined and is not used. But, like FreeBSD, GCC has its own alitvec.h file to avoid finding in this context if __ALTVEC__ was defined at some point. As stands, overall the system tries to build differently depending on the tool chain used for this clang altivec.h material. (The official llvm based xtoolchain still needs lld to work to be used. So I'll not comment about __ALTIVEC__ based on my mixing in devel/powerpc64-binutils use instead. I've not looked into if an altivec.h is or is not in use by that above include for this context.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)