* [PATCH] s390x: add the proper defines for data types
@ 2015-01-22 9:51 Christian Borntraeger
2015-01-22 13:50 ` [PATCH] s390x: add the proper defines for data types (sparse) Christian Borntraeger
2015-01-22 17:52 ` [PATCH] s390x: add the proper defines for data types Christopher Li
0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-01-22 9:51 UTC (permalink / raw)
To: linux-sparse; +Cc: linux-s390, Christian Borntraeger
This patch fixes several issues when compiling code under s390x
(64bit) with cgcc, e.g.
/usr/include/gnu/stubs.h:8:12: error: unable to open 'gnu/stubs-32.h'
by providing the proper defines.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
cgcc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/cgcc b/cgcc
index 8e38174..d7b1c99 100755
--- a/cgcc
+++ b/cgcc
@@ -279,6 +279,12 @@ sub add_specs {
&float_types (1, 1, 21, [24,8], [53,11], [113,15]) .
&define_size_t ($m64 ? "long unsigned int" : "unsigned int") .
' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
+ } elsif ($spec eq 's390x') {
+ return (' -D__s390x__ -D__s390__ -D_BIG_ENDIAN' .
+ &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
+ &float_types (1, 1, 36, [24,8], [53,11], [113,15]) .
+ &define_size_t ("long unsigned int") .
+ ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
} elsif ($spec eq 'host_os_specs') {
my $os = `uname -s`;
chomp $os;
@@ -294,6 +300,8 @@ sub add_specs {
return &add_specs ('x86_64');
} elsif ($arch =~ /^(ppc)$/i) {
return &add_specs ('ppc');
+ } elsif ($arch =~ /^(s390x)$/i) {
+ return &add_specs ('s390x');
} elsif ($arch =~ /^(sparc64)$/i) {
return &add_specs ('sparc64');
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] s390x: add the proper defines for data types (sparse)
2015-01-22 9:51 [PATCH] s390x: add the proper defines for data types Christian Borntraeger
@ 2015-01-22 13:50 ` Christian Borntraeger
2015-01-22 17:52 ` [PATCH] s390x: add the proper defines for data types Christopher Li
1 sibling, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-01-22 13:50 UTC (permalink / raw)
To: linux-sparse; +Cc: linux-s390, Christopher Li
I somehow managed to not mention the word "sparse" , which is the target for my patch.
Also adding Christopher cc.
Am 22.01.2015 um 10:51 schrieb Christian Borntraeger:
> This patch fixes several issues when compiling code under s390x
> (64bit) with cgcc, e.g.
> /usr/include/gnu/stubs.h:8:12: error: unable to open 'gnu/stubs-32.h'
> by providing the proper defines.
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> cgcc | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/cgcc b/cgcc
> index 8e38174..d7b1c99 100755
> --- a/cgcc
> +++ b/cgcc
> @@ -279,6 +279,12 @@ sub add_specs {
> &float_types (1, 1, 21, [24,8], [53,11], [113,15]) .
> &define_size_t ($m64 ? "long unsigned int" : "unsigned int") .
> ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
> + } elsif ($spec eq 's390x') {
> + return (' -D__s390x__ -D__s390__ -D_BIG_ENDIAN' .
> + &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
> + &float_types (1, 1, 36, [24,8], [53,11], [113,15]) .
> + &define_size_t ("long unsigned int") .
> + ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
> } elsif ($spec eq 'host_os_specs') {
> my $os = `uname -s`;
> chomp $os;
> @@ -294,6 +300,8 @@ sub add_specs {
> return &add_specs ('x86_64');
> } elsif ($arch =~ /^(ppc)$/i) {
> return &add_specs ('ppc');
> + } elsif ($arch =~ /^(s390x)$/i) {
> + return &add_specs ('s390x');
> } elsif ($arch =~ /^(sparc64)$/i) {
> return &add_specs ('sparc64');
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] s390x: add the proper defines for data types
2015-01-22 9:51 [PATCH] s390x: add the proper defines for data types Christian Borntraeger
2015-01-22 13:50 ` [PATCH] s390x: add the proper defines for data types (sparse) Christian Borntraeger
@ 2015-01-22 17:52 ` Christopher Li
1 sibling, 0 replies; 3+ messages in thread
From: Christopher Li @ 2015-01-22 17:52 UTC (permalink / raw)
To: Christian Borntraeger; +Cc: Linux-Sparse, linux-s390
On Thu, Jan 22, 2015 at 1:51 AM, Christian Borntraeger
<borntraeger@de.ibm.com> wrote:
> This patch fixes several issues when compiling code under s390x
> (64bit) with cgcc, e.g.
> /usr/include/gnu/stubs.h:8:12: error: unable to open 'gnu/stubs-32.h'
> by providing the proper defines.
The change looks good. Will apply.
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-22 17:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 9:51 [PATCH] s390x: add the proper defines for data types Christian Borntraeger
2015-01-22 13:50 ` [PATCH] s390x: add the proper defines for data types (sparse) Christian Borntraeger
2015-01-22 17:52 ` [PATCH] s390x: add the proper defines for data types Christopher Li
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).