Bug 74119

Summary: A patch to help external modules
Product: [Retired] Red Hat Linux Reporter: hjl
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: aleksey
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-19 16:36:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A patch to help external modules. none

Description hjl 2002-09-16 14:50:27 UTC
Right now, it is very hard to use the same
kernel compiler flags to compile an external
module. I am uploading a patch to help. With
that patch, I can use a Makefile like:

---
#
# Makefile for the Intel's E100 ethernet driver
#

obj-$(CONFIG_NET_E100) += e100.o

e100-objs := e100_main.o e100_config.o e100_proc.o e100_phy.o \
             e100_eeprom.o e100_test.o

ifdef VERSION
include $(TOPDIR)/Rules.make

e100.o: $(e100-objs)
        $(LD) -r -o $@ $(e100-objs)
else
LINUXDIR=/lib/modules/$(shell uname -r)/build
CONFIGFILE=configs/kernel-2.4.18-i686.config

modules dep:
         $(MAKE) -C $(LINUXDIR) CONFIGFILE=$(CONFIGFILE) SUBDIRS=`pwd` $@

clean:
        rm -f *.[oas] .*.flags .depend
endif
---

to compile e100 against the running kernel for i686. I can
change LINUXDIR and CONFIGFILE by hand for other kernel source
trees or machines.

Comment 1 hjl 2002-09-16 14:51:30 UTC
Created attachment 76244 [details]
A patch to help external modules.

Comment 2 Bill Nottingham 2003-02-19 16:36:41 UTC
This is fixed better in current kernels.