From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: "Christopher Li" <sparse@chrisli.org>,
"Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Luc Van Oostenryck" <luc.vanoostenryck@gmail.com>
Subject: [PATCH] fix cgcc ELF version for ppc64/pcc64le
Date: Wed, 27 Sep 2017 23:11:37 +0200 [thread overview]
Message-ID: <20170927211137.16461-1-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170927080007.jz2vfe4ekjjowkbe@taurus.defre.kleine-koenig.org>
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>
---
cgcc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/cgcc b/cgcc
index a8d7b4f21..909cd2477 100755
--- a/cgcc
+++ b/cgcc
@@ -286,7 +286,6 @@ sub add_specs {
} elsif ($spec eq 'ppc64') {
return (' -D__powerpc__=1 -D__PPC__=1 -D_STRING_ARCH_unaligned=1' .
' -D__powerpc64__=1 -D__PPC64__=1' .
- ' -D_CALL_ELF=2' .
' -m64' .
&float_types (1, 1, 21, [24,8], [53,11], [113,15]));
} elsif ($spec eq 's390x') {
@@ -317,9 +316,9 @@ sub add_specs {
} elsif ($arch =~ /^(ppc)$/i) {
return &add_specs ('ppc');
} elsif ($arch =~ /^(ppc64)$/i) {
- return &add_specs ('ppc64') . ' -mbig-endian';
+ return &add_specs ('ppc64') . ' -mbig-endian -D_CALL_ELF=1';
} elsif ($arch =~ /^(ppc64le)$/i) {
- return &add_specs ('ppc64') . ' -mlittle-endian';
+ return &add_specs ('ppc64') . ' -mlittle-endian -D_CALL_ELF=2';
} elsif ($arch =~ /^(s390x)$/i) {
return &add_specs ('s390x');
} elsif ($arch =~ /^(sparc64)$/i) {
--
2.14.0
next prev parent reply other threads:[~2017-09-27 21:11 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <150392922734.24087.13050909898214597041.reportbug@curie.anarc.at>
2017-08-30 16:14 ` Bug#873508: sparse test failures on ppc32le (and other not so common archs) Uwe Kleine-König
2017-08-30 16:55 ` Ramsay Jones
2017-08-30 17:36 ` Uwe Kleine-König
2017-08-31 0:11 ` Christopher Li
2017-08-31 20:55 ` Uwe Kleine-König
2017-08-31 22:43 ` Ramsay Jones
2017-09-01 0:50 ` Christopher Li
2017-09-01 7:46 ` Uwe Kleine-König
2017-09-01 11:51 ` Christopher Li
2017-09-21 18:58 ` Bug#873508: " Uwe Kleine-König
2017-09-26 18:11 ` Uwe Kleine-König
2017-09-27 8:00 ` Uwe Kleine-König
2017-09-27 8:40 ` Luc Van Oostenryck
2017-09-27 21:11 ` Luc Van Oostenryck [this message]
2017-09-30 8:49 ` [PATCH] fix cgcc ELF version for ppc64/pcc64le Uwe Kleine-König
2017-10-02 19:45 ` Luc Van Oostenryck
2017-10-02 21:17 ` Christopher Li
2017-10-03 4:46 ` Christopher Li
2017-09-01 0:47 ` sparse test failures on ppc32le (and other not so common archs) Christopher Li
2017-09-01 7:02 ` Josh Triplett
2017-09-01 7:57 ` Uwe Kleine-König
2017-09-01 22:55 ` Josh Triplett
2017-09-01 12:00 ` Christopher Li
2017-09-03 21:14 ` Luc Van Oostenryck
2017-09-04 18:00 ` Christopher Li
[not found] ` <715b7059-4ff0-0982-ff92-56c13c4160e7@kleine-koenig.org>
[not found] ` <CAMHZB6GHoA6v_RPtKF3WBbX0DPB5pqfz9wLf1iP8MWfUVdbteQ@mail.gmail.com>
2017-09-06 14:44 ` Uwe Kleine-König
2017-09-06 15:18 ` Christopher Li
2017-09-06 15:36 ` Uwe Kleine-König
2017-09-12 5:59 ` Christopher Li
2017-09-12 6:27 ` Uwe Kleine-König
2017-09-12 6:36 ` Christopher Li
2017-09-09 21:02 ` Uwe Kleine-König
2017-09-10 1:56 ` [PATCH] build: disable sparse-llvm on non-x86 Luc Van Oostenryck
2017-09-12 6:02 ` Christopher Li
2017-09-12 6:12 ` Luc Van Oostenryck
2017-09-12 6:27 ` Christopher Li
2017-09-12 6:34 ` Luc Van Oostenryck
2017-09-12 6:44 ` Christopher Li
2017-09-12 6:48 ` Luc Van Oostenryck
2017-09-12 7:04 ` Christopher Li
2017-09-12 7:01 ` Christopher Li
2017-09-12 7:10 ` Luc Van Oostenryck
2017-09-12 15:53 ` Christopher Li
2017-09-01 11:33 ` Bug#873508: sparse test failures on ppc32le (and other not so common archs) Antoine Beaupré
2017-09-10 1:22 ` Luc Van Oostenryck
2017-09-10 8:43 ` Uwe Kleine-König
2017-09-10 9:39 ` Luc Van Oostenryck
2017-09-10 12:29 ` Bug#873508: " Luc Van Oostenryck
2018-04-27 5:56 ` Uwe Kleine-König
2018-04-27 7:33 ` Bug#873508: sparse test failures & PATH_MAX Luc Van Oostenryck
2018-04-27 7:33 ` Uwe Kleine-König
2018-04-27 7:43 ` Bug#873508: sparse test failures on x32 Luc Van Oostenryck
2018-04-27 16:11 ` Bug#873508: sparse test failures & PATH_MAX Luc Van Oostenryck
2019-01-10 2:28 ` Bug#873508: sparse test failures on ppc32le (and other not so common archs) Antoine Beaupré
2019-01-10 11:39 ` Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170927211137.16461-1-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
--cc=uwe@kleine-koenig.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).