[Lunar-commits] <moonbase-core> plugins: added functions setting the defaults for gcc and binutils

Stefan Wold ratler at lunar-linux.org
Sun Nov 24 19:00:10 CET 2013


commit 12225a78c3385b9afa842ae9186e6f0a491e0934
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sat, 23 Nov 2013 12:47:55 -0800
URL: https://github.com/lunar-linux/moonbase-core/commit/12225a78c3385b9afa842ae9186e6f0a491e0934

plugins: added functions setting the defaults for gcc and binutils
---
  compilers/gcc/plugin.d/optimize-gcc_4_8.plugin | +12/-9    
  devel/binutils/plugin.d/optimize-gnu_ld.plugin | +7/-3     
  2 files changed, 19 insertions(+), 12 deletions(-)

--- a/compilers/gcc/plugin.d/optimize-gcc_4_8.plugin
+++ b/compilers/gcc/plugin.d/optimize-gcc_4_8.plugin
@@ -2,18 +2,24 @@
 # gcc-4.8.x compiler optimizations plugin
 #
 
-plugin_compiler_gcc_4_8_optimize()
+compiler_gcc_optimize_defaults()
 {
-  if [ "${LUNAR_COMPILER:-GCC_4_8}" != "GCC_4_8" ]; then
-    return 2
-  fi
-
   # default optimizations
   BOPT=Faster
   CC_OPTS=( Pipe Fortify )
   CPU=$(arch | sed 's;_;-;')
+}
+
+plugin_compiler_gcc_4_8_optimize()
+{
+  if [ "${LUNAR_COMPILER:-GCC_4_8}" != "GCC_4_8" ]; then
+    return 2
+  fi
 
   debug_msg "plugin_compiler_gcc_4_8_optimize($@)"
+
+  compiler_gcc_optimize_defaults
+
   if [ -f /etc/lunar/local/optimizations.GCC_4_8 ]; then
     . /etc/lunar/local/optimizations.GCC_4_8
   fi
@@ -215,10 +221,7 @@ STACK=$STACK
 EOF
   }
 
-  # default optimizations
-  BOPT=Faster
-  CC_OPTS=( Pipe Fortify )
-  CPU=$(arch | sed 's;_;-;')
+  compiler_gcc_optimize_defaults
 
   if [ -f /etc/lunar/local/optimizations.GCC_4_8 ]; then
     . /etc/lunar/local/optimizations.GCC_4_8
--- a/devel/binutils/plugin.d/optimize-gnu_ld.plugin
+++ b/devel/binutils/plugin.d/optimize-gnu_ld.plugin
@@ -2,10 +2,15 @@
 # GNU ld linker optimizations plugin
 #
 
-plugin_gnu_ld_optimize()
+gnu_ld_optimize_defaults()
 {
   # default optimizations
   LDF=( Strip )
+}
+
+plugin_gnu_ld_optimize()
+{
+  gnu_ld_optimize_defaults
 
   if [ -f /etc/lunar/local/optimizations.GNU_LD ]; then
     . /etc/lunar/local/optimizations.GNU_LD
@@ -63,8 +68,7 @@ plugin_gnu_ld_optimize_menu()
     return 2
   fi
 
-  # default optimizations
-  LDF=( Strip )
+  gnu_ld_optimize_defaults
 
   # load previous optimizations
   if [ -e /etc/lunar/local/optimizations.GNU_LD ]; then




More information about the Lunar-commits mailing list