diff options
-rw-r--r-- | arch/um/Kconfig_net | 2 | ||||
-rw-r--r-- | arch/um/Makefile | 14 | ||||
-rw-r--r-- | arch/um/drivers/Makefile | 17 |
3 files changed, 24 insertions, 9 deletions
diff --git a/arch/um/Kconfig_net b/arch/um/Kconfig_net index 1c2f9a70d91d..fa2ab2dd78b7 100644 --- a/arch/um/Kconfig_net +++ b/arch/um/Kconfig_net | |||
@@ -135,7 +135,7 @@ config UML_NET_MCAST | |||
135 | 135 | ||
136 | config UML_NET_PCAP | 136 | config UML_NET_PCAP |
137 | bool "pcap transport" | 137 | bool "pcap transport" |
138 | depends on UML_NET && BROKEN | 138 | depends on UML_NET && EXPERIMENTAL |
139 | help | 139 | help |
140 | The pcap transport makes a pcap packet stream on the host look | 140 | The pcap transport makes a pcap packet stream on the host look |
141 | like an ethernet device inside UML. This is useful for making | 141 | like an ethernet device inside UML. This is useful for making |
diff --git a/arch/um/Makefile b/arch/um/Makefile index dfcc9eaafaa7..6a7a9f43cdef 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -56,17 +56,21 @@ include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) | |||
56 | core-y += $(SUBARCH_CORE) | 56 | core-y += $(SUBARCH_CORE) |
57 | libs-y += $(SUBARCH_LIBS) | 57 | libs-y += $(SUBARCH_LIBS) |
58 | 58 | ||
59 | # -Derrno=kernel_errno - This turns all kernel references to errno into | 59 | # -Dvmap=kernel_vmap affects everything, and prevents anything from |
60 | # kernel_errno to separate them from the libc errno. This allows -fno-common | 60 | # referencing the libpcap.o symbol so named. |
61 | # in CFLAGS. Otherwise, it would cause ld to complain about the two different | ||
62 | # errnos. | ||
63 | 61 | ||
64 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ | 62 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ |
65 | $(ARCH_INCLUDE) $(MODE_INCLUDE) | 63 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap |
66 | 64 | ||
67 | USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) | 65 | USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) |
68 | USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ | 66 | USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ |
69 | $(MODE_INCLUDE) $(ARCH_USER_CFLAGS) | 67 | $(MODE_INCLUDE) $(ARCH_USER_CFLAGS) |
68 | |||
69 | # -Derrno=kernel_errno - This turns all kernel references to errno into | ||
70 | # kernel_errno to separate them from the libc errno. This allows -fno-common | ||
71 | # in CFLAGS. Otherwise, it would cause ld to complain about the two different | ||
72 | # errnos. | ||
73 | |||
70 | CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask | 74 | CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask |
71 | CFLAGS += $(call cc-option,-fno-unit-at-a-time,) | 75 | CFLAGS += $(call cc-option,-fno-unit-at-a-time,) |
72 | 76 | ||
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile index b2de9916c32c..d6c31a95b887 100644 --- a/arch/um/drivers/Makefile +++ b/arch/um/drivers/Makefile | |||
@@ -10,7 +10,6 @@ slip-objs := slip_kern.o slip_user.o | |||
10 | slirp-objs := slirp_kern.o slirp_user.o | 10 | slirp-objs := slirp_kern.o slirp_user.o |
11 | daemon-objs := daemon_kern.o daemon_user.o | 11 | daemon-objs := daemon_kern.o daemon_user.o |
12 | mcast-objs := mcast_kern.o mcast_user.o | 12 | mcast-objs := mcast_kern.o mcast_user.o |
13 | #pcap-objs := pcap_kern.o pcap_user.o $(PCAP) | ||
14 | net-objs := net_kern.o net_user.o | 13 | net-objs := net_kern.o net_user.o |
15 | mconsole-objs := mconsole_kern.o mconsole_user.o | 14 | mconsole-objs := mconsole_kern.o mconsole_user.o |
16 | hostaudio-objs := hostaudio_kern.o | 15 | hostaudio-objs := hostaudio_kern.o |
@@ -18,6 +17,17 @@ ubd-objs := ubd_kern.o ubd_user.o | |||
18 | port-objs := port_kern.o port_user.o | 17 | port-objs := port_kern.o port_user.o |
19 | harddog-objs := harddog_kern.o harddog_user.o | 18 | harddog-objs := harddog_kern.o harddog_user.o |
20 | 19 | ||
20 | LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) | ||
21 | |||
22 | $(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o | ||
23 | $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_pcap.o) | ||
24 | #XXX: The call below does not work because the flags are added before the | ||
25 | # object name, so nothing from the library gets linked. | ||
26 | #$(call if_changed,ld) | ||
27 | |||
28 | # When the above is fixed, don't forget to add this too! | ||
29 | #targets := $(obj)/pcap.o | ||
30 | |||
21 | obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o | 31 | obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o |
22 | obj-$(CONFIG_SSL) += ssl.o | 32 | obj-$(CONFIG_SSL) += ssl.o |
23 | obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o | 33 | obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o |
@@ -26,7 +36,7 @@ obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o | |||
26 | obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o | 36 | obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o |
27 | obj-$(CONFIG_UML_NET_DAEMON) += daemon.o | 37 | obj-$(CONFIG_UML_NET_DAEMON) += daemon.o |
28 | obj-$(CONFIG_UML_NET_MCAST) += mcast.o | 38 | obj-$(CONFIG_UML_NET_MCAST) += mcast.o |
29 | #obj-$(CONFIG_UML_NET_PCAP) += pcap.o $(PCAP) | 39 | obj-$(CONFIG_UML_NET_PCAP) += pcap.o |
30 | obj-$(CONFIG_UML_NET) += net.o | 40 | obj-$(CONFIG_UML_NET) += net.o |
31 | obj-$(CONFIG_MCONSOLE) += mconsole.o | 41 | obj-$(CONFIG_MCONSOLE) += mconsole.o |
32 | obj-$(CONFIG_MMAPPER) += mmapper_kern.o | 42 | obj-$(CONFIG_MMAPPER) += mmapper_kern.o |
@@ -41,6 +51,7 @@ obj-$(CONFIG_UML_WATCHDOG) += harddog.o | |||
41 | obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o | 51 | obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o |
42 | obj-$(CONFIG_UML_RANDOM) += random.o | 52 | obj-$(CONFIG_UML_RANDOM) += random.o |
43 | 53 | ||
44 | USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o | 54 | # pcap_user.o must be added explicitly. |
55 | USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o | ||
45 | 56 | ||
46 | include arch/um/scripts/Makefile.rules | 57 | include arch/um/scripts/Makefile.rules |