Enable mips16e instruction set for all user binaries.

This commit is contained in:
Serge Vakulenko
2015-11-03 21:36:31 -08:00
parent abcfb06b0b
commit 7ddf7686a3
21 changed files with 54 additions and 42 deletions

View File

@@ -16,7 +16,7 @@ SUBDIR = adb adc-demo aout ar as awk basic calendar cc chflags \
man md5 med more nm passwd pdc picoc portio printf pwm \
ranlib re renice retroforth scm sed setty sh sl smallc \
smlrc smux stty sysctl test uname wiznet xargs \
zmodem gtest msec unixbench cron compress date2 tip \
zmodem gtest msec cron compress date2 tip \
talloc uucp
# /sbin

View File

@@ -91,7 +91,8 @@ delete(argv)
SETCF(tfd, tname, afd, archive, NOPAD);
copy_ar(&cf, size);
(void)close(tfd);
(void)ftruncate(afd, size + SARMAG);
if (ftruncate(afd, size + SARMAG) < 0)
/* ignore */;
close_archive(afd);
if (*argv) {

View File

@@ -136,7 +136,8 @@ move(argv)
cf.rfd = tfd3;
copy_ar(&cf, size);
(void)ftruncate(afd, tsize + SARMAG);
if (ftruncate(afd, tsize + SARMAG) < 0)
/* ignore */;
close_archive(afd);
if (*argv) {

View File

@@ -190,7 +190,8 @@ append: while ((file = *argv++) != 0) {
cf.rfd = tfd2;
copy_ar(&cf, size);
(void)ftruncate(afd, tsize + SARMAG);
if (ftruncate(afd, tsize + SARMAG) < 0)
/* ignore */;
close_archive(afd);
return(err);
}

View File

@@ -1568,7 +1568,8 @@ int main (argc, argv)
if (! ofilfnd) {
unlink ("a.out");
link ("l.out", "a.out");
if (link ("l.out", "a.out") < 0)
perror("a.out");
ofilename = "a.out";
}
delarg = errlev;

View File

@@ -385,7 +385,8 @@ int build()
(void)lseek(tfd, (off_t)0, SEEK_SET);
SETCF(tfd, tname, afd, archive, RPAD|WPAD);
copy_ar(&cf, size);
(void)ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR));
if (ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR)) < 0)
/* ignore */;
(void)close(tfd);
/* Set the time. */

View File

@@ -50,7 +50,8 @@ strip(name)
head.a_reldata = 0;
head.a_syms = 0;
(void) lseek(f, (off_t)0, SEEK_SET);
(void) write(f, (char *)&head, sizeof (head));
if (write(f, (char *)&head, sizeof (head)) != sizeof (head))
/* ignore */;
out:
close(f);
}

View File

@@ -57,7 +57,7 @@ OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall
#CFLAGS = -DTIME -std1 -verbose -w0
## generic gcc CFLAGS. -DTIME must be included
CFLAGS = -DTIME -Wall -pedantic -ansi
#CFLAGS = -DTIME -Wall -pedantic -ansi
# local directories
PROGDIR = ./pgms