From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org,
kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Subject: Re: [kvm-unit-tests PATCH 1/6] libcflat: add PRI(dux)32 format types
Date: Thu, 12 Jan 2017 18:01:49 +0000 [thread overview]
Message-ID: <87eg082m42.fsf@linaro.org> (raw)
In-Reply-To: <144fdce4-ddd4-0c93-296b-44aeec57c664@redhat.com>
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 12/01/2017 18:18, Alex Bennée wrote:
>>> Although I feel there should be a compiler macro way to do this without
>>> a need for configure/makefile trickery at all...
>>
>> I did ask our toolchain bods. They started going on about potential
>> solutions using _Generic but I fear that might be worse in this case!
>
> I don't think _Generic can do string concatenation, can it?
>
> inttypes.h is not part of the set of freestanding headers, only stdint.h
> is. Who is providing stdint.h in your case?
/usr/lib/gcc/arm-none-eabi/5.4.1/include/stdint.h
is part of the compiler package although it can just include the lib
stdint.h if it is there:
#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# if defined __cplusplus && __cplusplus >= 201103L
# undef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# undef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
# endif
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif
So using inttypes we would get:
>arm-none-eabi-gcc ./test.c -E | grep typedef | grep uint32
typedef long unsigned int __uint32_t;
typedef __uint32_t uint32_t ;
--
Alex Bennée
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: alex.bennee@linaro.org (Alex Bennée)
To: linux-arm-kernel@lists.infradead.org
Subject: [kvm-unit-tests PATCH 1/6] libcflat: add PRI(dux)32 format types
Date: Thu, 12 Jan 2017 18:01:49 +0000 [thread overview]
Message-ID: <87eg082m42.fsf@linaro.org> (raw)
In-Reply-To: <144fdce4-ddd4-0c93-296b-44aeec57c664@redhat.com>
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 12/01/2017 18:18, Alex Benn?e wrote:
>>> Although I feel there should be a compiler macro way to do this without
>>> a need for configure/makefile trickery at all...
>>
>> I did ask our toolchain bods. They started going on about potential
>> solutions using _Generic but I fear that might be worse in this case!
>
> I don't think _Generic can do string concatenation, can it?
>
> inttypes.h is not part of the set of freestanding headers, only stdint.h
> is. Who is providing stdint.h in your case?
/usr/lib/gcc/arm-none-eabi/5.4.1/include/stdint.h
is part of the compiler package although it can just include the lib
stdint.h if it is there:
#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# if defined __cplusplus && __cplusplus >= 201103L
# undef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# undef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
# endif
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif
So using inttypes we would get:
>arm-none-eabi-gcc ./test.c -E | grep typedef | grep uint32
typedef long unsigned int __uint32_t;
typedef __uint32_t uint32_t ;
--
Alex Benn?e
next prev parent reply other threads:[~2017-01-12 18:00 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 16:28 [kvm-unit-tests PATCH 0/6] Documentation misc fixes Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-11 16:28 ` [kvm-unit-tests PATCH 1/6] libcflat: add PRI(dux)32 format types Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-12 12:29 ` Paolo Bonzini
2017-01-12 12:29 ` Paolo Bonzini
2017-01-12 12:39 ` Alex Bennée
2017-01-12 12:39 ` Alex Bennée
2017-01-12 16:56 ` Andrew Jones
2017-01-12 16:56 ` Andrew Jones
2017-01-12 17:18 ` Alex Bennée
2017-01-12 17:18 ` Alex Bennée
2017-01-12 17:43 ` Andrew Jones
2017-01-12 17:43 ` Andrew Jones
2017-01-12 17:44 ` Paolo Bonzini
2017-01-12 17:44 ` Paolo Bonzini
2017-01-12 18:01 ` Alex Bennée [this message]
2017-01-12 18:01 ` Alex Bennée
2017-01-13 18:03 ` Andrew Jones
2017-01-13 18:03 ` Andrew Jones
2017-01-11 16:28 ` [kvm-unit-tests PATCH 2/6] lib/pci: fix BAR format strings Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-12 12:35 ` Paolo Bonzini
2017-01-12 12:35 ` Paolo Bonzini
2017-01-11 16:28 ` [kvm-unit-tests PATCH 3/6] docs: move README to README.md and symlink Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-12 17:04 ` Andrew Jones
2017-01-12 17:04 ` Andrew Jones
2017-01-11 16:28 ` [kvm-unit-tests PATCH 4/6] docs: mention checkpatch in the README Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-12 12:29 ` Paolo Bonzini
2017-01-12 12:29 ` Paolo Bonzini
2017-01-12 12:35 ` Alex Bennée
2017-01-12 12:35 ` Alex Bennée
2017-01-12 17:09 ` Andrew Jones
2017-01-12 17:09 ` Andrew Jones
2017-01-12 17:08 ` Andrew Jones
2017-01-12 17:08 ` Andrew Jones
2017-01-11 16:28 ` [kvm-unit-tests PATCH 5/6] docs: mention modifying env vars in README Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-12 17:14 ` Andrew Jones
2017-01-12 17:14 ` Andrew Jones
2017-01-11 16:28 ` [kvm-unit-tests PATCH 6/6] run_tests: allow passing of options to QEMU Alex Bennée
2017-01-11 16:28 ` Alex Bennée
2017-01-12 12:30 ` Paolo Bonzini
2017-01-12 12:30 ` Paolo Bonzini
2017-01-12 17:32 ` Andrew Jones
2017-01-12 17:32 ` Andrew Jones
2017-01-12 17:50 ` Paolo Bonzini
2017-01-12 17:50 ` Paolo Bonzini
2017-01-17 12:07 ` Alex Bennée
2017-01-17 12:07 ` Alex Bennée
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=87eg082m42.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.