Date: Sat, 8 Nov 2014 19:04:23 +0300 From: Gleb Smirnoff <glebius@FreeBSD.org> To: "Bjoern A. Zeeb" <bz@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r274289 - in head/sys: modules/if_gre net Message-ID: <20141108160423.GR1031@FreeBSD.org> In-Reply-To: <201411081441.sA8EfXAZ053154@svn.freebsd.org> References: <201411081441.sA8EfXAZ053154@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 08, 2014 at 02:41:33PM +0000, Bjoern A. Zeeb wrote: B> Author: bz B> Date: Sat Nov 8 14:41:32 2014 B> New Revision: 274289 B> URL: https://svnweb.freebsd.org/changeset/base/274289 B> B> Log: B> After r274246 make the tree compile again. B> B> gcc requires variables to be initialised in two places. One of them B> is correctly used only under the same conditional though. B> B> For module builds properly check if the kernel supports INET or INET6, B> as otherwise various mips kernels without IPv6 support would fail to build. B> B> Modified: B> head/sys/modules/if_gre/Makefile B> head/sys/net/if_gre.c B> B> Modified: head/sys/modules/if_gre/Makefile B> ============================================================================== B> --- head/sys/modules/if_gre/Makefile Sat Nov 8 13:49:59 2014 (r274288) B> +++ head/sys/modules/if_gre/Makefile Sat Nov 8 14:41:32 2014 (r274289) B> @@ -6,10 +6,24 @@ B> KMOD= if_gre B> SRCS= if_gre.c opt_inet.h opt_inet6.h B> B> +.if defined(KERNBUILDDIR) B> +OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo B> +.if empty(OPT_INET) B> +MK_INET_SUPPORT=no B> +.endif B> +.endif B> + B> .if ${MK_INET_SUPPORT} != "no" B> SRCS+= ip_gre.c B> .endif B> B> +.if defined(KERNBUILDDIR) B> +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo B> +.if empty(OPT_INET6) B> +MK_INET6_SUPPORT=no B> +.endif B> +.endif B> + B> .if ${MK_INET6_SUPPORT} != "no" B> SRCS+= ip6_gre.c B> .endif Thanks for the fix. This code looks very much like a dirty workaround, and we already have it in other modules, e.g. if_gif. Maybe someone with Make-foo can handle this properly in the build infrastructure. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141108160423.GR1031>