From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] cgcc: provide __ARM_PCS_VFP for armhf
Date: Tue, 26 Sep 2017 09:15:20 +0200 [thread overview]
Message-ID: <20170926071520.26507-1-uwe@kleine-koenig.org> (raw)
This fixes:
$ uname -m
armv8l
$ env CHECK=./sparse ./cgcc -no-compile memops.c
/usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:12: error: unable to open 'gnu/stubs-soft.h'
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
Hello,
I added
env CHECK=./sparse ./cgcc -no-compile memops.c
to the package building process and that failed on armhf (i.e. Armv7
CPU with Thumb-2 and VFP3D16 or better) with the above error.
With that applied all Debian primary architectures work fine; see
https://buildd.debian.org/status/package.php?p=sparse&suite=unstable
Best regards
Uwe
cgcc | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/cgcc b/cgcc
index a8d7b4f..ee59201 100755
--- a/cgcc
+++ b/cgcc
@@ -296,7 +296,14 @@ sub add_specs {
&define_size_t ("long unsigned int") .
' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
} elsif ($spec eq 'arm') {
- return (' -D__arm__=1 -m32' .
+ chomp (my $gccmachine = `$cc -dumpmachine`);
+ my $cppsymbols = ' -D__arm__=1 -m32';
+
+ if ($gccmachine eq 'arm-linux-gnueabihf') {
+ $cppsymbols .= ' -D__ARM_PCS_VFP=1';
+ }
+
+ return ($cppsymbols .
&float_types (1, 1, 36, [24,8], [53,11], [53, 11]));
} elsif ($spec eq 'aarch64') {
return (' -D__aarch64__=1 -m64' .
@@ -324,7 +331,7 @@ sub add_specs {
return &add_specs ('s390x');
} elsif ($arch =~ /^(sparc64)$/i) {
return &add_specs ('sparc64');
- } elsif ($arch =~ /^(arm)$/i) {
+ } elsif ($arch =~ /^arm(?:v[78]l)?$/i) {
return &add_specs ('arm');
} elsif ($arch =~ /^(aarch64)$/i) {
return &add_specs ('aarch64');
--
2.11.0
next reply other threads:[~2017-09-26 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 7:15 Uwe Kleine-König [this message]
2017-09-26 20:35 ` [PATCH] cgcc: provide __ARM_PCS_VFP for armhf 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=20170926071520.26507-1-uwe@kleine-koenig.org \
--to=uwe@kleine-koenig.org \
--cc=linux-sparse@vger.kernel.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