diff options
author | Ramsay Jones <ramsay@ramsayjones.plus.com> | 2019-11-28 15:17:59 +0000 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-28 18:13:39 +0100 |
commit | 68ac1bb244bba6c1531338329531a9d5ef22180b (patch) | |
tree | f7f8a8032e90204af7bfe3d307d52926c6772170 | |
parent | 9b2efc158c5c9700ffe355c59356879df7c9cc12 (diff) | |
download | sparse-68ac1bb244bba6c1531338329531a9d5ef22180b.tar.gz |
cgcc: fix definition of 'linux' macro
During a call to add_specs('linux'), cgcc adds several macro definitions
to the sparse command line. In particular, it provides the incorrect
definition: '-Dlinux=linux'.
This bug was introduced in commit 807f74466b (<no title>, 2004-08-13), while
moving some calls to add_pre_buffer() around in lib.c. This was then moved
out of sparse, into cgcc, by commit cf2bde63a6 (<no title>, 2004-10-05),
where the definition was copied verbatum.
Fix this macro definition to read '-Dlinux=1' instead.
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-x | cgcc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -230,7 +230,7 @@ sub add_specs { ' -DNULL="((void *)0)"'; } elsif ($spec eq 'linux') { return &add_specs ('unix') . - ' -D__linux__=1 -D__linux=1 -Dlinux=linux'; + ' -D__linux__=1 -D__linux=1 -Dlinux=1'; } elsif ($spec eq 'gnu/kfreebsd') { return &add_specs ('unix') . ' -D__FreeBSD_kernel__=1'; |