From owner-svn-ports-head@freebsd.org Fri Nov 2 09:56:05 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F9C010EFC15; Fri, 2 Nov 2018 09:56:05 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43D6B80343; Fri, 2 Nov 2018 09:56:05 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 1DEC11A000; Fri, 2 Nov 2018 09:56:05 +0000 (UTC) From: Jan Beich To: Mathieu Arnold Cc: Mark Linimon , svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org Subject: Re: svn commit: r483758 - head/devel/libpru References: <201811020135.wA21ZqbL037253@repo.freebsd.org> <20181102090744.4f7mkmgjuxvrd776@atuin.in.mat.cc> Date: Fri, 02 Nov 2018 10:56:00 +0100 In-Reply-To: <20181102090744.4f7mkmgjuxvrd776@atuin.in.mat.cc> (Mathieu Arnold's message of "Fri, 2 Nov 2018 10:07:44 +0100") Message-ID: <4lcz-ajm7-wny@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 09:56:05 -0000 Mathieu Arnold writes: > On Fri, Nov 02, 2018 at 01:35:52AM +0000, Mark Linimon wrote: > >> Author: linimon >> Date: Fri Nov 2 01:35:51 2018 >> New Revision: 483758 >> URL: https://svnweb.freebsd.org/changeset/ports/483758 >> >> Log: >> Fix build with GCC-based architectures. >> >> PR: 232851 >> Submitted by: Piotr Kubaj >> >> Modified: >> head/devel/libpru/Makefile >> >> Modified: head/devel/libpru/Makefile >> ============================================================================== >> --- head/devel/libpru/Makefile Fri Nov 2 01:34:15 2018 (r483757) >> +++ head/devel/libpru/Makefile Fri Nov 2 01:35:51 2018 (r483758) >> @@ -11,13 +11,15 @@ COMMENT= Library to interface with PRUs >> LICENSE= BSD2CLAUSE >> >> IGNORE_DragonFly= only supported on FreeBSD >> -BROKEN_mips= Does not build: unrecognized command line option -Weverything >> -BROKEN_mips64= Does not build: unrecognized command line option -Weverything >> -BROKEN_powerpc64= Does not build: unrecognized command line option -Weverything >> -BROKEN_sparc64= Does not build: unrecognized command line option -Weverything >> - >> USES= cmake >> >> WRKSRC= ${WRKDIR}/rpaulo-libpru-5a74157b82b8 >> >> -.include >> +.include >> + >> +post-patch: >> +.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 >> + ${REINPLACE_CMD} -e 's/ -Weverything//' ${WRKSRC}/CMakeLists.txt >> +.endif >> + >> +.include > > Could you try and put the whole target definition inside the if so that > it does not needlessly create an empty target, like this: > > > .if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 > post-patch: > ${REINPLACE_CMD} -e 's/ -Weverything//' ${WRKSRC}/CMakeLists.txt > .endif I disagree. If a target is defined conditionally then adding unconditional one with the same name becomes error-prone in that the conflict would only occur if the condition is true. For example: post-patch: @${REINPLACE_CMD} -e 's/ -Werror//' ${WRKSRC}/CMakeLists.txt .include post-patch: .if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 ${REINPLACE_CMD} -e 's/ -Weverything//' ${WRKSRC}/CMakeLists.txt .endif .include where the conflict is hidden on Tier1 archs while Tier2 ones are undertested.