From: Lionel Sambuc Date: Wed, 28 Jan 2015 14:04:27 +0000 (+0100) Subject: Support BUILDVARS from cmd line in configure.llvm X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=3ceafe99fd45a28408ea53b8c59e5d9c47ffc362;p=minix.git Support BUILDVARS from cmd line in configure.llvm Change-Id: I59527c60cb34c12fd2bed449b37bb812a83c4e42 --- diff --git a/minix/llvm/configure.llvm b/minix/llvm/configure.llvm index 5397a5c93..8e0bf07fb 100755 --- a/minix/llvm/configure.llvm +++ b/minix/llvm/configure.llvm @@ -105,15 +105,18 @@ fi ######################## # Build Minix ######################## +export BUILDVARS=$(echo "${BUILDVARS} -V MKBITCODE=yes"| sed -e 's,-V MKMAGIC=yes,-V DBG=-g -V STRIPFLAG=-s -V CPPFLAGS=-D_MINIX_MAGIC=1,') + if [ "${REBUILD_MINIX}" == "yes" ]; then echo "Building Minix..." echo "CC:$CC" echo "CXX:$CXX" echo "JOBS:$JOBS" + echo "BUILDVARS:$BUILDVARS" echo cd ${MINIX_ROOT} - BUILDVARS="-V MKBITCODE=yes" ./releasetools/x86_hdimage.sh || EXITCODE=1 + ./releasetools/x86_hdimage.sh || EXITCODE=1 cd ${MYPWD} if [ "$EXITCODE" != "0" ]; then echo "Error: Failed building Minix source code." diff --git a/share/mk/sys.mk b/share/mk/sys.mk index ae407b1bb..c06bebb5e 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -61,7 +61,11 @@ DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload .else DBG?= -O2 .endif +.if !defined(__MINIX) CFLAGS?= ${DBG} +.else +CFLAGS+= ${DBG} +.endif # !defined(__MINIX) LDFLAGS?= COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}