From owner-p4-projects@FreeBSD.ORG Wed Jul 17 14:46:40 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E02587B7; Wed, 17 Jul 2013 14:46:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A21017B5 for ; Wed, 17 Jul 2013 14:46:39 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [8.8.178.74]) by mx1.freebsd.org (Postfix) with ESMTP id 933923D6 for ; Wed, 17 Jul 2013 14:46:39 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.7/8.14.7) with ESMTP id r6HEkdk6035355 for ; Wed, 17 Jul 2013 14:46:39 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.7/8.14.6/Submit) id r6HEkdYl035352 for perforce@freebsd.org; Wed, 17 Jul 2013 14:46:39 GMT (envelope-from brooks@freebsd.org) Date: Wed, 17 Jul 2013 14:46:39 GMT Message-Id: <201307171446.r6HEkdYl035352@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 231227 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jul 2013 14:46:40 -0000 http://p4web.freebsd.org/@@231227?ac=10 Change 231227 by brooks@brooks_zenith on 2013/07/17 14:46:35 Don't run the optimizer when generating LLVM-IR. Instead, run it in llc when creating the actual object files. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#12 edit .. //depot/projects/ctsrd/tesla/src/sys/conf/kern.pre.mk#6 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#12 (text+ko) ==== @@ -32,7 +32,7 @@ .if defined(%POSIX) .SUFFIXES: .o .c .y .l .a .sh .f .else -.SUFFIXES: .out .a .dot .instrll .instro .oll .obc .ln .manifest .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh +.SUFFIXES: .out .a .dot .instrll .instro .oll .ln .manifest .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh .endif AR ?= ar @@ -126,6 +126,7 @@ LINTLIBFLAGS ?= -cghapbxu -C ${LIB} LLC ?= llc +LLCFLAGS ?= ${CFLAGS:M-O*:S/^-O$/-O1/:S/-O/-O=/} LLVM_LINK ?= llvm-link @@ -231,11 +232,8 @@ chmod a+x ${.TARGET} .c.oll: - ${CC} ${CFLAGS} -emit-llvm -S ${.IMPSRC} -o ${.TARGET} + ${CC} ${CFLAGS:N-O*} -emit-llvm -S ${.IMPSRC} -o ${.TARGET} -.c.obc: - ${CC} ${CFLAGS} -cc1 -emit-llvm -c ${.IMPSRC} -o ${.TARGET} - .c.ln: ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ touch ${.TARGET} @@ -258,9 +256,6 @@ .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.cc.obc .C.obc .cpp.obc .cxx.obc: - ${CXX} ${CXXFLAGS} -cc1 -emit-llvm -c ${.IMPSRC} -o ${.TARGET} - .cc.o .cpp.o .cxx.o .C.o: ${CXX} ${CXXFLAGS} -c ${.IMPSRC} ==== //depot/projects/ctsrd/tesla/src/sys/conf/kern.pre.mk#6 (text+ko) ==== @@ -97,7 +97,7 @@ .endif WERROR?= -Werror -LLCFLAGS= -code-model=kernel +LLCFLAGS+= -code-model=kernel # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}