comparison make/linux/makefiles/ppc64.make @ 17830:56e7f5560e60

8036767: PPC64: Support for little endian execution model Reviewed-by: goetz, kvn, dholmes, simonis Contributed-by: asmundak@google.com
author kvn
date Wed, 02 Apr 2014 11:24:44 -0700
parents faf0c78e906b
children
comparison
equal deleted inserted replaced
17829:0118c8c7b80f 17830:56e7f5560e60
24 # 24 #
25 25
26 # make c code know it is on a 64 bit platform. 26 # make c code know it is on a 64 bit platform.
27 CFLAGS += -D_LP64=1 27 CFLAGS += -D_LP64=1
28 28
29 # fixes `relocation truncated to fit' error for gcc 4.1. 29 ifeq ($(origin OPENJDK_TARGET_CPU_ENDIAN),undefined)
30 CFLAGS += -mminimal-toc 30 # This can happen during hotspot standalone build. Set endianness from
31 # uname. We assume build and target machines are the same.
32 OPENJDK_TARGET_CPU_ENDIAN:=$(if $(filter ppc64le,$(shell uname -m)),little,big)
33 endif
31 34
32 # finds use ppc64 instructions, but schedule for power5 35 ifeq ($(filter $(OPENJDK_TARGET_CPU_ENDIAN),big little),)
33 CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string 36 $(error OPENJDK_TARGET_CPU_ENDIAN value should be 'big' or 'little')
37 endif
34 38
35 # let linker find external 64 bit libs. 39 ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),big)
36 LFLAGS_VM += -L/lib64 40 # fixes `relocation truncated to fit' error for gcc 4.1.
41 CFLAGS += -mminimal-toc
37 42
38 # specify lib format. 43 # finds use ppc64 instructions, but schedule for power5
39 LFLAGS_VM += -Wl,-melf64ppc 44 CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
45 else
46 # Little endian machine uses ELFv2 ABI.
47 CFLAGS += -DVM_LITTLE_ENDIAN -DABI_ELFv2
48
49 # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50 CFLAGS += -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
51 endif