cgcc and REAL_CC help
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.
Quoted 8 lines · rubisher
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
Quoted 5 lines
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.
Quoted 17 lines
u=
grep "^#defineHAVE_ASM_USCORE"config.h>/dev/null 2>&1 && u="_"$CC -O0 -DGRUB_MACHINE_IEEE1275=1 -m32 -fno-stack-protector -Wbitwise
(quoted diff) +0
-2-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 -uAny idea how should I fix it?
Quoted 9 lines
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 [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Bert Wesarg
Quoted 11 lines · rubisher
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 foundthis shell script is:
### The configure script will replace these variables.
Quoted 7 lines
Quoted 2 lines
: ${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.
Quoted 8 lines
Or use eval or the $CC command below.
Review
Quoted 6 lines
u=
grep "^#defineHAVE_ASM_USCORE"config.h>/dev/null 2>&1 && u="_"$CC -O0 -DGRUB_MACHINE_IEEE1275=1 -m32 -fno-stack-protector -Wbitwise
(quoted diff) +0
-2-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.
Quoted 20 lines
Quoted 19 lines
| 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 -uAny 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · rubisher
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Chris,
Quoted 7 lines · Chris Li
Quoted 6 lines · rubisher
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]
Quoted 5 lines
Quoted 1 line
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?
Quoted 4 lines
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.
Quoted 2 lines
Chris