svn commit: r232711 - in projects/bigbb: share/mk
sys/boot/i386/boot2 sys/boot/pc98/boot2
Jung-uk Kim
jkim at FreeBSD.org
Fri Mar 9 00:53:55 UTC 2012
Author: jkim
Date: Fri Mar 9 00:53:54 2012
New Revision: 232711
URL: http://svn.freebsd.org/changeset/base/232711
Log:
Spread more shrink ray on boot2.
Submitted by: dim
Modified:
projects/bigbb/share/mk/bsd.sys.mk
projects/bigbb/sys/boot/i386/boot2/Makefile
projects/bigbb/sys/boot/i386/boot2/boot2.c
projects/bigbb/sys/boot/pc98/boot2/Makefile
Modified: projects/bigbb/share/mk/bsd.sys.mk
==============================================================================
--- projects/bigbb/share/mk/bsd.sys.mk Fri Mar 9 00:28:28 2012 (r232710)
+++ projects/bigbb/share/mk/bsd.sys.mk Fri Mar 9 00:53:54 2012 (r232711)
@@ -100,8 +100,10 @@ CWARNFLAGS += -Wno-unknown-pragmas
.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
CLANG_NO_IAS = -no-integrated-as
-CLANG_OPT_SMALL = -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \
- -mllvm -enable-load-pre=false
+CLANG_OPT_SMALL = -mllvm -stack-alignment=8 \
+ -mllvm -inline-threshold=3 \
+ -mllvm -enable-load-pre=false \
+ -mllvm -simplifycfg-dup-ret
.endif
.if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \
Modified: projects/bigbb/sys/boot/i386/boot2/Makefile
==============================================================================
--- projects/bigbb/sys/boot/i386/boot2/Makefile Fri Mar 9 00:28:28 2012 (r232710)
+++ projects/bigbb/sys/boot/i386/boot2/Makefile Fri Mar 9 00:53:54 2012 (r232711)
@@ -46,6 +46,8 @@ CFLAGS= -Os \
-fno-guess-branch-probability \
-fomit-frame-pointer \
-fno-unit-at-a-time \
+ -ffunction-sections \
+ -fdata-sections \
-mno-align-long-strings \
-mrtd \
-mregparm=3 \
Modified: projects/bigbb/sys/boot/i386/boot2/boot2.c
==============================================================================
--- projects/bigbb/sys/boot/i386/boot2/boot2.c Fri Mar 9 00:28:28 2012 (r232710)
+++ projects/bigbb/sys/boot/i386/boot2/boot2.c Fri Mar 9 00:53:54 2012 (r232711)
@@ -148,8 +148,8 @@ static int xputc(int);
static int xgetc(int);
static inline int getc(int);
-static void memcpy(void *, const void *, int);
-static void
+static __noinline void memcpy(void *, const void *, int);
+static __noinline void
memcpy(void *dst, const void *src, int len)
{
const char *s = src;
@@ -223,10 +223,7 @@ main(void)
{
uint8_t autoboot;
ino_t ino;
- size_t nbyte;
- opts = 0;
- kname = NULL;
dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base);
v86.ctl = V86_FLAGS;
v86.efl = PSL_RESERVED_DEFAULT | PSL_I;
@@ -242,10 +239,8 @@ main(void)
autoboot = 1;
if ((ino = lookup(PATH_CONFIG)) ||
- (ino = lookup(PATH_DOTCONFIG))) {
- nbyte = fsread(ino, cmd, sizeof(cmd) - 1);
- cmd[nbyte] = '\0';
- }
+ (ino = lookup(PATH_DOTCONFIG)))
+ fsread(ino, cmd, sizeof(cmd) - 1);
if (*cmd) {
memcpy(cmddup, cmd, sizeof(cmd));
Modified: projects/bigbb/sys/boot/pc98/boot2/Makefile
==============================================================================
--- projects/bigbb/sys/boot/pc98/boot2/Makefile Fri Mar 9 00:28:28 2012 (r232710)
+++ projects/bigbb/sys/boot/pc98/boot2/Makefile Fri Mar 9 00:53:54 2012 (r232711)
@@ -43,6 +43,8 @@ CFLAGS= -Os \
-fno-guess-branch-probability \
-fomit-frame-pointer \
-fno-unit-at-a-time \
+ -ffunction-sections \
+ -fdata-sections \
-mno-align-long-strings \
-mrtd \
-mregparm=3 \
More information about the svn-src-projects
mailing list