fix cgcc ELF version for ppc64/pcc64le
commitcc58fdcfb8569d56e14e97959d42d9305a2b55dd
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 27 Sep 2017 21:11:37 +0000 (27 23:11 +0200)
committerChristopher Li <sparse@chrisli.org>
Tue, 3 Oct 2017 04:44:48 +0000 (3 00:44 -0400)
tree573dfe6d3aa45270d9f47f39823cf370e28dbe44
parent4b7b6b63f6069a387971276cf84db6cfafb2b4fe
fix cgcc ELF version for ppc64/pcc64le

Commit e0306fe0 "cgcc: teach cgcc about ppc64[le]" add support
for PPC64 to cgcc by adding the needed options like '-m64' &
'-m{little,big}-endian' and defines likes '-D__PPC64__=1'.

In this commit the defined '-D_CALL_ELF=2' was also added
but the value of 2 is for ELF v2 ABI, normally used for ppc64le,
while the older ELF ABI, normally used for plain ppc64 should use
'-D_CALL_ELF=2'.

Fix this by using the value of 1 or 2 for '_CALL_ELF' depending
if the architecture is ppc64 or ppc64le.

Fixes: e0306fe0b725af6e2e7ff59d7f0d99c96315791a
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Christopher Li <sparse@chrisli.org>
cgcc