linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch hotplug klibc build and DESTDIR
@ 2005-05-20 11:33 Vassilis Virvilis
  0 siblings, 0 replies; only message in thread
From: Vassilis Virvilis @ 2005-05-20 11:33 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

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


[-- Attachment #2: patch-hotplug --]
[-- Type: text/plain, Size: 2662 bytes --]

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-20 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-20 11:33 patch hotplug klibc build and DESTDIR Vassilis Virvilis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).