* cgcc and REAL_CC help
@ 2009-12-17 9:15 rubisher
2009-12-17 9:42 ` Bert Wesarg
0 siblings, 1 reply; 5+ messages in thread
From: rubisher @ 2009-12-17 9:15 UTC (permalink / raw)
To: linux-sparse
Hello all,
May be can I ask you some more help.
I trying to sparse a bit grub2 code but at some moment make call a sript wich failled with following error:
genkernsyms.sh: line 23: REAL_CC=gcc-4.4: command not found
this shell script is:
### The configure script will replace these variables.
: ${srcdir=/Sources/jso/Deb.grub2/exp-wrk1}
: ${CC=REAL_CC=gcc-4.4 /usr/bin/cgcc}
u=
grep "^#define HAVE_ASM_USCORE" config.h >/dev/null 2>&1 && u="_"
$CC -O0 -DGRUB_MACHINE_IEEE1275=1 -m32 -fno-stack-protector -Wbitwise -Wnon-pointer-null -DGRUB_SYMBOL_GENERATOR=1 -E -I.
-Iinclude
-I"$srcdir/include" $* \
| grep -v '^#' \
| sed -n \
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
| sort -u
Any idea how should I fix it?
Tia,
J.
PS: I am runing a debian unstable with bash 4.0-7 dpkg as shell.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cgcc and REAL_CC help
2009-12-17 9:15 cgcc and REAL_CC help rubisher
@ 2009-12-17 9:42 ` Bert Wesarg
2009-12-18 17:14 ` rubisher
0 siblings, 1 reply; 5+ messages in thread
From: Bert Wesarg @ 2009-12-17 9:42 UTC (permalink / raw)
To: rubisher; +Cc: linux-sparse
On Thu, Dec 17, 2009 at 10:15, rubisher <rubisher@scarlet.be> wrote:
> Hello all,
>
> May be can I ask you some more help.
>
> I trying to sparse a bit grub2 code but at some moment make call a sript
> wich failled with following error:
> genkernsyms.sh: line 23: REAL_CC=gcc-4.4: command not found
>
> this shell script is:
> ### The configure script will replace these variables.
>
> : ${srcdir=/Sources/jso/Deb.grub2/exp-wrk1}
> : ${CC=REAL_CC=gcc-4.4 /usr/bin/cgcc}
Try:
export REAL_CC=gcc-4.4
: ${CC=/usr/bin/cgcc}
Or use eval or the $CC command below.
>
> u=
> grep "^#define HAVE_ASM_USCORE" config.h >/dev/null 2>&1 && u="_"
>
> $CC -O0 -DGRUB_MACHINE_IEEE1275=1 -m32 -fno-stack-protector -Wbitwise
> -Wnon-pointer-null -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude
> -I"$srcdir/include" $* \
> | grep -v '^#' \
> | sed -n \
> -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC
> *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
> -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR
> *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
> | sort -u
>
> Any idea how should I fix it?
>
> Tia,
> J.
>
> PS: I am runing a debian unstable with bash 4.0-7 dpkg as shell.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cgcc and REAL_CC help
2009-12-17 9:42 ` Bert Wesarg
@ 2009-12-18 17:14 ` rubisher
2009-12-20 22:45 ` Chris Li
0 siblings, 1 reply; 5+ messages in thread
From: rubisher @ 2009-12-18 17:14 UTC (permalink / raw)
To: Bert Wesarg; +Cc: linux-sparse
Bert Wesarg wrote:
> On Thu, Dec 17, 2009 at 10:15, rubisher <rubisher@scarlet.be> wrote:
>> Hello all,
>>
>> May be can I ask you some more help.
>>
>> I trying to sparse a bit grub2 code but at some moment make call a sript
>> wich failled with following error:
>> genkernsyms.sh: line 23: REAL_CC=gcc-4.4: command not found
>>
>> this shell script is:
>> ### The configure script will replace these variables.
>>
>> : ${srcdir=/Sources/jso/Deb.grub2/exp-wrk1}
>> : ${CC=REAL_CC=gcc-4.4 /usr/bin/cgcc}
> Try:
>
> export REAL_CC=gcc-4.4
> : ${CC=/usr/bin/cgcc}
>
Tx that's egnough.
> Or use eval or the $CC command below.
>
>> u=
>> grep "^#define HAVE_ASM_USCORE" config.h >/dev/null 2>&1 && u="_"
>>
>> $CC -O0 -DGRUB_MACHINE_IEEE1275=1 -m32 -fno-stack-protector -Wbitwise
>> -Wnon-pointer-null -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude
>> -I"$srcdir/include" $* \
That said, my next issue is that "-E" which is disable by cgcc:
[snip]
# If someone adds "-E", don't pre-process twice.
$do_compile = 0 if $_ eq '-E';
[snip]
If ever some of you knows why, I would be interested in?
Tx again,
J.
>> | grep -v '^#' \
>> | sed -n \
>> -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC
>> *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
>> -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR
>> *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
>> | sort -u
>>
>> Any idea how should I fix it?
>>
>> Tia,
>> J.
>>
>> PS: I am runing a debian unstable with bash 4.0-7 dpkg as shell.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cgcc and REAL_CC help
2009-12-18 17:14 ` rubisher
@ 2009-12-20 22:45 ` Chris Li
2009-12-21 16:42 ` rubisher
0 siblings, 1 reply; 5+ messages in thread
From: Chris Li @ 2009-12-20 22:45 UTC (permalink / raw)
To: rubisher; +Cc: Bert Wesarg, linux-sparse
On Fri, Dec 18, 2009 at 9:14 AM, rubisher <rubisher@scarlet.be> wrote:
> That said, my next issue is that "-E" which is disable by cgcc:
> [snip]
> # If someone adds "-E", don't pre-process twice.
> $do_compile = 0 if $_ eq '-E';
> [snip]
>
> If ever some of you knows why, I would be interested in?
My guess is that, both gcc and sparse pre-process print to stdout.
So allow them both pre-process will mess up the result.
The current cgcc chose to let sparse do the pre-process and don't
run the real cc. You can make the gcc does the real pro-process and
sparse just check though.
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cgcc and REAL_CC help
2009-12-20 22:45 ` Chris Li
@ 2009-12-21 16:42 ` rubisher
0 siblings, 0 replies; 5+ messages in thread
From: rubisher @ 2009-12-21 16:42 UTC (permalink / raw)
To: Chris Li; +Cc: Bert Wesarg, linux-sparse
Hello Chris,
Chris Li wrote:
> On Fri, Dec 18, 2009 at 9:14 AM, rubisher <rubisher@scarlet.be> wrote:
>> That said, my next issue is that "-E" which is disable by cgcc:
>> [snip]
>> # If someone adds "-E", don't pre-process twice.
>> $do_compile = 0 if $_ eq '-E';
>> [snip]
>>
>> If ever some of you knows why, I would be interested in?
>
> My guess is that, both gcc and sparse pre-process print to stdout.
> So allow them both pre-process will mess up the result.
>
That was also my guess but when I comment out this line and run the same script one time with 'REAL_CC=gcc-4.4 cgcc' and the
second time with 'gcc-4.4' the results are the same, thought?
> The current cgcc chose to let sparse do the pre-process and don't
> run the real cc. You can make the gcc does the real pro-process and
> sparse just check though.
>
Yes I think that I would have to do more effort to sparse this code.
Tx,
J.
> Chris
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-21 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 9:15 cgcc and REAL_CC help rubisher
2009-12-17 9:42 ` Bert Wesarg
2009-12-18 17:14 ` rubisher
2009-12-20 22:45 ` Chris Li
2009-12-21 16:42 ` rubisher
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).