diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-04-27 10:45:53 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-04-30 17:43:06 +0200 |
| commit | df8a5fa4dc6b604e457fe5e8bac82974d752036b (patch) | |
| tree | e99d27d3e6337f6bc1e7dc9faf54e0074d594af2 | |
| parent | 551b85c8a241bd45b267db152eca4cb01eddce39 (diff) | |
| download | sparse-dev-df8a5fa4dc6b604e457fe5e8bac82974d752036b.tar.gz | |
default to LP64 for all and only for 64 bit ABIs
Currently sparse assumes LP64 only for x86-64.
This requires to always use the flag '-m64' for the other
64 bit archs like arm64 or ppc64.
There is also another problem on machines using the x32 ABI on
x86_64, which is, of course, not LP64.
So, change this by using LP64 by default if __LP64__ is defined
on the build machine. This will solve the current problem with
x32 but will also give the correct default on all 64 bit archs.
Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -280,7 +280,7 @@ static enum { STANDARD_C89, #define ARCH_LP64 1 #define ARCH_LLP64 2 -#ifdef __x86_64__ +#ifdef __LP64__ #define ARCH_M64_DEFAULT ARCH_LP64 #else #define ARCH_M64_DEFAULT ARCH_LP32 |
