mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
- Cleanup compiler warnings etc.
- add crosscflags from previous patch ;) git-svn-id: svn://coreboot.org/openbios/openbios-devel@67 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -61,7 +61,6 @@
|
||||
<executable name="target/arch/sparc64/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED">
|
||||
<rule><![CDATA[ arch/sparc64/builtin.c
|
||||
$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
|
||||
<external-object source="target/include/static-dict.h"/>
|
||||
</executable>
|
||||
|
||||
<!-- END OF HACK ALERT -->
|
||||
|
||||
@@ -20,7 +20,7 @@ void __exit_context(void); /* assembly routine */
|
||||
* It is placed at the bottom of our stack, and loaded by assembly routine
|
||||
* to start us up.
|
||||
*/
|
||||
struct context main_ctx = {
|
||||
const struct context main_ctx = {
|
||||
.regs[REG_SP] = (uint64_t) &_estack - 96,
|
||||
.pc = (uint64_t) start_main,
|
||||
.npc = (uint64_t) start_main + 4,
|
||||
|
||||
@@ -47,7 +47,7 @@ blk_open( blk_data_t *pb )
|
||||
}
|
||||
|
||||
static void
|
||||
blk_close( blk_data_t *pb )
|
||||
blk_close( __attribute__((unused)) blk_data_t *pb )
|
||||
{
|
||||
selfword("close-deblocker");
|
||||
}
|
||||
@@ -80,20 +80,20 @@ blk_read_blocks( blk_data_t *pb )
|
||||
|
||||
/* ( -- bs ) */
|
||||
static void
|
||||
blk_block_size( blk_data_t *pb )
|
||||
blk_block_size( __attribute__((unused)) blk_data_t *pb )
|
||||
{
|
||||
PUSH( 512 );
|
||||
}
|
||||
|
||||
/* ( -- maxbytes ) */
|
||||
static void
|
||||
blk_max_transfer( blk_data_t *pb )
|
||||
blk_max_transfer( __attribute__((unused)) blk_data_t *pb )
|
||||
{
|
||||
PUSH( 1024*1024 );
|
||||
}
|
||||
|
||||
static void
|
||||
blk_initialize( blk_data_t *pb )
|
||||
blk_initialize( __attribute__((unused)) blk_data_t *pb )
|
||||
{
|
||||
fword("is-deblocker");
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ static void init_memory(void)
|
||||
PUSH((ucell) memory + MEMORY_SIZE);
|
||||
}
|
||||
|
||||
void exception(cell no)
|
||||
void exception(__attribute__((unused)) cell no)
|
||||
{
|
||||
/*
|
||||
* this is a noop since the dictionary has to take care
|
||||
|
||||
54
config/scripts/crosscflags
Normal file
54
config/scripts/crosscflags
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
|
||||
host=$1
|
||||
target=$2
|
||||
|
||||
if test "$host" = "sparc"; then
|
||||
host="sparc32"
|
||||
fi
|
||||
|
||||
if test "$host" = "powerpc" -o "$host" = "mips" -o "$host" = "s390" -o "$host" = "sparc32" -o "$host" = "sparc64" -o "$host" = "m68k" -o "$host" = "armv4b"; then
|
||||
hostbigendian="yes"
|
||||
else
|
||||
hostbigendian="no"
|
||||
fi
|
||||
|
||||
# host long bits test
|
||||
if test "$host" = "sparc64" -o "$host" = "ia64" -o "$host" = "x86_64" -o "$host" = "alpha"; then
|
||||
hostlongbits="64"
|
||||
else
|
||||
hostlongbits="32"
|
||||
fi
|
||||
|
||||
if test "$target" = "powerpc" -o "$target" = "mips" -o "$target" = "s390" -o "$target" = "sparc32" -o "$target" = "sparc64" -o "$target" = "m68k" -o "$target" = "armv4b"; then
|
||||
targetbigendian="yes"
|
||||
else
|
||||
targetbigendian="no"
|
||||
fi
|
||||
|
||||
# target long bits test
|
||||
if test "$target" = "sparc64" -o "$target" = "ia64" -o "$target" = "x86_64" -o "$target" = "alpha"; then
|
||||
targetlongbits="64"
|
||||
else
|
||||
targetlongbits="32"
|
||||
fi
|
||||
|
||||
if test "$targetbigendian" = "$hostbigendian"; then
|
||||
cflags="-USWAP_ENDIANNESS"
|
||||
else
|
||||
cflags="-DSWAP_ENDIANNESS"
|
||||
fi
|
||||
|
||||
if test "$targetlongbits" = "$hostlongbits"; then
|
||||
cflags="$cflags -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH"
|
||||
elif test "$targetlongbits" -lt "$hostlongbits"; then
|
||||
cflags="$cflags -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH"
|
||||
else
|
||||
cflags="$cflags -DNATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH"
|
||||
fi
|
||||
|
||||
if test "$host" = "x86" -a "$targetlongbits" = "64"; then
|
||||
cflags="$cflags -DNEED_FAKE_INT128_T"
|
||||
fi
|
||||
|
||||
echo "$cflags"
|
||||
@@ -178,9 +178,11 @@ static void call(void)
|
||||
|
||||
static void sysdebug(void)
|
||||
{
|
||||
cell errorno=POP();
|
||||
#ifdef FCOMPILER
|
||||
cell errorno=POP();
|
||||
exception(errorno);
|
||||
#else
|
||||
(void) POP();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ dlabel_tell( dlabel_info_t *di )
|
||||
|
||||
/* ( addr len -- actual ) */
|
||||
static void
|
||||
dlabel_write( dlabel_info_t *di )
|
||||
dlabel_write( __attribute__((unused)) dlabel_info_t *di )
|
||||
{
|
||||
DDROP();
|
||||
PUSH( -1 );
|
||||
@@ -185,7 +185,7 @@ dlabel_offset( dlabel_info_t *di )
|
||||
|
||||
/* ( addr -- size ) */
|
||||
static void
|
||||
dlabel_load( dlabel_info_t *di )
|
||||
dlabel_load( __attribute__((unused)) dlabel_info_t *di )
|
||||
{
|
||||
/* XXX: try the load method of the part package */
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ nvram_write( nvram_ibuf_t *nd )
|
||||
|
||||
/* ( -- size ) */
|
||||
static void
|
||||
nvram_size( nvram_ibuf_t *nd )
|
||||
nvram_size( __attribute__((unused)) nvram_ibuf_t *nd )
|
||||
{
|
||||
PUSH( nvram.size );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user