New commits:
commit 40c8b8464b73b3dc1319f13e2d26c5783584386c
Author: Remko van der Vossen <wich AT yuugen.jp>
Commit: Ismael Luceno <ismael AT sourcemage.org>
sorcery: added as_needed optimization option
as_needed will add -Wl,--as-needed to LDFLAGS, which will cause the
linker to
emit DT_NEEDED entries only for directly used libraries. This prevents
programs
and libraries that only indirectly depend on some library from breaking
when
that library has an soname change. A scenario which is very common with
libtool
using build processes.
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 53bc512..c58f921 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -750,6 +750,7 @@ optimization_menu(){
local SPEEDY_HELP="Optimize generated code, conflicts with 'tiny'
(CFLAGS=$FAST)"
local STRIP_HELP="Remove all symbol table and relocation (debugging)
information (LDFLAGS=-s)"
local TINY_HELP="Optimize to smaller generated code, conflicts with
'speedy' (CFLAGS=$SMALL)"
+ local AS_NEEDED_HELP="Only emit DT_NEEDED entries for directly used
libraries (LDFLAGS=-Wl,--as-needed)"
OPTIMIZATIONS=`echo ${OPTIMIZATIONS} | tr '\n' ' '`
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 2abd865..c89f0ae 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -617,7 +617,7 @@ function optimize() {
debug "libsorcery" "In optimize()"
unset CFLAGS CXXFLAGS LDFLAGS CPPFLAGS
- unset FAST PRELINK RISKY SMALL SPEEDY STRIP TINY
+ unset FAST PRELINK RISKY SMALL SPEEDY STRIP TINY AS_NEEDED
# if user specified --no-opts then use only the args from the command line
# otherwise do the normal stuff
@@ -663,6 +663,11 @@ function optimize() {
TINY="on"
;;
+ as_needed)
+ LDFLAGS="$LDFLAGS -Wl,--as-needed"
+ AS_NEEDED="on"
+ ;;
+
esac
done
# use echo to crunch all the whitespace out for broken configure scripts
[SM-Commit] GIT changes to master sorcery by Ismael Luceno (40c8b8464b73b3dc1319f13e2d26c5783584386c),
Ismael Luceno, 03/22/2014