This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Use LD_SO in gnu/libnames.h


Ulrich Drepper <drepper@redhat.com> writes:

|> Andreas Jaeger <aj@suse.de> writes:
|> 
|> > Using LD_SO we're incompatible to former versions - but it's IMO an
|> > advantage since now all platforms use the same name for the dynamic
|> > linker.
|> 
|> Leave the old name in there as well if it is different from LD_SO.

IMHO the old names should never have been used since it is not portable.
But anyway, here is a new patch:

2000-05-26  Andreas Schwab  <schwab@suse.de>

	* Makeconfig ($(common-objpfx)soversions.mk): Prepend `$lib=' to
	entries in all-sonames.
	($(common-objpfx)gnu/lib-names.h): Use it for the CPP symbol,
	preserving the old name if different for compatibility.

Index: Makeconfig
===================================================================
RCS file: /cvs/glibc/libc/Makeconfig,v
retrieving revision 1.236
diff -u -a -u -r1.236 Makeconfig
--- Makeconfig	2000/04/28 05:07:08	1.236
+++ Makeconfig	2000/05/29 08:34:25
@@ -709,9 +709,9 @@
 	while read lib number setname; do \
 	  case $$number in \
 	    [0-9]*) echo "$$lib.so-version=.$$number"; \
-		    echo "all-sonames+=$$lib.so\$$($$lib.so-version)";;\
+		    echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
 	    *)	    echo "$$lib.so-version=$$number"; \
-		    echo "all-sonames+=\$$($$lib.so-version)";;\
+		    echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
 	  esac; \
 	done < $< > $@T; exit 0
 	mv -f $@T $@
@@ -735,10 +735,17 @@
 	 echo; \
 	 (libs='$(all-sonames)';\
 	  for l in $$libs; do \
-	    upname=`echo $$l | sed 's/[.]so.*//' | \
+	    name=`echo $$l | sed 's/.*=//'`; \
+	    upname=`echo $$l | sed 's/=.*//' | \
 		    tr 'abcdefghijklmnopqrstuvwxyz-' \
 		       'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
-	    echo "#define	$${upname}_SO	\"$$l\""; \
+	    upname2=`echo $$name | sed 's/[.]so.*//' | \
+		     tr 'abcdefghijklmnopqrstuvwxyz-' \
+		        'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
+	    echo "#define	$${upname}_SO	\"$$name\""; \
+	    if test $$upname != $$upname2; then \
+	      echo "#define	$${upname2}_SO	\"$$name\""; \
+	    fi; \
 	  done;) | sort; \
 	 echo; \
 	 echo '#endif	/* gnu/lib-names.h */';) > ${@:stmp=T}

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]