2008-04-02 Pavel Roskin <proski@gnu.org>

* genkernsyms.sh.in: Use more robust assignments for CC and
	srcdir.  Quote srcdir.
	* gensymlist.sh.in: Likewise.  Assert at the compile time that
	the symbol table is not empty.
This commit is contained in:
proski 2008-04-02 07:29:59 +00:00
parent ba7328dcba
commit 26887f221a
3 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,10 @@
2008-04-02 Pavel Roskin <proski@gnu.org>
* genkernsyms.sh.in: Use more robust assignments for CC and
srcdir. Quote srcdir.
* gensymlist.sh.in: Likewise. Assert at the compile time that
the symbol table is not empty.
* disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
* fs/cpio.c (grub_cpio_read): Likewise.

View File

@ -13,10 +13,10 @@
### The configure script will replace these variables.
srcdir=@srcdir@
CC="@CC@"
: ${srcdir=@srcdir@}
: ${CC=@CC@}
$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I$srcdir/include $* \
$CC -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_]*\)).*/\1 kernel/;p;}' \

View File

@ -13,8 +13,8 @@
### The configure script will replace these variables.
srcdir=@srcdir@
CC=@CC@
: ${srcdir=@srcdir@}
: ${CC=@CC@}
cat <<EOF
@ -45,6 +45,8 @@ done
cat <<EOF
#define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; }
void
grub_register_exported_symbols (void)
{
@ -57,7 +59,7 @@ cat <<EOF
{
EOF
$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I$srcdir/include $* \
$CC -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_]*\)).*/ {"\1", \1},/;p;}' \
@ -68,6 +70,7 @@ cat <<EOF
{0, 0}
};
COMPILE_TIME_ASSERT (sizeof (tab) > sizeof (tab[0]));
for (p = tab; p->name; p++)
grub_dl_register_symbol (p->name, p->addr, 0);
}