From: Arun Thomas Date: Fri, 11 Jun 2010 16:05:36 +0000 (+0000) Subject: Makefile updates: X-Git-Tag: v3.1.8~452 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/spin.js?a=commitdiff_plain;h=1b2c01db1b2835e9be967ab89a007a15fdc5abe5;p=minix.git Makefile updates: Turn on optimization Remove some redundancy in FLAGS --- diff --git a/drivers/Makefile.inc b/drivers/Makefile.inc new file mode 100644 index 000000000..7d3ec0536 --- /dev/null +++ b/drivers/Makefile.inc @@ -0,0 +1,2 @@ +CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE +BINDIR?=/usr/sbin diff --git a/drivers/readclock/Makefile b/drivers/readclock/Makefile index 2096f3615..65f85dd9b 100644 --- a/drivers/readclock/Makefile +++ b/drivers/readclock/Makefile @@ -9,6 +9,6 @@ MAN= BINDIR?= /sbin -CPPFLAGS+= -D_MINIX=1 -D_POSIX_SOURCE=1 -D_SYSTEM=1 +CPPFLAGS+= -D_SYSTEM=1 .include diff --git a/etc/mk/minix.sys.mk b/etc/mk/minix.sys.mk index e7f096b95..e36cea11b 100644 --- a/etc/mk/minix.sys.mk +++ b/etc/mk/minix.sys.mk @@ -100,8 +100,7 @@ PIE_AFLAGS?= -fPIC -DPIC # Helpers for cross-compiling HOST_CC?= cc -#XXX: Temporarily disable -O for MINIX -#HOST_CFLAGS?= -O +HOST_CFLAGS?= -O HOST_CFLAGS?= HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c HOST_COMPILE.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} -c @@ -112,8 +111,7 @@ HOST_LINK.c?= ${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS} .endif HOST_CXX?= c++ -#XXX: Temporarily disable -O for MINIX -#HOST_CXXFLAGS?= -O +HOST_CXXFLAGS?= -O HOST_CXXFLAGS?= HOST_CPP?= cpp diff --git a/etc/mk/sys.mk b/etc/mk/sys.mk index 5cc42e252..415725b27 100644 --- a/etc/mk/sys.mk +++ b/etc/mk/sys.mk @@ -42,8 +42,7 @@ DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload # see src/doc/HACKS for details DBG?= -O1 .else -#XXX: Temporarily disable -O for MINIX -#DBG?= -O +DBG?= -O DBG?= .endif CFLAGS?= ${DBG} diff --git a/lib/Makefile.inc b/lib/Makefile.inc new file mode 100644 index 000000000..2f01bf55d --- /dev/null +++ b/lib/Makefile.inc @@ -0,0 +1,2 @@ +CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE +AFLAGS+= -D_MINIX -D_POSIX_SOURCE diff --git a/lib/ack/libd/Makefile b/lib/ack/libd/Makefile index 25e3bf676..5777203cd 100644 --- a/lib/ack/libd/Makefile +++ b/lib/ack/libd/Makefile @@ -8,7 +8,7 @@ # routines are found in libc.a. (The printf and scanf need floating point # for the %f formats, whether you use them or not.) -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -I${.CURDIR}/../../libc/stdio +CPPFLAGS+=-I${.CURDIR}/../../libc/stdio LIB= d diff --git a/lib/ack/libe/Makefile b/lib/ack/libe/Makefile index 458f61571..a79e19ad3 100644 --- a/lib/ack/libe/Makefile +++ b/lib/ack/libe/Makefile @@ -4,7 +4,7 @@ LIB= e -AFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Was-ack +AFLAGS+=-Was-ack .include "${.CURDIR}/arch/${ARCH}/em/Makefile.inc" .include "${.CURDIR}/arch/${ARCH}/head/Makefile.inc" diff --git a/lib/ack/libfp/Makefile b/lib/ack/libfp/Makefile index 2425876b7..d55950c8e 100644 --- a/lib/ack/libfp/Makefile +++ b/lib/ack/libfp/Makefile @@ -6,7 +6,7 @@ .fc.o: ${_MKTARGET_COMPILE} cp ${.IMPSRC} tmp.c - cc -O -I${.CURDIR} -D_MINIX -D_POSIX_SOURCE -S tmp.c + cc -I${.CURDIR} ${CFLAGS} -S tmp.c sed -f ${.CURDIR}/FP.script tmp.s > ${.PREFIX}.s cc -I${.CURDIR} -c -o ${.TARGET} ${.PREFIX}.s rm -f tmp.c tmp.s ${PREFIX}.s diff --git a/lib/ack/liby/Makefile b/lib/ack/liby/Makefile index d51374343..50503383e 100644 --- a/lib/ack/liby/Makefile +++ b/lib/ack/liby/Makefile @@ -1,7 +1,5 @@ # Makefile for liby -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE - LIB= y SRCS= \ diff --git a/lib/csu/Makefile b/lib/csu/Makefile index 038865eda..b6abdb223 100644 --- a/lib/csu/Makefile +++ b/lib/csu/Makefile @@ -2,8 +2,6 @@ .PATH: ${.CURDIR}/${ARCH} -AFLAGS+= -O -D_MINIX -D_POSIX_SOURCE - SRCS= crtso.S OBJS= crtso.o diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index ec9c188a4..5673753e1 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -7,7 +7,6 @@ BZ2DIR= ${MINIXSRCDIR}/commands/bzip2 SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \ huffman.c randtable.c CPPFLAGS+= -I ${BZ2DIR} -CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE INCS= bzlib.h INCSDIR= /usr/include diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 1227c3d35..5590fbc1f 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -4,8 +4,6 @@ LIB= c -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE - .include "${.CURDIR}/ansi/Makefile.inc" .include "${.CURDIR}/asyn/Makefile.inc" .include "${.CURDIR}/ip/Makefile.inc" diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile index fc4a23219..0bd8367a2 100644 --- a/lib/libcurses/Makefile +++ b/lib/libcurses/Makefile @@ -1,7 +1,6 @@ # Makefile for libcurses LIB= curses -CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE SRCS= \ beep.c \ diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile index 57f833760..d069392b6 100644 --- a/lib/libedit/Makefile +++ b/lib/libedit/Makefile @@ -19,11 +19,9 @@ LIB= edit ## -DUSE_TERMCAP Use the termcap library for terminal size ## see LDFLAGS, below, if you set this. ## -DNEED_PERROR Don't have (used in testit) -DEFS=-DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \ +CPPFLAGS+=-DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \ -DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE ${DEFS} - SRCS= editline.c complete.c sysunix.c .include diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index af2221a03..11207c132 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -2,8 +2,6 @@ LIB= sys -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE - SRCS= \ alloc_util.c \ assert.c \ diff --git a/lib/libtimers/Makefile b/lib/libtimers/Makefile index 1fbc03c3b..5fee62830 100644 --- a/lib/libtimers/Makefile +++ b/lib/libtimers/Makefile @@ -1,7 +1,5 @@ # Makefile for libtimers -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE - LIB= timers SRCS= \ diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index e06878d99..49d77f3bc 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -1,7 +1,5 @@ # Makefile for libutil -CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE - LIB= util SRCS= openpty.c sha2.c efun.c diff --git a/servers/Makefile.inc b/servers/Makefile.inc new file mode 100644 index 000000000..7d3ec0536 --- /dev/null +++ b/servers/Makefile.inc @@ -0,0 +1,2 @@ +CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE +BINDIR?=/usr/sbin diff --git a/servers/init/Makefile b/servers/init/Makefile index 278765a48..7f4a4dd78 100644 --- a/servers/init/Makefile +++ b/servers/init/Makefile @@ -10,6 +10,4 @@ MAN= BINDIR?= /usr/sbin INSTALLFLAGS+= -S 64k -CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE - .include diff --git a/tools/Makefile b/tools/Makefile index 5669102c0..0496c8a00 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,6 @@ # Makefile for the kernel image. u=/usr -CFLAGS= -O -D_MINIX -D_POSIX_SOURCE MDEC= /usr/mdec # Specify the programs that are part of the system image.