From owner-svn-src-all@FreeBSD.ORG Sat Nov 8 16:04:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C025AE; Sat, 8 Nov 2014 16:04:26 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AE8A3E7D; Sat, 8 Nov 2014 16:04:25 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sA8G4N7a071893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 8 Nov 2014 19:04:23 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sA8G4NbB071892; Sat, 8 Nov 2014 19:04:23 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 8 Nov 2014 19:04:23 +0300 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Subject: Re: svn commit: r274289 - in head/sys: modules/if_gre net Message-ID: <20141108160423.GR1031@FreeBSD.org> References: <201411081441.sA8EfXAZ053154@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411081441.sA8EfXAZ053154@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2014 16:04:26 -0000 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.