[SCM] master: Simplify library path handling.

cagney@sourceware.org cagney@sourceware.org
Mon Nov 26 20:25:00 GMT 2007


The branch, master has been updated
       via  de0b15f0884e98811140b942d64325e8225d15ac (commit)
      from  37f01a74321572e8e008360235e8fb49cceea05a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit de0b15f0884e98811140b942d64325e8225d15ac
Author: Andrew Cagney <cagney@toil.yyz.redhat.com>
Date:   Mon Nov 26 15:22:34 2007 -0500

    Simplify library path handling.
    
    frysk-common/ChangeLog
    2007-11-26  Andrew Cagney  <cagney@redhat.com>
    
    	* Makefile.rules (GEN_GCJ_SO_FLAGS): Delete.
    	(GEN_GCJ_SO_DIRS): Generate from GEN_GCJ_LDADD_LIST.
    	(GEN_GCJ_BUILDTREE_RPATHS): Simplify.
    	* Makefile.gen.sh (echo_LDFLAGS): Only set LDADD.

-----------------------------------------------------------------------

Summary of changes:
 frysk-common/ChangeLog       |    5 +++++
 frysk-common/Makefile.gen.sh |    4 ----
 frysk-common/Makefile.rules  |   27 +++++++--------------------
 3 files changed, 12 insertions(+), 24 deletions(-)

First 500 lines of diff:
diff --git a/frysk-common/ChangeLog b/frysk-common/ChangeLog
index 79ffe00..9063d3b 100644
--- a/frysk-common/ChangeLog
+++ b/frysk-common/ChangeLog
@@ -1,5 +1,10 @@
 2007-11-26  Andrew Cagney  <cagney@redhat.com>
 
+	* Makefile.rules (GEN_GCJ_SO_FLAGS): Delete.
+	(GEN_GCJ_SO_DIRS): Generate from GEN_GCJ_LDADD_LIST.
+	(GEN_GCJ_BUILDTREE_RPATHS): Simplify.
+	* Makefile.gen.sh (echo_LDFLAGS): Only set LDADD.
+	
 	* Makefile.rules (GEN_GCC_BUILDTREE_RPATHS): Move to near use.
 	* Makefile.gen.sh (echo_LDFLAGS): Dependant on JAR_COMPILE, set
 	LDFLAGS or LDADD to list of libraries to link against.
diff --git a/frysk-common/Makefile.gen.sh b/frysk-common/Makefile.gen.sh
index e22c26d..fc374d8 100755
--- a/frysk-common/Makefile.gen.sh
+++ b/frysk-common/Makefile.gen.sh
@@ -270,11 +270,7 @@ echo_LDFLAGS ()
     local name_=`echo_name_ $1`
     local class=`echo $1 | tr '[/]' '[.]'`
     echo "${name_}_LDFLAGS = --main=${class}"
-    echo "if JAR_COMPILE"
-    echo "${name_}_LDFLAGS += \${GEN_GCJ_SO_FLAGS}"
-    echo "else"
     echo "${name_}_LDADD = \${GEN_GCJ_LDADD_LIST}"
-    echo "endif"
     case "${name}" in
 	*dir/* )
             # set during non-standard builds such as RHEL 4.
diff --git a/frysk-common/Makefile.rules b/frysk-common/Makefile.rules
index f52d92c..633ec41 100644
--- a/frysk-common/Makefile.rules
+++ b/frysk-common/Makefile.rules
@@ -105,30 +105,17 @@ GEN_GCJ_LDADD_LIST =
 # RPATH to wire into in-build-tree program that need to access those
 # shared libraries.
 
-# Convert LDADD's .a into -L<dir> -llib
-GEN_GCJ_SO_FLAGS = \
-	$(foreach lib, $(GEN_GCJ_LDADD_LIST), \
-		$(if $(filter -L%,$(lib)), $(lib)) \
-		$(if $(filter -l%,$(lib)), $(lib)) \
-		$(if $(filter %.a,$(lib)), \
-			$(patsubst %,-L%,$(dir $(lib))) \
-			$(patsubst lib%.a,-l%,$(notdir $(lib))) \
-			) \
-		)
 # Just the directories.
 GEN_GCJ_SO_DIRS = \
-	$(patsubst -L%,%,$(filter -L%, $(GEN_GCJ_SO_FLAGS)))
+	$(sort $(absdir $(foreach lib, $(GEN_GCJ_LDADD_LIST), \
+	       $(if $(filter -L%,$(lib)), \
+	       	    $(patsubst -L,%,$(lib))) \
+	       $(if $(filter %.so,$(lib)), \
+	       	    $(patsubst %,-L%,$(dir $(lib)))) \
+	)))
 # Add absolute versions of each directory.
 GEN_GCJ_BUILDTREE_RPATHS = \
-	$(patsubst %/./,%, $(patsubst %/.,%, \
-		$(foreach lib, $(GEN_GCJ_SO_DIRS), \
-			$(if $(filter /%,$(lib)), $(lib)) \
-			$(if $(filter .%,$(lib)), \
-				$(patsubst %,@abs_top_builddir@/%, $(lib)) \
-				$(lib) \
-				) \
-			) \
-		))
+	$(patsubst %/./,%, $(patsubst %/.,%, $(GEN_GCJ_SO_DIRS)))
 GEN_GCJ_BUILDTREE_RPATH = \
 	$(subst $(space),:,$(sort $(GEN_GCJ_BUILDTREE_RPATHS)))
 GEN_GCC_BUILDTREE_RPATHS = $(top_builddir)/elfutils/libdw


hooks/post-receive
--
frysk system monitor/debugger



More information about the Frysk-cvs mailing list