From owner-freebsd-ports@FreeBSD.ORG Fri May 10 16:59:34 2013 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 739533F7 for ; Fri, 10 May 2013 16:59:34 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from smtp.rcn.com (smtp.rcn.com [69.168.97.78]) by mx1.freebsd.org (Postfix) with ESMTP id 2E06795D for ; Fri, 10 May 2013 16:59:33 +0000 (UTC) X_CMAE_Category: 0,0 Undefined,Undefined X-CNFS-Analysis: v=2.0 cv=FMqZNpUs c=1 sm=0 a=fEl05wXzeJCkBz9gs2itqQ==:17 a=FtuzIWGT4-YA:10 a=wICNXMK2uiYA:10 a=YNqtyO0l_hcA:10 a=LaogzpLLAAAA:8 a=woGWkInhv2wA:10 a=6I5d2MoRAAAA:8 a=B_YlW_nkAAAA:8 a=gqL5wcr205aqnPanCjAA:9 a=wPNLvfGTeEIA:10 a=gmEgwcmuyqcA:10 a=hFkKD4d5Jsj70dwLBhQA:9 a=_W_S_7VecoQA:10 a=no5xAVIicQj-d2xq:21 a=fEl05wXzeJCkBz9gs2itqQ==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: smtp01.rcn.cmh.synacor.com header.from=mi+thun@aldan.algebra.com; sender-id=neutral Authentication-Results: smtp01.rcn.cmh.synacor.com smtp.mail=mi+thun@aldan.algebra.com; spf=neutral; sender-id=neutral Authentication-Results: smtp01.rcn.cmh.synacor.com smtp.user=anat; auth=pass (PLAIN) Received-SPF: neutral (smtp01.rcn.cmh.synacor.com: 209.6.63.29 is neither permitted nor denied by domain of aldan.algebra.com) Received: from [209.6.63.29] ([209.6.63.29:28800] helo=utka.zajac) by smtp.rcn.com (envelope-from ) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTPA id DB/4C-24381-4772D815; Fri, 10 May 2013 12:59:32 -0400 Message-ID: <518D2773.40504@aldan.algebra.com> Date: Fri, 10 May 2013 12:59:31 -0400 From: "Mikhail T." User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130325 Thunderbird/17.0.4 MIME-Version: 1.0 To: ports@FreeBSD.org, gerald@FreeBSD.org Subject: Why can't lang/gcc4X compilers build kernel modules? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: dim@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2013 16:59:34 -0000 It seems, none of the gcc-ports have the FreeBSD-extensions, that are worked into the base cc. This is fine for regular ports, but the consumers of bsd.kmod.mk (such as print/acroreadwrapper or multimedia/cuse4bsd-kmod) all choke. For example: gcc46 -O2 -pipe -march=prescott -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -std=iso9899:1999 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c linux_adobe.c cc1: error: unrecognized command line option '-mno-align-long-strings' cc1: error: unrecognized command line option '-fformat-extensions' *** Error code 1 Would it be too much work to extend the port-installed compilers the same way gcc-4.2.1 in the base is extended? May be not for gcc4[89], which are complete rewrites, but for 4.[4-7]? If not too difficult, should it be done? Once implemented, it would become easier to build the entire kernel using a newer compiler. And dim@ (CC-ed) has already demonstrated non-trivial speed-ups obtained by building the kernel with gcc-4.7 over gcc-4.2: http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037842.html http://www.andric.com/freebsd/perftest/perftest-kernel-2012-09-25b.txt Yours, -mi