summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-11 10:50:51 +0000
committerRoland McGrath <roland@gnu.org>2002-10-11 10:50:51 +0000
commit28654d2a063d22fda1fd748f392876ed61c36fa0 (patch)
tree2cbabfd65956ec4b093f9bc536bd1808edf89fd9
parent894282753f1fe0429590c812b4be1a253f61419f (diff)
downloadglibc-28654d2a063d22fda1fd748f392876ed61c36fa0.tar.gz
glibc-28654d2a063d22fda1fd748f392876ed61c36fa0.tar.xz
glibc-28654d2a063d22fda1fd748f392876ed61c36fa0.zip
2002-10-05 Roland McGrath <roland@redhat.com>
	* Makeconfig (CFLAGS): Prepend -std=gnu99.
	* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
	Remove superfluous rm command, whose @ plus make bugs hid
	all these commands from the make output.
2002-09-30  Roland McGrath  <roland@redhat.com>

	* elf/rtld-Rules: New file.
	* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
	$(objpfx)rtld-libc.a): New targets.
	(generated): Add them.
	(reloc-link): Remove -o $@ from the variable.
	($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
	(distribute): Add rtld-Rules.
	(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
	* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
	(common-mostlyclean, common-clean): Clean up rtld-* files.
	* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
-rw-r--r--Makerules24
1 files changed, 20 insertions, 4 deletions
diff --git a/Makerules b/Makerules
index dee6820d43..3fa3f63a7f 100644
--- a/Makerules
+++ b/Makerules
@@ -235,19 +235,31 @@ $(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
 	     echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
 		  \$$(compile-command.S)";				      \
 	     echo "\$$(objpfx)%$$o: $$dir/%.s \$$(before-compile); \
-		  \$$(compile-command.s)";				      \
+		  \$$(compile-command.s)";			              \
+	     echo "\$$(objpfx)rtld-%$$o: $$dir/%.S \$$(before-compile); \
+		  \$$(compile-command.S)";				      \
+	     echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
+		  \$$(compile-command.s)";			              \
 	     $(close-check-inhibit-asm)	\
 	     echo "\$$(objpfx)%$$o: $$dir/%.c \$$(before-compile); \
 		  \$$(compile-command.c)";				      \
+	     echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
+		  \$$(compile-command.c)";				      \
 	   done; \
 	   $(open-check-inhibit-asm) \
 	   echo "\$$(objpfx)%.d: $$dir/%.s \$$(common-objpfx)dummy.d; \
 		\$$(make-dummy-dep)";			       \
+	   echo "\$$(objpfx)rtld-%.d: $$dir/%.s \$$(common-objpfx)dummy.d; \
+		\$$(make-dummy-dep)";			       \
 	   echo "\$$(objpfx)%.d: $$dir/%.S \$$(before-compile); \
 		\$$(+make-deps)";					      \
+	   echo "\$$(objpfx)rtld-%.d: $$dir/%.S \$$(before-compile); \
+		\$$(+make-deps)";					      \
 	   $(close-check-inhibit-asm)	\
 	   echo "\$$(objpfx)%.d: $$dir/%.c \$$(before-compile); \
 		\$$(+make-deps)";					      \
+	   echo "\$$(objpfx)rtld-%.d: $$dir/%.c \$$(before-compile); \
+		\$$(+make-deps)";					      \
 	 done;								      \
 	 echo 'sysd-rules-done = t') > $@T
 	mv -f $@T $@
@@ -335,12 +347,14 @@ endif
 # together.  You can't compile the C library with such a compiler.
 OUTPUT_OPTION = -o $@
 
+# We need the $(CFLAGS) to be in there to have the right predefines during
+# the dependency run for C sources.  But having it for assembly sources can
+# get the wrong predefines.
 S-CPPFLAGS = $(asm-CPPFLAGS)
 define +make-deps
 $(make-target-directory)
--@rm -f $@
-$(+mkdep) $< $(CFLAGS) $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
-sed \
+$(+mkdep) $< $(if $(filter %.c,$<),$(CFLAGS)) \
+	     $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | sed \
 -e 's,$(subst .,\.,$*)\.o,$(foreach o,$(all-object-suffixes),$(@:.d=$o)) $@,' \
 $(sed-remove-objpfx) > $(@:.d=.T)
 mv -f $(@:.d=.T) $@ $(generate-md5)
@@ -1090,6 +1104,7 @@ common-mostlyclean:
 				     $(install-lib.so) \
 				     $(install-lib.so:%.so=%_pic.a))
 	-rm -f core
+	-rm -f $(objpfx)rtld-*.os
 	$(rmobjs)
 define rmobjs
 $(foreach o,$(object-suffixes-for-libc),
@@ -1099,6 +1114,7 @@ endef
 # Also remove the dependencies and generated source files.
 common-clean: common-mostlyclean
 	-rm -f $(addprefix $(objpfx),$(generated)) $(+depfiles)
+	-rm -f $(objpfx)rtld-*.d
 	-rm -fr $(addprefix $(objpfx),$(generated-dirs))
 	-rm -f $(addprefix $(common-objpfx),$(common-generated))
 	-rm -f $(objpfx)distinfo