From: "Svetoslav Slavtchev" <svetljo@gmx.de>
To: linux-hotplug@vger.kernel.org
Subject: PATCH: drop symbolink link to kernel headers
Date: Tue, 20 Jan 2004 18:08:04 +0000 [thread overview]
Message-ID: <5701.1074622084@www46.gmx.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
Hi,
the attached patch removes the need from a symbolik link to kernel headers
when compiling against klibc.
if KERNEL_DIR is not specified it looks for kernel headers
in /usr/src/linux( of course you could change it to /lib/modules/`uname
-r`/build )
the main idea is to build packages a bit easier/ pretier
instead of creating a symbolik link, one can specify
make KERNEL_DIR=[path to kernel] or omit it in case
kernel sources are available in /usr/src/linux
best,
svetljo
--
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: udev013_klibc_kheaders.diff --]
[-- Type: text/x-patch; name="udev013_klibc_kheaders.diff", Size: 2962 bytes --]
diff -Naurb udev-013/extras/multipath/libdevmapper/Makefile udev.old/extras/multipath/libdevmapper/Makefile
--- udev-013/extras/multipath/libdevmapper/Makefile 2003-12-10 12:14:19.000000000 +0100
+++ udev.old/extras/multipath/libdevmapper/Makefile 2004-01-19 12:29:13.153889468 +0100
@@ -10,7 +10,7 @@
GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
-I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
- -I$(GCCINCDIR) -I$(klibcdir)/linux/include -I. -Iioctl
+ -I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I. -Iioctl
OBJS = ioctl/libdevmapper.o libdm-common.o
diff -Naurb udev-013/extras/multipath/Makefile udev.old/extras/multipath/Makefile
--- udev-013/extras/multipath/Makefile 2004-01-05 20:48:32.000000000 +0100
+++ udev.old/extras/multipath/Makefile 2004-01-19 12:34:49.127502355 +0100
@@ -15,7 +15,7 @@
GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
-I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
- -I$(GCCINCDIR) -I$(klibcdir)/linux/include -I$(sysfsdir) -I.
+ -I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I$(sysfsdir) -I.
OBJS = main.o
CRT0 = ../../klibc/klibc/crt0.o
@@ -32,7 +32,7 @@
recurse:
@for dir in $(SUBDIRS); do\
- $(MAKE) -C $$dir ; \
+ $(MAKE) KERNEL_DIR=$(KERNEL_DIR) -C $$dir ; \
done
$(MAKE) $(EXEC)
diff -Naurb udev-013/klibc/MCONFIG udev.old/klibc/MCONFIG
--- udev-013/klibc/MCONFIG 2004-01-19 13:26:01.115895297 +0100
+++ udev.old/klibc/MCONFIG 2004-01-18 16:59:06.047625766 +0100
@@ -12,7 +12,7 @@
-I$(KLIBSRC)/arch/$(ARCH)/include \
-I$(KLIBSRC)/include/bits$(BITSIZE) \
-D__KLIBC__ -DBITSIZE=$(BITSIZE) -I$(KLIBSRC)/include \
- -I$(SRCROOT)/linux/include
+ -I$(KERNEL_DIR)/include
LDFLAGS =
AR = $(CROSS)ar
RANLIB = $(CROSS)ranlib
diff -Naurb udev-013/Makefile udev.old/Makefile
--- udev-013/Makefile 2004-01-19 13:26:01.115895297 +0100
+++ udev.old/Makefile 2004-01-19 12:36:13.173255316 +0100
@@ -32,6 +32,10 @@
LOCAL_CFG_DIR = etc/udev
DESTDIR =
+ifndef KERNEL_DIR
+KERNEL_DIR=/usr/src/linux
+endif
+
# override this to make udev look in a different location for it's config files
prefix =
exec_prefix = ${prefix}
@@ -122,7 +126,7 @@
KLIBC_BASE = $(PWD)/klibc
KLIBC_DIR = $(KLIBC_BASE)/klibc
INCLUDE_DIR := $(KLIBC_DIR)/include
- LINUX_INCLUDE_DIR := $(KLIBC_BASE)/linux/include
+ LINUX_INCLUDE_DIR := $(KERNEL_DIR)/include
include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
# arch specific objects
ARCH_LIB_OBJS = \
@@ -150,7 +154,7 @@
@extras="$(EXTRAS)" ; for target in $$extras ; do \
echo $$target ; \
$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
- -C $$target $@ ; \
+ KERNEL_DIR="$(KERNEL_DIR)" -C $$target $@ ; \
done ; \
$(ROOT): $(LIBC)
next reply other threads:[~2004-01-20 18:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-20 18:08 Svetoslav Slavtchev [this message]
2004-01-21 23:53 ` PATCH: drop symbolink link to kernel headers Greg KH
2004-01-22 0:40 `
2004-01-22 1:51 `
2004-01-22 3:42 ` Dave Dodge
2004-01-22 17:06 ` linas
2004-01-22 17:24 ` Svetoslav Slavtchev
2004-01-22 17:28 ` Greg KH
2004-01-22 17:31 ` Greg KH
2004-02-03 0:52 ` Greg KH
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=5701.1074622084@www46.gmx.net \
--to=svetljo@gmx.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.