This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-821-g12086fb


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  12086fb4835639d1762622d80980a7500799b63e (commit)
       via  346d65b33a3958c72faab6f675314cbef7963ace (commit)
      from  1a8463176c3edf52c38af022ce44e210f9bf4aaa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12086fb4835639d1762622d80980a7500799b63e

commit 12086fb4835639d1762622d80980a7500799b63e
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Jun 17 09:54:51 2013 -0700

    Sort sysd-rules-patterns by descending pattern length.

diff --git a/ChangeLog b/ChangeLog
index e552050..f5292c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-06-17  Roland McGrath  <roland@hack.frob.com>
 
+	* scripts/sysd-rules.awk: Sort sysd_rules_patterns by descending
+	length of target pattern, then descending length of dependency pattern.
+	* configure.in (AWK): Require gawk 3.1.2 or newer.
+	* manual/install.texi (Tools for Compilation): Say that we do.
+	* configure: Regenerated.
+
 	* Makerules [inhibit-sysdep-asm] (check-inhibit-asm): Variable removed.
 	($(common-objpfx)sysd-rules): Replace shell logic with running ...
 	* scripts/sysd-rules.awk: ... this new script.
diff --git a/configure b/configure
index 8c538f5..09d8336 100755
--- a/configure
+++ b/configure
@@ -4993,7 +4993,7 @@ $as_echo_n "checking version of $AWK... " >&6; }
   ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    [3-9].*)
+    3.1.[2-9]*|3.[2-9]*|[4-9]*)
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
diff --git a/configure.in b/configure.in
index bd90bac..8b11081 100644
--- a/configure.in
+++ b/configure.in
@@ -986,7 +986,7 @@ AC_CHECK_PROG_VER(SED, sed, --version,
   SED=: aux_missing="$aux_missing sed")
 AC_CHECK_PROG_VER(AWK, gawk, --version,
   [GNU Awk[^0-9]*\([0-9][0-9.]*\)],
-  [[3-9].*], critic_missing="$critic_missing gawk")
+  [3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk")
 
 AC_CHECK_TOOL(NM, nm, false)
 
diff --git a/manual/install.texi b/manual/install.texi
index e6c1baf..3608a11 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -379,10 +379,11 @@ understand all the tags used in the document, and the installation
 mechanism for the info files is not present or works differently.
 
 @item
-GNU @code{awk} 3.0, or higher
+GNU @code{awk} 3.1.2, or higher
 
-@code{Awk} is used in several places to generate files.
-@code{gawk} 3.0 is known to work.
+@code{awk} is used in several places to generate files.
+Some @code{gawk} extensions are used, including the @code{asorti}
+function, which was introduced in version 3.1.2 of @code{gawk}.
 
 @item
 Perl 5
diff --git a/scripts/sysd-rules.awk b/scripts/sysd-rules.awk
index 2fb044e..cc14334 100644
--- a/scripts/sysd-rules.awk
+++ b/scripts/sysd-rules.awk
@@ -14,6 +14,25 @@ BEGIN {
   nsysdirs = split(config_sysdirs, sysdirs);
   npatterns = split(sysd_rules_patterns, patterns);
 
+  # Each element of $(sysd-rules-patterns) is a pair TARGET:DEP.
+  # They are no in particular order.  We need to sort them so that
+  # the longest TARGET is first, and, among elements with the same
+  # TARGET, the longest DEP is first.
+  for (i = 1; i <= npatterns; ++i) {
+    if (split(patterns[i], td, ":") != 2) {
+      msg = "bad sysd-rules-patterns element '" patterns[i] "'";
+      print msg > "/dev/stderr";
+      exit 2;
+    }
+    target_order = sprintf("%09d", npatterns + 1 - length(td[1]));
+    dep_order = sprintf("%09d", npatterns - length(td[2]));
+    sort_patterns[target_order SUBSEP dep_order] = patterns[i];
+  }
+  asorti(sort_patterns, map_patterns);
+  for (i in map_patterns) {
+    patterns[i] = sort_patterns[map_patterns[i]];
+  }
+
   for (sysdir_idx = 1; sysdir_idx <= nsysdirs; ++sysdir_idx) {
     dir = sysdirs[sysdir_idx];
     if (dir !~ /^\//) dir = "$(..)" dir;
@@ -28,10 +47,7 @@ BEGIN {
       o = suffixes[suffix_idx];
       for (pattern_idx = 1; pattern_idx <= npatterns; ++pattern_idx) {
         pattern = patterns[pattern_idx];
-        if (split(pattern, td, ":") != 2) {
-          print "bad sysd-rules-patterns element '" pattern "'" > "/dev/stderr";
-          exit 2;
-        }
+        split(pattern, td, ":");
         target_pattern = td[1];
         dep_pattern = td[2];
         if (target_pattern == "%") {

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=346d65b33a3958c72faab6f675314cbef7963ace

commit 346d65b33a3958c72faab6f675314cbef7963ace
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Jun 17 09:55:21 2013 -0700

    Rewrite sysd-rules generation using an awk script.

diff --git a/ChangeLog b/ChangeLog
index e7291a6..e552050 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-06-17  Roland McGrath  <roland@hack.frob.com>
+
+	* Makerules [inhibit-sysdep-asm] (check-inhibit-asm): Variable removed.
+	($(common-objpfx)sysd-rules): Replace shell logic with running ...
+	* scripts/sysd-rules.awk: ... this new script.
+	* sysdeps/mach/hurd/Makefile (inhibit-sysdep-asm): Use a regexp rather
+	than a glob-style pattern.
+
 2013-06-17  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/test-misc.c (main): Do not treat incorrectly rounded
diff --git a/Makerules b/Makerules
index 2c25233..03eafb0 100644
--- a/Makerules
+++ b/Makerules
@@ -217,14 +217,9 @@ endif
 # later directory would be chosen over a .c file in an earlier directory,
 # which does not preserve the desired sysdeps ordering behavior.
 
-# System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard
-# patterns matching sysdep directories whose assembly source files should
-# be suppressed.
-ifdef inhibit-sysdep-asm
-define check-inhibit-asm
-case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) asm= ;; esac;
-endef
-endif
+# System-dependent makefiles can put in `inhibit-sysdep-asm' regexps
+# matching sysdep directories whose assembly source files should be
+# suppressed.
 
 -include $(common-objpfx)sysd-rules
 ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
@@ -233,34 +228,16 @@ ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
 sysd-rules-force = FORCE
 FORCE:
 endif
-$(common-objpfx)sysd-rules: $(common-objpfx)config.make $(..)Makerules \
+$(common-objpfx)sysd-rules: $(..)scripts/sysd-rules.awk \
+			    $(common-objpfx)config.make $(..)Makerules \
 			    $(sysdep-makefiles) $(sysdep-makeconfigs) \
 			    $(sysd-rules-force)
 	-@rm -f $@T
-	(echo 'sysd-rules-sysdirs := $(config-sysdirs)';		      \
-	 for dir in $(config-sysdirs); do				      \
-	   case "$$dir" in						      \
-	   /*) ;;							      \
-	   *) dir="\$$(..)$$dir" ;;					      \
-	   esac;							      \
-	   asm='.S';							      \
-	   $(check-inhibit-asm)						      \
-	   for o in $(all-object-suffixes); do				      \
-	     set $(subst :, ,$(sysd-rules-patterns));			      \
-	     while [ $$# -ge 2 ]; do					      \
-	       t=$$1; shift; 						      \
-	       d=$$1; shift;						      \
-	       v=$${t%%%}; [ x"$$v" = x ] || v="\$$($${v}CPPFLAGS)";	      \
-	       for s in $$asm .c; do					      \
-		 echo "\$$(objpfx)$$t$$o: $$dir/$$d$$s \$$(before-compile)";  \
-		 echo "	\$$(compile-command$$s) $$v";			      \
-	       done;							      \
-	     done;							      \
-	   done;							      \
-	   echo "\$$(inst_includedir)/%.h: $$dir/%.h \$$(+force)";	      \
-	   echo "	\$$(do-install)"; 				      \
-	 done;								      \
-	 echo 'sysd-rules-done = t') > $@T
+	LC_ALL=C $(AWK) -f $< > $@T \
+			-v all_object_suffixes='$(all-object-suffixes)' \
+			-v inhibit_sysdep_asm='$(inhibit-sysdep-asm)' \
+			-v sysd_rules_patterns='$(sysd-rules-patterns)' \
+			-v config_sysdirs='$(config-sysdirs)'
 	mv -f $@T $@
 
 ifndef sysd-rules-done
diff --git a/scripts/sysd-rules.awk b/scripts/sysd-rules.awk
new file mode 100644
index 0000000..2fb044e
--- /dev/null
+++ b/scripts/sysd-rules.awk
@@ -0,0 +1,60 @@
+# This is a GAWK script to generate the sysd-rules file.
+# It does not read any input, but it requires that several variables
+# be set on its command line (using -v) to their makefile counterparts:
+#	all_object_suffixes	$(all-object-suffixes)
+#	inhibit_sysdep_asm	$(inhibit-sysdep-asm)
+#	config_sysdirs		$(config_sysdirs)
+#	sysd_rules_patterns	$(sysd-rules-patterns)
+
+BEGIN {
+  print "sysd-rules-sysdirs :=", config_sysdirs;
+
+  nsuffixes = split(all_object_suffixes, suffixes);
+  ninhibit_asm = split(inhibit_sysdep_asm, inhibit_asm);
+  nsysdirs = split(config_sysdirs, sysdirs);
+  npatterns = split(sysd_rules_patterns, patterns);
+
+  for (sysdir_idx = 1; sysdir_idx <= nsysdirs; ++sysdir_idx) {
+    dir = sysdirs[sysdir_idx];
+    if (dir !~ /^\//) dir = "$(..)" dir;
+    asm_rules = 1;
+    for (i = 1; i <= ninhibit_asm; ++i) {
+      if (dir ~ ("^.*sysdeps/" inhibit_asm[i] "$")) {
+        asm_rules = 0;
+        break;
+      }
+    }
+    for (suffix_idx = 1; suffix_idx <= nsuffixes; ++suffix_idx) {
+      o = suffixes[suffix_idx];
+      for (pattern_idx = 1; pattern_idx <= npatterns; ++pattern_idx) {
+        pattern = patterns[pattern_idx];
+        if (split(pattern, td, ":") != 2) {
+          print "bad sysd-rules-patterns element '" pattern "'" > "/dev/stderr";
+          exit 2;
+        }
+        target_pattern = td[1];
+        dep_pattern = td[2];
+        if (target_pattern == "%") {
+          command_suffix = "";
+        } else {
+          prefix = gensub(/%/, "", "", target_pattern);
+          command_suffix = " $(" prefix  "CPPFLAGS)";
+        }
+        target = "$(objpfx)" target_pattern o ":";
+        if (asm_rules) {
+          dep = dir "/" dep_pattern ".S";
+          print target, dep, "$(before-compile)";
+          print "\t$(compile-command.S)" command_suffix;
+        }
+        dep = dir "/" dep_pattern ".c";
+        print target, dep, "$(before-compile)";
+        print "\t$(compile-command.c)" command_suffix;
+      }
+    }
+    print "$(inst_includedir)/%.h:", dir "/%.h", "$(+force)";
+    print "\t$(do-install)";
+  }
+
+  print "sysd-rules-done := t";
+  exit 0;
+}
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 68aedb6..7ff9a92 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -28,7 +28,7 @@ includes += -I$(..)hurd -I$(common-objpfx)hurd/
 # Do not use any assembly code from sysdeps/unix (and subdirectories).
 # This bypasses all the system call stubs and uses any existing posix or
 # generic C files instead.
-inhibit-sysdep-asm += unix*
+inhibit-sysdep-asm += unix.*
 inhibit-unix-syscalls = yes
 
 # Don't try to generate anything from the installed Unix system and its

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

Summary of changes:
 ChangeLog                  |   14 ++++++++
 Makerules                  |   43 ++++++-------------------
 configure                  |    2 +-
 configure.in               |    2 +-
 manual/install.texi        |    7 ++--
 scripts/sysd-rules.awk     |   76 ++++++++++++++++++++++++++++++++++++++++++++
 sysdeps/mach/hurd/Makefile |    2 +-
 7 files changed, 107 insertions(+), 39 deletions(-)
 create mode 100644 scripts/sysd-rules.awk


hooks/post-receive
-- 
GNU C Library master sources


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