* [PATCH] Makefile: use locally built sparse in the selfcheck target
@ 2017-11-09 16:30 Ramsay Jones
2017-11-09 17:06 ` Luc Van Oostenryck
2017-11-09 17:48 ` Christopher Li
0 siblings, 2 replies; 12+ messages in thread
From: Ramsay Jones @ 2017-11-09 16:30 UTC (permalink / raw)
To: Christopher Li; +Cc: Luc Van Oostenryck, Sparse Mailing-list
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Chris,
I was recently setting up a new system and didn't have sparse
installed. The 'make selfcheck' target failed ...
ATB,
Ramsay Jones
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index d034176..d1a303e 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ LDFLAGS += -g
LD = gcc
AR = ar
PKG_CONFIG = pkg-config
-CHECKER = ./cgcc -no-compile
+CHECKER = CHECK=./sparse ./cgcc -no-compile
CHECKER_FLAGS =
ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS)
--
2.15.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 16:30 [PATCH] Makefile: use locally built sparse in the selfcheck target Ramsay Jones
@ 2017-11-09 17:06 ` Luc Van Oostenryck
2017-11-09 17:37 ` Ramsay Jones
2017-11-09 17:48 ` Christopher Li
1 sibling, 1 reply; 12+ messages in thread
From: Luc Van Oostenryck @ 2017-11-09 17:06 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Christopher Li, Sparse Mailing-list
Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
BTW, selfcheck also fails when reaching sparse-llvm.c because of
the use of CFLAGS/BASIC_CFLAGS/ALL_CFLAGS/COMMON_CFLAGS/PKG_CFLAGS.
I suppose you don't have LLVM on the platform you use, no problem,
I just wanted to inform you about it.
It's already fixed on my series you just commented about.
Regards,
-- Luc Van Oostenryck
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 17:06 ` Luc Van Oostenryck
@ 2017-11-09 17:37 ` Ramsay Jones
2017-11-09 17:43 ` Luc Van Oostenryck
0 siblings, 1 reply; 12+ messages in thread
From: Ramsay Jones @ 2017-11-09 17:37 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: Christopher Li, Sparse Mailing-list
On 09/11/17 17:06, Luc Van Oostenryck wrote:
>
> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
>
>
> BTW, selfcheck also fails when reaching sparse-llvm.c because of
> the use of CFLAGS/BASIC_CFLAGS/ALL_CFLAGS/COMMON_CFLAGS/PKG_CFLAGS.
Hmm, I used to have LLVM installed on Linux as well as cygwin, but
I didn't install it the last time I did a 'nuke-n-pave' Linux
installation. (Linux Mint is much easier to upgrade these days, which
is to say it actually works now, but that wasn't always the case!).
On cygwin, sparse-llvm.c complains for a cygwin-only reason, so it
may be that those errors a hiding the ones you are seeing. I have been
meaning to get around to fix the cygwin problems.
What kind of errors are you seeing?
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 17:37 ` Ramsay Jones
@ 2017-11-09 17:43 ` Luc Van Oostenryck
2017-11-09 17:55 ` Ramsay Jones
0 siblings, 1 reply; 12+ messages in thread
From: Luc Van Oostenryck @ 2017-11-09 17:43 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Christopher Li, Sparse Mailing-list
On Thu, Nov 9, 2017 at 6:37 PM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>
>
> On 09/11/17 17:06, Luc Van Oostenryck wrote:
>>
>> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
>>
>>
>> BTW, selfcheck also fails when reaching sparse-llvm.c because of
>> the use of CFLAGS/BASIC_CFLAGS/ALL_CFLAGS/COMMON_CFLAGS/PKG_CFLAGS.
>
> Hmm, I used to have LLVM installed on Linux as well as cygwin, but
> I didn't install it the last time I did a 'nuke-n-pave' Linux
> installation. (Linux Mint is much easier to upgrade these days, which
> is to say it actually works now, but that wasn't always the case!).
>
> On cygwin, sparse-llvm.c complains for a cygwin-only reason, so it
> may be that those errors a hiding the ones you are seeing. I have been
> meaning to get around to fix the cygwin problems.
>
> What kind of errors are you seeing?
The specific error message is:
sparse-llvm.c:6:11: error: unable to open 'llvm-c/Core.h'
but the cause is simply because the LLVM CFLAGS are used like:
sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
but selfcheck/cgcc, correctly, doesn't know about BASIC_CFLAGS.
Chris should be already aware of it and is busy to cook a patch
changing the way the CFLAGS are used.
Regards,
-- Luc
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 16:30 [PATCH] Makefile: use locally built sparse in the selfcheck target Ramsay Jones
2017-11-09 17:06 ` Luc Van Oostenryck
@ 2017-11-09 17:48 ` Christopher Li
1 sibling, 0 replies; 12+ messages in thread
From: Christopher Li @ 2017-11-09 17:48 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Luc Van Oostenryck, Sparse Mailing-list
On Fri, Nov 10, 2017 at 12:30 AM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Chris,
>
> I was recently setting up a new system and didn't have sparse
> installed. The 'make selfcheck' target failed ...
Thanks for the patch, applied.
I haven't push it out just yet.
Chris
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 17:43 ` Luc Van Oostenryck
@ 2017-11-09 17:55 ` Ramsay Jones
2017-11-09 17:57 ` Christopher Li
2017-11-09 18:03 ` Ramsay Jones
0 siblings, 2 replies; 12+ messages in thread
From: Ramsay Jones @ 2017-11-09 17:55 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: Christopher Li, Sparse Mailing-list
On 09/11/17 17:43, Luc Van Oostenryck wrote:
> On Thu, Nov 9, 2017 at 6:37 PM, Ramsay Jones
> <ramsay@ramsayjones.plus.com> wrote:
>>
>>
>> On 09/11/17 17:06, Luc Van Oostenryck wrote:
>>>
>>> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
>>>
>>>
>>> BTW, selfcheck also fails when reaching sparse-llvm.c because of
>>> the use of CFLAGS/BASIC_CFLAGS/ALL_CFLAGS/COMMON_CFLAGS/PKG_CFLAGS.
>>
>> Hmm, I used to have LLVM installed on Linux as well as cygwin, but
>> I didn't install it the last time I did a 'nuke-n-pave' Linux
>> installation. (Linux Mint is much easier to upgrade these days, which
>> is to say it actually works now, but that wasn't always the case!).
>>
>> On cygwin, sparse-llvm.c complains for a cygwin-only reason, so it
>> may be that those errors a hiding the ones you are seeing. I have been
>> meaning to get around to fix the cygwin problems.
>>
>> What kind of errors are you seeing?
>
> The specific error message is:
> sparse-llvm.c:6:11: error: unable to open 'llvm-c/Core.h'
> but the cause is simply because the LLVM CFLAGS are used like:
> sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
> but selfcheck/cgcc, correctly, doesn't know about BASIC_CFLAGS.
Hmm, that doesn't make much sense - the selfcheck target uses
the $(ALL_CFLAGS), just like the '%.o %.c' target. So, if the
file is compiled by gcc, then cgcc should have the same flags
(plus some sparse specific flags).
[This is the Makefile on the master branch @ c408da2].
puzzled ...
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 17:55 ` Ramsay Jones
@ 2017-11-09 17:57 ` Christopher Li
2017-11-09 18:03 ` Ramsay Jones
1 sibling, 0 replies; 12+ messages in thread
From: Christopher Li @ 2017-11-09 17:57 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Luc Van Oostenryck, Sparse Mailing-list
On Fri, Nov 10, 2017 at 1:55 AM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>> The specific error message is:
>> sparse-llvm.c:6:11: error: unable to open 'llvm-c/Core.h'
>> but the cause is simply because the LLVM CFLAGS are used like:
>> sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
>> but selfcheck/cgcc, correctly, doesn't know about BASIC_CFLAGS.
>
> Hmm, that doesn't make much sense - the selfcheck target uses
> the $(ALL_CFLAGS), just like the '%.o %.c' target. So, if the
Right. But selfcheck using *.sc target.
So the likely fix is just:
sparse-llvm.o sparse-llvm.sc: XXX_CFLAGS += $(LLVM_CFLAGS)
I am looking at this right now.
Interesting enough, on my FC 26 it is not triggering the header
file error.
Chris
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 17:55 ` Ramsay Jones
2017-11-09 17:57 ` Christopher Li
@ 2017-11-09 18:03 ` Ramsay Jones
2017-11-09 18:09 ` Christopher Li
2017-11-09 18:32 ` Luc Van Oostenryck
1 sibling, 2 replies; 12+ messages in thread
From: Ramsay Jones @ 2017-11-09 18:03 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: Christopher Li, Sparse Mailing-list
On 09/11/17 17:55, Ramsay Jones wrote:
>
>
> On 09/11/17 17:43, Luc Van Oostenryck wrote:
>> On Thu, Nov 9, 2017 at 6:37 PM, Ramsay Jones
>> <ramsay@ramsayjones.plus.com> wrote:
>>>
>>>
>>> On 09/11/17 17:06, Luc Van Oostenryck wrote:
>>>>
>>>> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
>>>>
>>>>
>>>> BTW, selfcheck also fails when reaching sparse-llvm.c because of
>>>> the use of CFLAGS/BASIC_CFLAGS/ALL_CFLAGS/COMMON_CFLAGS/PKG_CFLAGS.
>>>
>>> Hmm, I used to have LLVM installed on Linux as well as cygwin, but
>>> I didn't install it the last time I did a 'nuke-n-pave' Linux
>>> installation. (Linux Mint is much easier to upgrade these days, which
>>> is to say it actually works now, but that wasn't always the case!).
>>>
>>> On cygwin, sparse-llvm.c complains for a cygwin-only reason, so it
>>> may be that those errors a hiding the ones you are seeing. I have been
>>> meaning to get around to fix the cygwin problems.
>>>
>>> What kind of errors are you seeing?
>>
>> The specific error message is:
>> sparse-llvm.c:6:11: error: unable to open 'llvm-c/Core.h'
>> but the cause is simply because the LLVM CFLAGS are used like:
>> sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
>> but selfcheck/cgcc, correctly, doesn't know about BASIC_CFLAGS.
>
> Hmm, that doesn't make much sense - the selfcheck target uses
> the $(ALL_CFLAGS), just like the '%.o %.c' target. So, if the
> file is compiled by gcc, then cgcc should have the same flags
> (plus some sparse specific flags).
>
> [This is the Makefile on the master branch @ c408da2].
>
> puzzled ...
Ah, no longer puzzled. Hmm, didn't there used to be a rule like:
sparse-llvm.o sparse-llvm.sc: BASIC_CFLAGS += $(LLVM_CFLAGS)
this?
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 18:03 ` Ramsay Jones
@ 2017-11-09 18:09 ` Christopher Li
2017-11-09 18:32 ` Ramsay Jones
2017-11-09 18:32 ` Luc Van Oostenryck
1 sibling, 1 reply; 12+ messages in thread
From: Christopher Li @ 2017-11-09 18:09 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Luc Van Oostenryck, Sparse Mailing-list
On Fri, Nov 10, 2017 at 2:03 AM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>
> Ah, no longer puzzled. Hmm, didn't there used to be a rule like:
>
> sparse-llvm.o sparse-llvm.sc: BASIC_CFLAGS += $(LLVM_CFLAGS)
>
I search the history. Nope, I miss that when I add the selfcheck.
I did not catch this error because on FC26 missing the LLVM_CFLAGS
does not cause compile error.
$ llvm-config --cflags
-I/usr/include -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment
-Werror=date-time -ffunction-sections -fdata-sections -O2 -g -DNDEBUG
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
"llvm-config --cflags" does not introduce new header file searching directory.
Chris
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 18:09 ` Christopher Li
@ 2017-11-09 18:32 ` Ramsay Jones
2017-11-11 14:44 ` Luc Van Oostenryck
0 siblings, 1 reply; 12+ messages in thread
From: Ramsay Jones @ 2017-11-09 18:32 UTC (permalink / raw)
To: Christopher Li; +Cc: Luc Van Oostenryck, Sparse Mailing-list
On 09/11/17 18:09, Christopher Li wrote:
> On Fri, Nov 10, 2017 at 2:03 AM, Ramsay Jones
> <ramsay@ramsayjones.plus.com> wrote:
>>
>> Ah, no longer puzzled. Hmm, didn't there used to be a rule like:
>>
>> sparse-llvm.o sparse-llvm.sc: BASIC_CFLAGS += $(LLVM_CFLAGS)
>>
>
> I search the history. Nope, I miss that when I add the selfcheck.
> I did not catch this error because on FC26 missing the LLVM_CFLAGS
> does not cause compile error.
Heh, our emails crossed.
>
> $ llvm-config --cflags
> -I/usr/include -O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
> --param=ssp-buffer-size=4 -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
> -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings
> -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment
> -Werror=date-time -ffunction-sections -fdata-sections -O2 -g -DNDEBUG
> -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
> -D__STDC_LIMIT_MACROS
>
> "llvm-config --cflags" does not introduce new header file searching directory.
Ah, OK.
So, 'llvm-config --cflags' produces different output on
whichever platform Luc is on?
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 18:03 ` Ramsay Jones
2017-11-09 18:09 ` Christopher Li
@ 2017-11-09 18:32 ` Luc Van Oostenryck
1 sibling, 0 replies; 12+ messages in thread
From: Luc Van Oostenryck @ 2017-11-09 18:32 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Christopher Li, Sparse Mailing-list
On Thu, Nov 9, 2017 at 7:03 PM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>
>
> On 09/11/17 17:55, Ramsay Jones wrote:
>>
>>
>> On 09/11/17 17:43, Luc Van Oostenryck wrote:
>>> On Thu, Nov 9, 2017 at 6:37 PM, Ramsay Jones
>>> <ramsay@ramsayjones.plus.com> wrote:
>>>>
>>>>
>>>> On 09/11/17 17:06, Luc Van Oostenryck wrote:
>>>>>
>>>>> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
>>>>>
>>>>>
>>>>> BTW, selfcheck also fails when reaching sparse-llvm.c because of
>>>>> the use of CFLAGS/BASIC_CFLAGS/ALL_CFLAGS/COMMON_CFLAGS/PKG_CFLAGS.
>>>>
>>>> Hmm, I used to have LLVM installed on Linux as well as cygwin, but
>>>> I didn't install it the last time I did a 'nuke-n-pave' Linux
>>>> installation. (Linux Mint is much easier to upgrade these days, which
>>>> is to say it actually works now, but that wasn't always the case!).
>>>>
>>>> On cygwin, sparse-llvm.c complains for a cygwin-only reason, so it
>>>> may be that those errors a hiding the ones you are seeing. I have been
>>>> meaning to get around to fix the cygwin problems.
>>>>
>>>> What kind of errors are you seeing?
>>>
>>> The specific error message is:
>>> sparse-llvm.c:6:11: error: unable to open 'llvm-c/Core.h'
>>> but the cause is simply because the LLVM CFLAGS are used like:
>>> sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
>>> but selfcheck/cgcc, correctly, doesn't know about BASIC_CFLAGS.
>>
>> Hmm, that doesn't make much sense - the selfcheck target uses
>> the $(ALL_CFLAGS), just like the '%.o %.c' target. So, if the
>> file is compiled by gcc, then cgcc should have the same flags
>> (plus some sparse specific flags).
>>
>> [This is the Makefile on the master branch @ c408da2].
>>
>> puzzled ...
>
> Ah, no longer puzzled. Hmm, didn't there used to be a rule like:
>
> sparse-llvm.o sparse-llvm.sc: BASIC_CFLAGS += $(LLVM_CFLAGS)
>
> this?
Yes, for example.
-- Luc
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Makefile: use locally built sparse in the selfcheck target
2017-11-09 18:32 ` Ramsay Jones
@ 2017-11-11 14:44 ` Luc Van Oostenryck
0 siblings, 0 replies; 12+ messages in thread
From: Luc Van Oostenryck @ 2017-11-11 14:44 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Christopher Li, Sparse Mailing-list
On Thu, Nov 9, 2017 at 7:32 PM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>>
>> $ llvm-config --cflags
>> -I/usr/include -O2 -g -pipe -Wall -Werror=format-security
>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
>> --param=ssp-buffer-size=4 -grecord-gcc-switches
>> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
>> -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings
>> -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment
>> -Werror=date-time -ffunction-sections -fdata-sections -O2 -g -DNDEBUG
>> -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>> -D__STDC_LIMIT_MACROS
>>
>> "llvm-config --cflags" does not introduce new header file searching directory.
>
> Ah, OK.
>
> So, 'llvm-config --cflags' produces different output on
> whichever platform Luc is on?
Usually, I have nothing (of interest) in /usr since most of my stuff
is installed in somewhere in $HOME or /opt.
Regards,
-- Luc
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-11-11 14:44 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 16:30 [PATCH] Makefile: use locally built sparse in the selfcheck target Ramsay Jones
2017-11-09 17:06 ` Luc Van Oostenryck
2017-11-09 17:37 ` Ramsay Jones
2017-11-09 17:43 ` Luc Van Oostenryck
2017-11-09 17:55 ` Ramsay Jones
2017-11-09 17:57 ` Christopher Li
2017-11-09 18:03 ` Ramsay Jones
2017-11-09 18:09 ` Christopher Li
2017-11-09 18:32 ` Ramsay Jones
2017-11-11 14:44 ` Luc Van Oostenryck
2017-11-09 18:32 ` Luc Van Oostenryck
2017-11-09 17:48 ` Christopher Li
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.