From owner-svn-ports-all@freebsd.org Tue Nov 14 14:05:48 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCFB6DBFBE3; Tue, 14 Nov 2017 14:05:48 +0000 (UTC) (envelope-from gerald@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 mx1.freebsd.org (Postfix) with ESMTPS id 875877FCD9; Tue, 14 Nov 2017 14:05:48 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEE5ltA067841; Tue, 14 Nov 2017 14:05:47 GMT (envelope-from gerald@FreeBSD.org) Received: (from gerald@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEE5lcn067840; Tue, 14 Nov 2017 14:05:47 GMT (envelope-from gerald@FreeBSD.org) Message-Id: <201711141405.vAEE5lcn067840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gerald set sender to gerald@FreeBSD.org using -f From: Gerald Pfeifer Date: Tue, 14 Nov 2017 14:05:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r454177 - head/lang/gcc7 X-SVN-Group: ports-head X-SVN-Commit-Author: gerald X-SVN-Commit-Paths: head/lang/gcc7 X-SVN-Commit-Revision: 454177 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.25 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: Tue, 14 Nov 2017 14:05:48 -0000 Author: gerald Date: Tue Nov 14 14:05:47 2017 New Revision: 454177 URL: https://svnweb.freebsd.org/changeset/ports/454177 Log: Make sure what we install is stripped (i.e., debug info is removed). The straightforward way is setting INSTALL_TARGET to install-strip, which is supported by the upstream GCC build machinery. Unfortunately this fails when running as regular user (non-root) since strip requires write permission to the files in question, and we install binaries as r-xr-xr-x by default. To work around that we need to set BINMODE to allow for write access by the user, something that's common on GNU/Linux (which is why this probably has not been noticed there). This is not necessary when running as root. (A different approach suggested was to set STRIP=true, alas that leads to many files actually not being stripped. This is due to GCC using its own script install-sh that in turn uses cp, chmod, strip,... instead of our own install-* tools in many cases.) According to tests by sobomax@ and me installs of lang/gcc6 went down by about a fourth. Reported by: Ports QA Framework, miwi, sobomax Discussed with: tijl, miwi Tested by: sobomax Differential Revision: https://reviews.freebsd.org/D10357 Modified: head/lang/gcc7/Makefile Modified: head/lang/gcc7/Makefile ============================================================================== --- head/lang/gcc7/Makefile Tue Nov 14 13:59:23 2017 (r454176) +++ head/lang/gcc7/Makefile Tue Nov 14 14:05:47 2017 (r454177) @@ -3,7 +3,7 @@ PORTNAME= gcc PORTVERSION= 7.2.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= lang MASTER_SITES= GCC/releases/gcc-${DISTVERSION} PKGNAMESUFFIX= ${SUFFIX} @@ -82,6 +82,10 @@ CONFIGURE_ARGS+=--disable-bootstrap .else CONFIGURE_ARGS+=--with-build-config=bootstrap-debug ALL_TARGET= bootstrap-lean +.endif +INSTALL_TARGET= install-strip +.if ${UID} != 0 +BINMODE= 755 .endif CONFIGURE_ARGS+=--disable-nls \ --enable-gnu-indirect-function \