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 =================================================================== 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 _at__at_ -12,7 +12,7 _at__at_ .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - ${_wundef} -fformat-extensions + ${_wundef} .if !defined(NO_UNDEF) _wundef= -Wundef .endif _at__at_ -33,7 +33,7 _at__at_ # reserved for user applications. # .if ${MACHINE_ARCH} == "i386" && ${CC} != "icc" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 \ +CFLAGS+= -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 INLINE_LIMIT?= 8000 .endif Index: sys/sys/cdefs.h =================================================================== 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 _at__at_ -338,6 +338,10 _at__at_ #endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ +#ifndef __FreeBSD_cc_version +#define __FreeBSD_cc_version 0 +#endif + #if __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER) #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) YuriyReceived on Thu Dec 21 2006 - 13:42:24 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC