From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vassilis Virvilis Date: Fri, 20 May 2005 11:33:32 +0000 Subject: patch hotplug klibc build and DESTDIR Message-Id: <428DCB0C.6070903@iit.demokritos.gr> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------010405090603010605090104" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------010405090603010605090104 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Halo, I am building hotplug with the newest klibc (I have symlinked the klib dir to the klibc-1.0.8) and the built was unsuccessfull so I change the relevant path with the one that comes from the udev package. Note: klcc builds statically by default so I don't see the reason to explicitly state it. However if somebody changes the default behavior of klcc (like me) it will lost considerable time trying to find out why hotplug (and udev) doesn't build statically (like me). The second part of the patch makes hotplug installation to respect DESTDIR. Before you say no please consider the following scenario. I am building hotplug (and udev) for an initramfs image. I have specified DESTDIR to be ~/src/embed/root-initramfs and the soft linking as it is right now links to /sbin dir. However since I don't install to the real root /, cpio cannot find the link when building the initramfs. If this patch is rejected will you consider a changing the soft linking to hard linking since if IRC initramfs handles correctly hard links. .bill --------------010405090603010605090104 Content-Type: text/plain; name="patch-hotplug" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-hotplug" diff -ur orig/hotplug-ng-002/Makefile hotplug-ng-002/Makefile --- orig/hotplug-ng-002/Makefile 2005-05-07 00:05:33.000000000 +0300 +++ hotplug-ng-002/Makefile 2005-05-20 12:07:01.000000000 +0300 @@ -121,34 +121,15 @@ endif # If we are using our version of klibc, then we need to build, link it, and then -# link udev against it statically. -# Otherwise, use glibc and link dynamically. +# link udev against it statically. Otherwise, use glibc and link dynamically. ifeq ($(strip $(USE_KLIBC)),true) - KLIBC_BASE = $(PWD)/klibc - KLIBC_DIR = $(KLIBC_BASE)/klibc - INCLUDE_DIR := $(KLIBC_BASE)/include - LINUX_INCLUDE_DIR := $(KERNEL_DIR)/include - include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG - ARCH_LIB_OBJS = $(KLIBC_DIR)/libc.a - CRT0 = $(KLIBC_DIR)/crt0.o - LIBC = $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0) - CFLAGS += $(WARNINGS) -nostdinc \ - $(OPTFLAGS) $(REQFLAGS) \ - -D__KLIBC__ -fno-builtin-printf \ - -I$(INCLUDE_DIR) \ - -I$(INCLUDE_DIR)/arch/$(ARCH) \ - -I$(INCLUDE_DIR)/bits$(BITSIZE) \ - -I$(GCCINCDIR) \ - -I$(LINUX_INCLUDE_DIR) - LIB_OBJS = - LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs + KLIBC_INSTALL = $(PWD)/klibc/.install + KLCC = $(KLIBC_INSTALL)/bin/klcc + CC = $(KLCC) + LD = $(KLCC) + #LDFLAGS += -static else - WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations - CRT0 = - LIBC = - CFLAGS += $(WARNINGS) -I$(GCCINCDIR) - LIB_OBJS = -lc - LDFLAGS = + CFLAGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations endif ifeq ($(strip $(USE_SELINUX)),true) @@ -292,10 +273,10 @@ $(INSTALL_PROGRAM) -D $(MODULE_USB) $(DESTDIR)$(sbindir)/$(MODULE_USB) $(INSTALL_PROGRAM) -D $(MODULE_PCI) $(DESTDIR)$(sbindir)/$(MODULE_PCI) $(INSTALL_PROGRAM) -D $(MODULE_SCSI) $(DESTDIR)$(sbindir)/$(MODULE_SCSI) - - ln -f -s $(sbindir)/$(MODULE_IEEE1394) $(DESTDIR)$(hotplugdir)/ieee1394/$(MODULE_IEEE1394).hotplug - - ln -f -s $(sbindir)/$(MODULE_USB) $(DESTDIR)$(hotplugdir)/usb/$(MODULE_USB).hotplug - - ln -f -s $(sbindir)/$(MODULE_PCI) $(DESTDIR)$(hotplugdir)/pci/$(MODULE_PCI).hotplug - - ln -f -s $(sbindir)/$(MODULE_SCSI) $(DESTDIR)$(hotplugdir)/scsi/$(MODULE_SCSI).hotplug + - ln -f -s $(DESTDIR)$(sbindir)/$(MODULE_IEEE1394) $(DESTDIR)$(hotplugdir)/ieee1394/$(MODULE_IEEE1394).hotplug + - ln -f -s $(DESTDIR)$(sbindir)/$(MODULE_USB) $(DESTDIR)$(hotplugdir)/usb/$(MODULE_USB).hotplug + - ln -f -s $(DESTDIR)$(sbindir)/$(MODULE_PCI) $(DESTDIR)$(hotplugdir)/pci/$(MODULE_PCI).hotplug + - ln -f -s $(DESTDIR)$(sbindir)/$(MODULE_SCSI) $(DESTDIR)$(hotplugdir)/scsi/$(MODULE_SCSI).hotplug uninstall: uninstall-man - rm $(sbindir)/$(ROOT) --------------010405090603010605090104-- ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel