summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-11-29 18:59:43 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-11-29 18:59:43 +0000
commit3888c9583804b7cf06ba86d7c9ed5f3de524acc5 (patch)
treeb0b9e771e7fe7c0d689a6a25104460a8ae2ecd4c
parentba1ceecb551c7e04b79296032c79e6550ded0e9c (diff)
- build a udev for the target rather than for the host.
-rw-r--r--package/udev/udev.mk15
1 files changed, 13 insertions, 2 deletions
diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index 80bf159cd..8aa2473b4 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -11,6 +11,13 @@ UDEV_DIR:=$(BUILD_DIR)/udev-$(UDEV_VERSION)
UDEV_TARGET_BINARY:=sbin/udev
UDEV_BINARY:=udev
+# 094 had _GNU_SOURCE set
+BR2_UDEV_CFLAGS:= -D_GNU_SOURCE $(TARGET_CFLAGS)
+ifeq ($(BR2_LARGEFILE),)
+BR2_UDEV_CFLAGS+=-U_FILE_OFFSET_BITS
+endif
+
+
# UDEV_ROOT is /dev so we can replace devfs, not /udev for experiments
UDEV_ROOT:=/dev
@@ -28,7 +35,8 @@ $(UDEV_DIR)/.configured: $(UDEV_DIR)/.unpacked
touch $(UDEV_DIR)/.configured
$(UDEV_DIR)/$(UDEV_BINARY): $(UDEV_DIR)/.configured
- $(MAKE) CROSS=$(TARGET_CROSS) GCC=$(TARGET_CC) \
+ $(MAKE) CROSS=$(TARGET_CROSS) CC=$(TARGET_CC) LD=$(TARGET_CC) \
+ CFLAGS="$(BR2_UDEV_CFLAGS)" \
USE_LOG=false USE_SELINUX=false \
udevdir=$(UDEV_ROOT) -C $(UDEV_DIR)
touch -c $(UDEV_DIR)/$(UDEV_BINARY)
@@ -43,7 +51,10 @@ $(TARGET_DIR)/$(UDEV_TARGET_BINARY): $(UDEV_DIR)/$(UDEV_BINARY)
-mkdir $(TARGET_DIR)/sys
install -D -m 0644 $(UDEV_DIR)/$(UDEV_CONF) \
$(TARGET_DIR)/etc/udev/rules.d/50-udev.rules
- $(MAKE) CROSS=$(TARGET_CROSS) GCC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) \
+ $(MAKE) CROSS=$(TARGET_CROSS) CC=$(TARGET_CC) LD=$(TARGET_CC) \
+ DESTDIR=$(TARGET_DIR) \
+ CFLAGS="$(BR2_UDEV_CFLAGS)" \
+ LDFLAGS="-warn-common" \
USE_LOG=false USE_SELINUX=false \
udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) install
$(INSTALL) -m 0755 -D package/udev/init-udev $(TARGET_DIR)/etc/init.d/S10udev