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

Message ID 20140505201844.AAE0C2C39CB@topped-with-meat.com
State New
Headers show

Commit Message

Roland McGrath May 5, 2014, 8:18 p.m. UTC
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.

Patch
diff mbox

--- 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)