pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Add a new option 'always-libgcc', whether to install l...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f095b2cd554f
branches:  trunk
changeset: 339203:f095b2cd554f
user:      maya <maya%pkgsrc.org@localhost>
date:      Sun Sep 08 14:05:38 2019 +0000

description:
Add a new option 'always-libgcc', whether to install libgcc.
If the pkgsrc compiler is GCC, don't install libgcc.

Having an older libgcc is problematic: it may be missing symbols from
newer libgcc. This is what happened in PR pkg/54506.

Use this on gcc-aux and gcc5-aux: the libgcc_s.so they install is going
to be older in all the operating systems these packages support.
(Other GCC packages will require a more elaborate rule)

Leaving SmartOS unchanged, by request from jperkin.

diffstat:

 lang/gcc-aux/options.mk         |  22 ++++++++++++++++++++--
 lang/gcc5-aux/options.mk        |  24 ++++++++++++++++++++++--
 mk/defaults/options.description |   1 +
 3 files changed, 43 insertions(+), 4 deletions(-)

diffs (96 lines):

diff -r 3127a329d9bd -r f095b2cd554f lang/gcc-aux/options.mk
--- a/lang/gcc-aux/options.mk   Sun Sep 08 12:34:48 2019 +0000
+++ b/lang/gcc-aux/options.mk   Sun Sep 08 14:05:38 2019 +0000
@@ -1,12 +1,19 @@
-# $NetBSD: options.mk,v 1.6 2017/07/10 00:21:31 maya Exp $
+# $NetBSD: options.mk,v 1.7 2019/09/08 14:05:38 maya Exp $
 
 # NLS is failing, might be linking with wrong iconv lib.
 # Disable option until further notice
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.gcc-aux
-PKG_SUPPORTED_OPTIONS=  fortran objc testsuite static bootstrap #nls
+PKG_SUPPORTED_OPTIONS=  fortran objc testsuite static bootstrap always-libgcc #nls
 PKG_SUGGESTED_OPTIONS=  fortran objc #nls
 
+.include "../../mk/compiler.mk"
+.if empty(PKGSRC_COMPILER:Mgcc)
+PKG_SUGGESTED_OPTIONS+=                always-libgcc
+.endif
+
+PKG_SUGGESTED_OPTIONS.SunOS+=  always-libgcc
+
 .include "../../mk/bsd.options.mk"
 
 
@@ -30,6 +37,17 @@
 .endif
 .endif
 
+#############################
+##  Don't install libgcc   ##
+#############################
+
+.if empty(PKG_OPTIONS:Malways-libgcc)
+post-install:  delete-installed-libgcc
+
+delete-installed-libgcc:
+       ${FIND} ${DESTDIR} -name 'libgcc_s.so*' -delete
+
+.endif
 
 #################################
 ##  ADD LANGUAGE: Objective-C  ##
diff -r 3127a329d9bd -r f095b2cd554f lang/gcc5-aux/options.mk
--- a/lang/gcc5-aux/options.mk  Sun Sep 08 12:34:48 2019 +0000
+++ b/lang/gcc5-aux/options.mk  Sun Sep 08 14:05:38 2019 +0000
@@ -1,9 +1,16 @@
-# $NetBSD: options.mk,v 1.5 2017/07/09 23:17:39 maya Exp $
+# $NetBSD: options.mk,v 1.6 2019/09/08 14:05:38 maya Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.gcc5-aux
-PKG_SUPPORTED_OPTIONS=  fortran objc testsuite static bootstrap allstages
+PKG_SUPPORTED_OPTIONS=  fortran objc testsuite static bootstrap allstages always-libgcc
 PKG_SUGGESTED_OPTIONS=  #fortran objc 
 
+.include "../../mk/compiler.mk"
+.if empty(PKGSRC_COMPILER:Mgcc)
+PKG_SUGGESTED_OPTIONS+=                always-libgcc
+.endif
+
+PKG_SUGGESTED_OPTIONS.SunOS+=  always-libgcc
+
 # disable nls for now (build error involving iconv)
 # disable fortran, breaks during build on NetBSD 7.0-beta
 
@@ -31,6 +38,19 @@
 .endif
 
 
+#############################
+##  Don't install libgcc   ##
+#############################
+
+.if empty(PKG_OPTIONS:Malways-libgcc)
+post-install:  delete-installed-libgcc
+
+delete-installed-libgcc:
+       ${FIND} ${DESTDIR} -name 'libgcc_s.so*' -delete
+
+.endif
+
+
 #################################
 ##  ADD LANGUAGE: Objective-C  ##
 #################################
diff -r 3127a329d9bd -r f095b2cd554f mk/defaults/options.description
--- a/mk/defaults/options.description   Sun Sep 08 12:34:48 2019 +0000
+++ b/mk/defaults/options.description   Sun Sep 08 14:05:38 2019 +0000
@@ -7,6 +7,7 @@
 afterstep              Enable afterstep support.
 agg                    Enable agg support.
 alsa                   Enable ALSA support.
+always-libgcc          Install libgcc unconditionally, even if it's older.
 amanda-bsdtar          Enable bsdtar support in Amanda.
 amanda-dump-snap       If dump supports -X, use it.
 amanda-fqdn            Use FQDN's in Amanda.



Home | Main Index | Thread Index | Old Index