OpenJDK7 port to the little endian PowerPC64

Alexander Smundak asmundak at google.com
Fri Mar 7 19:45:18 UTC 2014


On Fri, Mar 7, 2014 at 9:01 AM, Volker Simonis <volker.simonis at gmail.com> wrote:
> Makefiles:
>
> I don't quite like the fact that we really have to define a new
> BUILDARCH/LIBARCH for little endian which also requires new makefiles like
> 'ppc64le.make' and 'platform_ppc64le'.
IMHO the current patch adheres to the spirit of the hotspot build machinery,
where only the top-level makefile analyzes target configuration, and
then includes
per-target makefiles. These per-target files
(make/linux/makefiles/{amd64,arm,hp,i486,etc}.make) are virtually if
statement-free,
and my patch keeps status quo.

> Regarding '-mminimal-toc' - this option is needed for older versions of GCC,
> otherwise you'll get "relocation truncated to fit" errors during linking.
> I've checked that the option is not required any more with GCC 4.7. It may
> be that it already works with GCC before 4.7 but I didn't test, so to be on
> the safe side, I'll suggest to enable the option for all GCC versions
> smaller than 4.7.
Note this is big-endian only problem: GCC before 4.8 does not support little
endian ELFv2 ABI at all.

> I also checked that the two LFLAGS_VM settings aren't needed any more, so
> you can remove the lines:
> -LFLAGS_VM += -L/lib64
> -LFLAGS_VM +=  -Wl,-melf64ppc
> from ppc64.make.
Confirmed: these are not needed for PPC64LE either.

> Regarding "-mtune=power7" I'm not sure. Are you absolutely sure that all
> ppc64le distros will only ever run on Power7 and above? If yes, you could
> put the "-mtune=power7" flag into the PPC64_ENDIANNESS=little section and
> move the "-mtune=power5" flag into the else branch.
I don't think it's possible to boot ppc64le distro on anything less then Power7.

> I don't think we need a special new file (bytes_linux_ppc.inline.hpp) here.
> I think better include "byteswap.h" at the top of "bytes_ppc.hpp" and just
> call the bswap_XX functions directly instead of using the 'swap_XX'
> wrappers:
I am following the pattern where OS-specific system headers (in this case
byteswap.h) are included into the OS-specific header files (in this case
src/os_cpu/linux_ppc/vm/bytes_linux_ppc.inline.hpp for Linux and
eventually into src/os_src/aix_ppc/bytes_aix_ppc.inline.hpp if ever it
is needed).
If you are OK with conditionally pulling OS-specific system header into
"bytes_ppc.hpp", I'll do that.

Sasha


More information about the ppc-aix-port-dev mailing list