This is the mail archive of the libc-alpha@sources.redhat.com 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]

Latest cvs fails to build with 'make[2]: execvp: /bin/sh: Argumentlist too long'


Hi,

Latest CVS fails to build with:

----
make[2]: execvp: /bin/sh: Argument list too long
make[2]: *** [/var/tmp/portage/glibc-2.3.5.20050421/work/build-default-i686-pc-linux-gnu-nptl/math/stubs] Error 127
----

(sorry, I do not have more output anymore, but can get if really
needed).

This patch seems to do the right thing.  Comments welcome.

----
Index: Makerules
===================================================================
RCS file: /cvs/glibc/libc/Makerules,v
retrieving revision 1.430
diff -u -r1.430 Makerules
--- Makerules   5 Mar 2005 19:24:32 -0000       1.430
+++ Makerules   22 Apr 2005 18:31:27 -0000
@@ -1390,15 +1390,26 @@
                  $(addprefix $(objpfx),$(extra-objs))
 $(objpfx)stubs: $(objs-for-stubs)
 ifneq (,$(strip $(objs-for-stubs)))
-       $(OBJDUMP) -h $^ | \
-       $(AWK) '/\.gnu\.glibc-stub\./ { \
-                 sub(/\.gnu\.glibc-stub\./, "", $$2); \
-                 stubs[$$2] = 1; } \
-               END { for (s in stubs) print "#define __stub_" s }' > $@T
+       $(stub-obj-list)
+       cat $@L | xargs \
+               $(OBJDUMP) -h | \
+               $(AWK) '/\.gnu\.glibc-stub\./ { \
+                         sub(/\.gnu\.glibc-stub\./, "", $$2); \
+                         stubs[$$2] = 1; } \
+                       END { for (s in stubs) print "#define __stub_" s }' \
+               > $@T
+       -rm -f $@L
        mv -f $@T $@
 else
        > $@
 endif
+
+define stub-obj-list
+-@rm -f $@L
+-@echo "Generating stub obj list..."
+$(foreach file,$^,
+@echo >> $@L '$(file)')
+endef


 # This information is not used for making distributions any more.
 # But it's used by MakeTAGS for making TAGS files and the .pot files.


-- 
Martin Schlemmer

Index: Makerules
===================================================================
RCS file: /cvs/glibc/libc/Makerules,v
retrieving revision 1.430
diff -u -r1.430 Makerules
--- Makerules	5 Mar 2005 19:24:32 -0000	1.430
+++ Makerules	22 Apr 2005 18:31:27 -0000
@@ -1390,15 +1390,26 @@
 		  $(addprefix $(objpfx),$(extra-objs))
 $(objpfx)stubs: $(objs-for-stubs)
 ifneq (,$(strip $(objs-for-stubs)))
-	$(OBJDUMP) -h $^ | \
-	$(AWK) '/\.gnu\.glibc-stub\./ { \
-	          sub(/\.gnu\.glibc-stub\./, "", $$2); \
-		  stubs[$$2] = 1; } \
-		END { for (s in stubs) print "#define __stub_" s }' > $@T
+	$(stub-obj-list)
+	cat $@L | xargs \
+		$(OBJDUMP) -h | \
+		$(AWK) '/\.gnu\.glibc-stub\./ { \
+		          sub(/\.gnu\.glibc-stub\./, "", $$2); \
+			  stubs[$$2] = 1; } \
+			END { for (s in stubs) print "#define __stub_" s }' \
+		> $@T
+	-rm -f $@L
 	mv -f $@T $@
 else
 	> $@
 endif
+
+define stub-obj-list
+-@rm -f $@L
+-@echo "Generating stub obj list..."
+$(foreach file,$^,
+@echo >> $@L '$(file)')
+endef
 
 # This information is not used for making distributions any more.
 # But it's used by MakeTAGS for making TAGS files and the .pot files.

Attachment: signature.asc
Description: This is a digitally signed message part


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