*.mk configuration files modified for compatibility with latest version

of Mentor Sourcery CodeBench Lite toolchain
(https://sourcery.mentor.com/GNUToolchain/release2641).
All detected issues fixed.
This commit is contained in:
Serge Vakulenko
2014-04-24 21:06:37 -07:00
parent 1b15bcff49
commit b98de3368e
14 changed files with 95 additions and 71 deletions
+16 -2
View File
@@ -83,6 +83,7 @@ enum {
LIDENT, /* .ident */
LWEAK, /* .weak */
LLOCAL, /* .local */
LNAN, /* .nan */
};
/*
@@ -731,6 +732,9 @@ int lookacmd ()
case 'm':
if (! strcmp (".mask", name)) return (LMASK);
break;
case 'n':
if (! strcmp (".nan", name)) return (LNAN);
break;
case 'p':
if (! strcmp (".previous", name)) return (LPREVIOUS);
break;
@@ -2212,6 +2216,12 @@ void pass1 ()
uerror ("bad parameter of .end");
cval = lookname();
break;
case LNAN:
/* .nan name */
clex = getlex (&cval);
if (clex != LNAME)
uerror ("bad parameter of .nan");
break;
case LTYPE:
/* .type name,type */
if (getlex (&cval) != LNAME)
@@ -2661,8 +2671,12 @@ int main (argc, argv)
break;
case 'I': /* include dir */
// TODO
while (*++cp);
--cp;
if (cp[1] == 0) {
i++;
} else {
while (*++cp);
--cp;
}
break;
case 'O': /* optimization level */
// TODO
+1 -1
View File
@@ -226,7 +226,7 @@ RDHWR Read Hardware Register Allows unprivileged acce
RDPGPR Read GPR from Previous Shadow Set Rt = SGPR[SRSCtl.PSS, Rd]
RESTORE Restore registers and deallocate stack See Architecture Reference Manual
frame (MIPS16eª only)
frame (MIPS16e only)
ROTR Rotate Word Right Rd = Rt[sa-1..0] || Rt[31..sa]
+1 -1
View File
@@ -1534,7 +1534,7 @@ int get_value()
value = get_num();
else {
++cmdptr;
switch (c) {
switch ((int)c) {
case '(': /* nesting */
value = eval_sub();
break;
+1 -1
View File
@@ -92,7 +92,7 @@ SECTIONS
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
}
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
/* Adjust the address for the data segment. */
+1 -1
View File
@@ -13,7 +13,7 @@ OBJS = battlestar.o cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o cmd7.o
init.o cypher.o getcom.o parse.o room.o save.o fly.o misc.o \
_globals.o _dayfile.o _nightfile.o dayobjs.o nightobjs.o words.o \
curses.o doprnt.o
LIBS =
LIBS = -lc
MAN = battlestar.0
MANSRC = battlestar.6
+1 -1
View File
@@ -12,7 +12,7 @@ CFLAGS += -Os -mips16 -Werror -Wall
OBJS = main.o pl_main.o pl_1.o pl_2.o pl_3.o pl_4.o pl_5.o pl_6.o pl_7.o \
dr_main.o dr_1.o dr_2.o dr_3.o dr_4.o dr_5.o lo_main.o \
assorted.o game.o globals.o misc.o parties.o sync.o version.o doprnt.o
LIBS = -lcurses -ltermcap
LIBS = -lcurses -ltermcap -lc
MAN = sail.0
MANSRC = sail.6
+1 -1
View File
@@ -357,7 +357,7 @@ Sync()
switch (*p++ = getc(sync_fp)) {
case '\n':
p--;
case EOF:
case (char)EOF:
break;
default:
if (p >= buf + sizeof buf)
+1 -1
View File
@@ -17,7 +17,7 @@ OBJS = abandon.o attack.o autover.o capture.o check_out.o checkcond.o
ranf.o rest.o schedule.o score.o setup.o setwarp.o shell.o \
shield.o snova.o srscan.o systemname.o torped.o utility.o \
visual.o warp.o win.o
LIBS = -lm
LIBS = -lm -lc
MAN = trek.0
MANSRC = trek.6
-11
View File
@@ -120,8 +120,6 @@ main(argc, argv)
char **argv;
{
long vect;
/* extern FILE *f_log; */
register char opencode;
int prio;
register int ac;
register char **av;
@@ -132,7 +130,6 @@ main(argc, argv)
av++;
time(&vect);
srand(vect);
opencode = 'w';
prio = PRIO;
if (ioctl(1, TIOCGETP, &argp) == 0)
{
@@ -143,10 +140,6 @@ main(argc, argv)
{
switch (av[0][1])
{
case 'a': /* append to log file */
opencode = 'a';
break;
case 'f': /* set fast mode */
Etc.fast++;
break;
@@ -179,10 +172,6 @@ main(argc, argv)
}
if (ac > 2)
syserr(0, "arg count");
/*
if (ac > 1)
f_log = fopen(av[0], opencode);
*/
printf("\n * * * S T A R T R E K * * *\n\nPress return to continue.\n");
+10 -9
View File
@@ -15,7 +15,7 @@ extern struct buf *getnewbuf();
/*
* Variable naming conventions
*
*
* root - this is the number of the device entry in the disks[] array
* part - the minor number of a device entry, which represents the partition
* number, or 0 for the whole disk
@@ -75,7 +75,7 @@ const struct diskentry disks[] = {
#ifdef SDRAMP_ENABLED
{sdramp_preinit, no_init, no_deinit, sdramp_open, sdramp_size, sdramp_read, sdramp_write, 0, RD_PREPART},
#endif
#endif
#ifdef FLASH_ENABLED
{flash_init, no_init, no_deinit, flash_open, flash_size, flash_read, flash_write, 0, RD_READONLY},
@@ -164,8 +164,9 @@ static inline int init_device(int root,int flag)
for(i=0; i<4; i++)
{
dflags[root].start[i] = mbr->partitions[i].lbastart>>1;
dflags[root].len[i] = mbr->partitions[i].lbalength>>1;
struct partition part = mbr->partitions[i];
dflags[root].start[i] = part.lbastart >> 1;
dflags[root].len[i] = part.lbalength >> 1;
}
dflags[root].blocks = disks[root].size(unit);
brelse(bp);
@@ -320,7 +321,7 @@ void rdstrategy(register struct buf *bp)
void update_mbr(int unit)
{
}
int rdioctl (dev_t dev, register u_int cmd, caddr_t addr, int flag)
@@ -337,7 +338,7 @@ int rdioctl (dev_t dev, register u_int cmd, caddr_t addr, int flag)
{
bflush(major(dev));
init_device(major(dev),S_SILENT);
}
return 0;
}
@@ -432,7 +433,7 @@ dev_t get_boot_device()
rdclose(makedev(i,0),0,0);
}
}
return bd;
#endif
}
@@ -610,7 +611,7 @@ struct buf *prepartition_device(char *devname)
dev[pos] = 0;
p++;
}
if((*p) == ':')
{
p++;
@@ -670,7 +671,7 @@ struct buf *prepartition_device(char *devname)
p++;
}
}
if(pnum > 0)
{
mbr->bootsig = 0xAA55;
+9
View File
@@ -28,6 +28,15 @@ ifndef GCCPREFIX
LDFLAGS =
endif
# Mentor Sourcery CodeBench Lite toolchain
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# You can download a Linux or Windows binary package from
# https://sourcery.mentor.com/GNUToolchain/release2641
ifndef GCCPREFIX
GCCPREFIX = /usr/local/mips-2013.11/bin/mips-sde-elf-
LDFLAGS = -Wl,--oformat=elf32-tradlittlemips
endif
# chipKIT MPIDE on Mac OS X
ifneq (,$(wildcard /Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr))
AVRDUDE = /Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude \
+38 -38
View File
@@ -103,7 +103,7 @@ void spi_close(int dno)
if(spi_devices[dno].bus==NULL)
return;
if (spi_devices[dno].cs_tris != NULL) {
// Revert the CS pin to input.
TRIS_CLR(*spi_devices[dno].cs_tris) = 1<<spi_devices[dno].cs_pin;
@@ -121,11 +121,11 @@ void spi_select(int dno)
{
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
if (spi_devices[dno].cs_tris == NULL)
if (spi_devices[dno].cs_tris == NULL)
return;
spi_devices[dno].bus->brg = spi_devices[dno].baud;
@@ -139,11 +139,11 @@ void spi_deselect(int dno)
{
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
if (spi_devices[dno].cs_tris == NULL)
if (spi_devices[dno].cs_tris == NULL)
return;
LAT_SET(*spi_devices[dno].cs_tris) = 1<<spi_devices[dno].cs_pin;
@@ -155,10 +155,10 @@ void spi_set(int dno, unsigned int set)
{
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
spi_devices[dno].mode |= set;
}
@@ -168,10 +168,10 @@ void spi_clr(int dno, unsigned int set)
{
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
spi_devices[dno].mode &= ~set;
}
@@ -181,10 +181,10 @@ unsigned int spi_status(int dno)
{
if(dno >= MAXSPIDEV)
return 0;
if(spi_devices[dno].bus==NULL)
return 0;
return spi_devices[dno].bus->stat;
}
@@ -199,7 +199,7 @@ unsigned char spi_transfer(int dno, unsigned char data)
if(dno >= MAXSPIDEV)
return 0xF0;
if(spi_devices[dno].bus==NULL)
return 0xF1;
@@ -229,10 +229,10 @@ void spi_bulk_write_32_be(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
nread = 0;
nwritten = words;
@@ -245,7 +245,7 @@ void spi_bulk_write_32_be(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
(void) spi_devices[dno].bus->buf;
nread++;
@@ -263,10 +263,10 @@ void spi_bulk_write_32(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
nread = 0;
nwritten = words;
@@ -279,7 +279,7 @@ void spi_bulk_write_32(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
(void) spi_devices[dno].bus->buf;
nread++;
@@ -297,10 +297,10 @@ void spi_bulk_write_16(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
nread = 0;
nwritten = words;
@@ -313,7 +313,7 @@ void spi_bulk_write_16(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
(void) spi_devices[dno].bus->buf;
nread++;
@@ -326,18 +326,18 @@ void spi_bulk_write(int dno, unsigned int len, unsigned char *data)
{
unsigned char *data8 = data;
unsigned int i;
unsigned char in,out;
unsigned char out;
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
for(i=0; i<len; i++)
{
out = *data8;
in = spi_transfer(dno, out);
spi_transfer(dno, out);
data8++;
}
}
@@ -355,7 +355,7 @@ void spi_bulk_read_32_be(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -371,7 +371,7 @@ void spi_bulk_read_32_be(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
*data32++ = mips_bswap(spi_devices[dno].bus->buf);
nread++;
@@ -389,7 +389,7 @@ void spi_bulk_read_32(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -405,7 +405,7 @@ void spi_bulk_read_32(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
*data32++ = spi_devices[dno].bus->buf;
nread++;
@@ -423,7 +423,7 @@ void spi_bulk_read_16(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -439,7 +439,7 @@ void spi_bulk_read_16(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
*data16++ = mips_bswap(spi_devices[dno].bus->buf);
nread++;
@@ -456,7 +456,7 @@ void spi_bulk_read(int dno, unsigned int len, unsigned char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -479,7 +479,7 @@ void spi_bulk_rw_32_be(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -495,7 +495,7 @@ void spi_bulk_rw_32_be(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
*read32++ = mips_bswap(spi_devices[dno].bus->buf);
nread++;
@@ -514,7 +514,7 @@ void spi_bulk_rw_32(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -530,7 +530,7 @@ void spi_bulk_rw_32(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
*read32++ = spi_devices[dno].bus->buf;
nread++;
@@ -549,7 +549,7 @@ void spi_bulk_rw_16(int dno, unsigned int len, char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
@@ -565,7 +565,7 @@ void spi_bulk_rw_16(int dno, unsigned int len, char *data)
nwritten--;
}
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
if(!(spi_devices[dno].bus->stat & PIC32_SPISTAT_SPIRBE))
{
*read16++ = mips_bswap(spi_devices[dno].bus->buf);
nread++;
@@ -582,7 +582,7 @@ void spi_bulk_rw(int dno, unsigned int len, unsigned char *data)
if(dno >= MAXSPIDEV)
return;
if(spi_devices[dno].bus==NULL)
return;
+10
View File
@@ -37,6 +37,16 @@ ifndef GCCPREFIX
INCLUDES =
endif
# Mentor Sourcery CodeBench Lite toolchain
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# You can download a Linux or Windows binary package from
# https://sourcery.mentor.com/GNUToolchain/release2641
ifndef GCCPREFIX
GCCPREFIX = /usr/local/mips-2013.11/bin/mips-sde-elf-
LDFLAGS = -Wl,--oformat=elf32-tradlittlemips
INCLUDES =
endif
CC = $(GCCPREFIX)gcc -mips32r2 -EL -msoft-float -nostdinc -fshort-double -I$(TOPSRC)/include $(INCLUDES)
CXX = $(GCCPREFIX)g++ -mips32r2 -EL -msoft-float -nostdinc -fshort-double -I$(TOPSRC)/include $(INCLUDES)
LD = $(GCCPREFIX)ld
+5 -4
View File
@@ -361,15 +361,16 @@ usage: fprintf(stderr,
for (i = 0; i < ex.e_phnum; i++) {
/* Section types we can ignore... */
if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE ||
ph[i].p_type == PT_PHDR || ph[i].p_type == PT_MIPS_REGINFO)
ph[i].p_type == PT_PHDR || ph[i].p_type == PT_MIPS_REGINFO ||
ph[i].p_type == PT_GNU_EH_FRAME)
continue;
/* Section types we can't handle... */
if (ph[i].p_type != PT_LOAD)
errx(1, "Program header %d type %d can't be converted.", i, ph[i].p_type);
if (verbose)
printf ("Section type=%x flags=%x vaddr=%x filesz=%x\n",
ph[i].p_type, ph[i].p_flags, ph[i].p_vaddr, ph[i].p_filesz);
/* Section types we can't handle... */
if (ph[i].p_type != PT_LOAD && ph[i].p_type != PT_GNU_EH_FRAME)
errx(1, "Program header %d type %x can't be converted.", i, ph[i].p_type);
/* Writable (data) segment? */
if (ph[i].p_flags & PF_W) {