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

[COMMITTED PATCH] Move rules for Linux-specific pldd program to Linux-specific Makefile.


pldd.c is built around core assumptions of Linux-specific facilities
(ptrace and its exact use, /proc/PID/* files behaving very exact ways).
It doesn't make sense to try to build it on non-Linux configurations.

I didn't move the source files themselves because there is no special
benefit to doing so.  Perhaps someday someone will factor out the
Linux-specific parts and make it possible to implement non-Linux support
for pldd.


Thanks,
Roland


	* elf/Makefile (others, install-bin): Remove pldd.
	(pldd-modules): Variable removed.
	($(objpfx)pldd): Target removed.
	* sysdeps/unix/sysv/linux/Makefile [$(subdir) = elf]
	(others, install-bin): Append pldd here.
	($(objpfx)pldd): New target.

--- a/elf/Makefile
+++ b/elf/Makefile
@@ -70,8 +70,8 @@ install-others	= $(inst_rtlddir)/$(rtld-installed-name)
 install-bin-script = ldd
 endif
 
-others		= sprof sln pldd
-install-bin	= sprof pldd
+others		= sprof sln
+install-bin	= sprof
 others-static   = sln
 install-rootsbin = sln
 sln-modules	:= static-stubs
@@ -88,8 +88,6 @@ extra-objs	+= $(ldconfig-modules:=.o)
 endif
 endif
 
-pldd-modules := xmalloc
-
 # To find xmalloc.c and xstrdup.c
 vpath %.c ../locale/programs
 
@@ -430,8 +428,6 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
 
 $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
 
-$(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o)
-
 SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
 CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
 		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -175,6 +175,10 @@ sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \
 			dl-fxstatat64
 
 CPPFLAGS-lddlibc4 += -DNOT_IN_libc
+
+others += pldd
+install-bin += pldd
+$(objpfx)pldd: $(objpfx)xmalloc.o
 endif
 
 ifeq ($(subdir),rt)


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