Date: Wed, 15 Jan 2020 08:38:55 +0000 From: bugzilla-noreply@freebsd.org To: powerpc@FreeBSD.org Subject: [Bug 243182] java/openjdk11: add bootstrap and fix compilation for powerpc64 elfv2 Message-ID: <bug-243182-25139-Sptg7QMmxq@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-243182-25139@https.bugs.freebsd.org/bugzilla/> References: <bug-243182-25139@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243182 --- Comment #12 from Piotr Kubaj <pkubaj@FreeBSD.org> --- (In reply to Greg Lewis from comment #11) Sure, GCC supports ELFv2 since 4.8.3 (https://www.gnu.org/software/gcc/gcc-4.8/changes.html). But FreeBSD/powerpc64 with ELFv2 uses Clang. >From java/openjdk11/Makefile: .if ${COMPILER_TYPE} == gcc USE_GCC= yes CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} -L${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \ --with-extra-cflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \ --with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" .else MAKE_ENV+= USE_CLANG=true .endif So new GCC from ports (able to use ELFv2) will be used only when GCC is used in the first place (base GCC, which only does ELFv1). If Clang is used (only on ELFv2), you don't switch to GCC. You definitely could build FreeBSD without Clang and use external GCC on ELFv2, or use Clang with GNU ld.bfd on ELFv1 (ldd doesn't support ELFv1, in fact Mark Millard played with Clang + ld.bfd on ELFv1), but this is entirely unsupported use-case and I doubt anyone does this anymore (even if someone does, it's unsupported). There are of course other ports that need to use GCC from ports on powerpc64, because Clang can't compile them (it's still pretty immature on POWER compared to GCC 9 and has some bugs), but it can definitely build OpenJDK. That's why there's this assumption: that GCC means ELFv1 and Clang means ELFv2. -- You are receiving this mail because: You are on the CC list for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-243182-25139-Sptg7QMmxq>
