From owner-freebsd-current@FreeBSD.ORG Thu Dec 21 14:42:24 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1C1716A417 for ; Thu, 21 Dec 2006 14:42:24 +0000 (UTC) (envelope-from Yuriy.Tsibizov@gfk.ru) Received: from mx.gfk.ru (mx.gfk.ru [84.21.231.130]) by mx1.freebsd.org (Postfix) with ESMTP id 2088513C466 for ; Thu, 21 Dec 2006 14:42:23 +0000 (UTC) (envelope-from Yuriy.Tsibizov@gfk.ru) Received: from ex.hhp.local by mx.gfk.ru (MDaemon PRO v9.5.3) with ESMTP id md50000796751.msg for ; Thu, 21 Dec 2006 17:42:18 +0300 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Dec 2006 17:42:12 +0300 Message-ID: <78664C02FF341B4FAC63E561846E3BCC035109@ex.hhp.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: building kernel with lang/gcc41 (or lang/gcc42) thread-index: AcclDjOszOWAf3mqQEaHES8ZaZ1lJg== From: "Yuriy Tsibizov" To: X-Spam-Processed: mx.gfk.ru, Thu, 21 Dec 2006 17:42:18 +0300 (not processed: message from valid local sender) X-MDRemoteIP: 10.0.0.30 X-Return-Path: Yuriy.Tsibizov@gfk.ru X-Envelope-From: Yuriy.Tsibizov@gfk.ru X-MDaemon-Deliver-To: freebsd-current@freebsd.org X-MDAV-Processed: mx.gfk.ru, Thu, 21 Dec 2006 17:42:20 +0300 Subject: building kernel with lang/gcc41 (or lang/gcc42) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2006 14:42:24 -0000 Are there any ways to build kernel with GCC from ports without patching FreeBSD sources? I'm mostly interested in syntax checks, not a working kernel / modules. I have to use patch below, because - it does not like -fformat-extentions and -mno-align-long-strings - it does not define __FreeBSD_cc_version. Index: sys/conf/kern.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/conf/kern.mk,v retrieving revision 1.50 diff -u -r1.50 kern.mk --- sys/conf/kern.mk 26 Nov 2006 23:16:46 -0000 1.50 +++ sys/conf/kern.mk 20 Dec 2006 05:20:15 -0000 @@ -12,7 +12,7 @@ .else CWARNFLAGS?=3D -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - ${_wundef} -fformat-extensions + ${_wundef} .if !defined(NO_UNDEF) _wundef=3D -Wundef .endif @@ -33,7 +33,7 @@ # reserved for user applications. # .if ${MACHINE_ARCH} =3D=3D "i386" && ${CC} !=3D "icc" -CFLAGS+=3D -mno-align-long-strings -mpreferred-stack-boundary=3D2 \ +CFLAGS+=3D -mpreferred-stack-boundary=3D2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 INLINE_LIMIT?=3D 8000 .endif Index: sys/sys/cdefs.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/sys/cdefs.h,v retrieving revision 1.93 diff -u -r1.93 cdefs.h --- sys/sys/cdefs.h 21 Sep 2006 01:38:58 -0000 1.93 +++ sys/sys/cdefs.h 20 Dec 2006 17:29:42 -0000 @@ -338,6 +338,10 @@ #endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ +#ifndef __FreeBSD_cc_version +#define __FreeBSD_cc_version 0 +#endif + #if __FreeBSD_cc_version >=3D 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER) #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) Yuriy