Date: Thu, 21 Dec 2006 17:42:12 +0300 From: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru> To: <freebsd-current@freebsd.org> Subject: building kernel with lang/gcc41 (or lang/gcc42) Message-ID: <78664C02FF341B4FAC63E561846E3BCC035109@ex.hhp.local>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78664C02FF341B4FAC63E561846E3BCC035109>