summary refs log tree commit diff
path: root/Makeconfig
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-02-10 09:18:34 +0000
committerRoland McGrath <roland@gnu.org>2005-02-10 09:18:34 +0000
commit91adb529b07eca93e25a84d0054418335e2fc6cf (patch)
tree4ec4dbe583b69bcdac6c37b87a32688fafa422a6 /Makeconfig
parent677dda3f2779b8696689708998129e770d1b8a86 (diff)
downloadglibc-91adb529b07eca93e25a84d0054418335e2fc6cf.tar.gz
glibc-91adb529b07eca93e25a84d0054418335e2fc6cf.tar.xz
glibc-91adb529b07eca93e25a84d0054418335e2fc6cf.zip
[BZ #632]
2005-02-10  Roland McGrath  <roland@redhat.com>
	[BZ #632]
	* scripts/soversions.awk: Expect cpu, vendor, os as separate variables
	from command line.
	Grok shlib-versions lines with WORDSIZE* in second column.
	Add new leading column to output, DEFAULT for existing output lines.
	Also emit lines with WORDSIZE* for alternate configurations.
	* Makeconfig ($(common-objpfx)soversions.i): Pass those variables.
	($(common-objpfx)soversions.mk): Grok new column, use only DEFAULT.
	($(common-objpfx)gnu/lib-names.stmp): Depend on soversions.i instead
	of soversions.mk; replace inline shell script with use of ...
	* scripts/lib-names.awk: New file.  If input has non-DEFAULT lines,
	emit multiple sets of macros under #if.
	* shlib-versions (x86_64-.*-.*): Add WORDSIZE32 line mapping to i686.
	(s390x-.*-.*): Likewise for s390.
	(powerpc64-.*-.*): Likewise for powerpc.
	(sparc64-.*-.*): Likewise for sparc.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig33
1 files changed, 8 insertions, 25 deletions
diff --git a/Makeconfig b/Makeconfig
index 5ecda01169..306053241d 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -787,11 +787,14 @@ soversions-default-setname = $(patsubst %, %,\
 $(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
 			      $(common-objpfx)shlib-versions.v
 	$(AWK) -v default_setname='$(soversions-default-setname)' \
-	       -v config='$(config-machine)-$(config-vendor)-$(config-os)' \
+	       -v cpu='$(config-machine)' \
+	       -v vendor='$(config-vendor)' \
+	       -v os='$(config-os)' \
 	       -f $^ > $@T
 	mv -f $@T $@
 $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
-	(while read lib number setname; do \
+	(while read which lib number setname; do \
+	   test x"$$which" = xDEFAULT || continue; \
 	   case $$number in \
 	     [0-9]*) echo "$$lib.so-version=.$$number"; \
 		     echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
@@ -812,31 +815,11 @@ postclean-generated += soversions.mk soversions.i \
 before-compile += $(common-objpfx)gnu/lib-names.h
 ifeq ($(soversions.mk-done),t)
 $(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @:
-$(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk
+$(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \
+				    $(common-objpfx)soversions.i
 	$(make-target-directory)
 	@rm -f ${@:stmp=T} $@
-	(echo '/* This file is automatically generated.';\
-	 echo '   It defines macros to allow user program to find the shared';\
-	 echo '   library files which come as part of GNU libc.  */';\
-	 echo '#ifndef __GNU_LIB_NAMES_H'; \
-	 echo '#define __GNU_LIB_NAMES_H	1'; \
-	 echo; \
-	 (libs='$(all-sonames)';\
-	  for l in $$libs; do \
-	    name=`echo $$l | sed 's/.*=//'`; \
-	    upname=`echo $$l | sed 's/=.*//' | \
-		    tr 'abcdefghijklmnopqrstuvwxyz-' \
-		       'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
-	    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}
+	$(AWK) -f $^ > ${@:stmp=T}
 	$(move-if-change) ${@:stmp=T} ${@:stmp=h}
 	touch $@
 endif