From owner-svn-ports-all@freebsd.org Sat Nov 16 12:39:25 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D4551C4940; Sat, 16 Nov 2019 12:39:25 +0000 (UTC) (envelope-from dmgk@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47FZXs24nDz45Fs; Sat, 16 Nov 2019 12:39:25 +0000 (UTC) (envelope-from dmgk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F5BF17F0; Sat, 16 Nov 2019 12:39:25 +0000 (UTC) (envelope-from dmgk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAGCdPMb029780; Sat, 16 Nov 2019 12:39:25 GMT (envelope-from dmgk@FreeBSD.org) Received: (from dmgk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAGCdP6j029779; Sat, 16 Nov 2019 12:39:25 GMT (envelope-from dmgk@FreeBSD.org) Message-Id: <201911161239.xAGCdP6j029779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dmgk set sender to dmgk@FreeBSD.org using -f From: Dmitri Goutnik Date: Sat, 16 Nov 2019 12:39:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r517743 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: dmgk X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 517743 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2019 12:39:25 -0000 Author: dmgk Date: Sat Nov 16 12:39:24 2019 New Revision: 517743 URL: https://svnweb.freebsd.org/changeset/ports/517743 Log: Mk/Uses/go.mk: Omit symbol table and debug information by default PR: 233335 Reported by: yuri Reviewed by: 0mp, tobik Approved by: araujo (mentor) Differential Revision: https://reviews.freebsd.org/D21730 Modified: head/Mk/Uses/go.mk Modified: head/Mk/Uses/go.mk ============================================================================== --- head/Mk/Uses/go.mk Sat Nov 16 12:39:11 2019 (r517742) +++ head/Mk/Uses/go.mk Sat Nov 16 12:39:24 2019 (r517743) @@ -44,7 +44,7 @@ # command # # GO_BUILDFLAGS -# Additional build arguments to be passed to the `go install` command +# Additional build arguments to be passed to the `go build` command # # GO_PORT # The Go port to use. By default this is lang/go but can be set @@ -62,6 +62,7 @@ IGNORE= USES=go has invalid arguments: ${go_ARGS:Nmodu .endif # Settable variables + .if empty(GO_PKGNAME) . if !empty(GH_SUBDIR) GO_PKGNAME= ${GH_SUBDIR:S|^src/||} @@ -72,18 +73,24 @@ GO_PKGNAME= ${PORTNAME} . endif .endif GO_TARGET?= ${GO_PKGNAME} + GO_BUILDFLAGS+= -v -buildmode=exe +.if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) +GO_BUILDFLAGS+= -ldflags=-s +.endif + CGO_ENABLED?= 1 CGO_CFLAGS+= -I${LOCALBASE}/include CGO_LDFLAGS+= -L${LOCALBASE}/lib + .if ${ARCH} == armv6 || ${ARCH} == armv7 GOARM?= ${ARCH:C/armv//} .endif # Read-only variables + GO_CMD= ${LOCALBASE}/bin/go GO_WRKDIR_BIN= ${WRKDIR}/bin - GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ CGO_CFLAGS="${CGO_CFLAGS}" \ CGO_LDFLAGS="${CGO_LDFLAGS}" \