linux-2.3.28 patch to fix slhc modularization selection

Adam J. Richter (adam@yggdrasil.com)
Sun, 14 Nov 1999 12:09:15 -0800


I am under the impression that the preferred procedure for
submitting networking related kernel patches is to route them via
Dave Miller, who will then send them to Linus, so I am cc'ing
this to Dave's email. However, I am also sending this to linux-kernel,
in case anyone else has any comments, or would otherwise be duplicating
this.

When CONFIG_SLIP is set to "m" and CONFIG_SLIP_COMPRESSED
is enabled (set to "y"), linux-2.3.28/drivers/Makefile would attempt
to compile slhc.o into the kernel when it should make slhc into a
module. The following patch fixes that problem and substantially
substantially simplifies the sections of the Makefile that determine
how to compile slhc, bringing it much more in line with the new
style being used elsewhere in the Makefile to determine how to
compile individual drivers.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

--------------------------CUT HERE--------------------------------

--- linux-2.3.28/drivers/net/Makefile Wed Nov 10 12:54:34 1999
+++ linux/drivers/net/Makefile Sun Nov 14 11:57:56 1999
@@ -75,16 +75,8 @@
endif
endif

-ifeq ($(CONFIG_ISDN),y)
- ifeq ($(CONFIG_ISDN_PPP),y)
- obj-y += slhc.o ppp_deflate.o
- endif
-else
- ifeq ($(CONFIG_ISDN),m)
- ifeq ($(CONFIG_ISDN_PPP),y)
- obj-m += slhc.o ppp_deflate.o
- endif
- endif
+ifeq ($(CONFIG_ISDN_PPP),y)
+ obj-$(CONFIG_ISDN) += slhc.o ppp_deflate.o
endif

obj-$(CONFIG_NET) += Space.o setup.o net_init.o loopback.o
@@ -118,33 +110,19 @@

# bsd_comp.o is *always* a module, for some documented reason
# (licensing).
-ifeq ($(CONFIG_PPP),y)
- obj-y += ppp_generic.o slhc.o
+ifdef CONFIG_PPP
+ obj-$(CONFIG_PPP) += ppp_generic.o slhc.o
obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
obj-$(CONFIG_PPP_DEFLATE) += ppp_deflate.o
ifeq ($(CONFIG_PPP_BSDCOMP),m)
obj-m += bsd_comp.o
endif
-else
- ifeq ($(CONFIG_PPP),m)
- obj-m += ppp_generic.o slhc.o
- obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
- obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
- obj-$(CONFIG_PPP_DEFLATE) += ppp_deflate.o
- ifeq ($(CONFIG_PPP_BSDCOMP),m)
- obj-m += bsd_comp.o
- endif
- endif
endif

obj-$(CONFIG_SLIP) += slip.o
-ifeq ($(CONFIG_SLIP),y)
- obj-$(CONFIG_SLIP_COMPRESSED) += slhc.o
-else
- ifeq ($(CONFIG_SLIP),m)
- obj-$(CONFIG_SLIP_COMPRESSED) += slhc.o
- endif
+ifeq ($(CONFIG_SLIP_COMPRESSED),y)
+ obj-$(CONFIG_SLIP) += slhc.o
endif

obj-$(CONFIG_STRIP) += strip.o

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/