linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vassilis Virvilis <vasvir@iit.demokritos.gr>
To: linux-hotplug@vger.kernel.org
Subject: patch hotplug klibc build and DESTDIR
Date: Fri, 20 May 2005 11:33:32 +0000	[thread overview]
Message-ID: <428DCB0C.6070903@iit.demokritos.gr> (raw)

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


                 reply	other threads:[~2005-05-20 11:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=428DCB0C.6070903@iit.demokritos.gr \
    --to=vasvir@iit.demokritos.gr \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).