Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Ismael Luceno (40c8b8464b73b3dc1319f13e2d26c5783584386c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (40c8b8464b73b3dc1319f13e2d26c5783584386c)
  • Date: Sat, 22 Mar 2014 22:53:27 -0500

GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:

usr/sbin/sorcery | 4 +++-
var/lib/sorcery/modules/libsorcery | 7 ++++++-
2 files changed, 9 insertions(+), 2 deletions(-)

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)"

if OPTIMIZATIONS=`eval $DIALOG ' --title "$OPT_TITLE" \
--no-cancel \
@@ -762,7 +763,8 @@ optimization_menu(){
"risky" " +speed" "$RISKY" "$RISKY_HELP" \
"speedy" " +size ++speed" "$SPEEDY" "$SPEEDY_HELP" \
"strip" " --size" "$STRIP" "$STRIP_HELP" \
- "tiny" " -size +speed" "$TINY" "$TINY_HELP"'`
+ "tiny" " -size +speed" "$TINY" "$TINY_HELP" \
+ "as_needed" "only direct libs" "$AS_NEEDED" "$AS_NEEDED_HELP"'`
then

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

Archive powered by MHonArc 2.6.24.

Top of Page