Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Nov 2017 10:10:44 +0000 (UTC)
From:      Gerald Pfeifer <gerald@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r454422 - head/lang/gcc6
Message-ID:  <201711181010.vAIAAijn049585@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gerald
Date: Sat Nov 18 10:10:43 2017
New Revision: 454422
URL: https://svnweb.freebsd.org/changeset/ports/454422

Log:
  Backport revision 454177 from lang/gcc7 now also to lang/gcc6, the
  current default GCC port:
  
  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.
  
  Do not bump PORTREVISION since this only changes builds by non-root
  users, is not a functional change, and the previous state of using
  a bit more storage had been there "forever".
  
  Reported by:	Ports QA Framework, miwi, sobomax
  Discussed with:	tijl, miwi
  Tested by:	sobomax
  Differential Revision:	https://reviews.freebsd.org/D10357

Modified:
  head/lang/gcc6/Makefile

Modified: head/lang/gcc6/Makefile
==============================================================================
--- head/lang/gcc6/Makefile	Sat Nov 18 09:42:10 2017	(r454421)
+++ head/lang/gcc6/Makefile	Sat Nov 18 10:10:43 2017	(r454422)
@@ -94,6 +94,10 @@ CONFIGURE_ARGS+=--disable-bootstrap
 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 \
 		--libdir=${TARGLIB} \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711181010.vAIAAijn049585>