mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: faith@valinux.com, linux-kernel@vger.kernel.org
Subject: Patch(?): linux-2.4.0-prerelease/drivers/char/drm/Makefile libdrm symbol versioning fix
Date: Sun, 31 Dec 2000 21:52:16 -0800	[thread overview]
Message-ID: <20001231215216.A17686@baldur.yggdrasil.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

	There is a thread in linux-kernel about how somewhere in
linux-2.4.0-test13-preX, the Makefile for drivers/char/drm started
building libdrm.a and not versioning the symbols.  I believe the
following patch fixes the problem, but I have not tried it for the
nonmodular case.

	The change is that libdrm.o is built instead of libdrm.a.  This
object is linked into the kernel if at least one driver that needs it
is also linked into the kernel.  Otherwise, it is built as a helper
module which is automatically loaded by modprobe when a module that
needs it is loaded.  This change takes advantage of the new style
Makefile rules to achieve this end.  I think it basically is the
correct approach, although I have not yet tested compilation into
the kernel.

	Any testing and feedback would be appreciated.

-- 
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."

[-- Attachment #2: drm.diff --]
[-- Type: text/plain, Size: 1863 bytes --]

--- linux-2.4.0-prerelease/drivers/char/drm/Makefile	Fri Dec 29 14:07:21 2000
+++ linux/drivers/char/drm/Makefile	Fri Dec 22 01:50:11 2000
@@ -44,43 +44,37 @@
 mga-objs   := mga_drv.o   mga_dma.o     mga_context.o  mga_bufs.o  mga_state.o
 i810-objs  := i810_drv.o  i810_dma.o    i810_context.o i810_bufs.o
 
-obj-$(CONFIG_DRM_GAMMA) += gamma.o
-obj-$(CONFIG_DRM_TDFX)  += tdfx.o
-obj-$(CONFIG_DRM_R128)  += r128.o
-obj-$(CONFIG_DRM_FFB)   += ffb.o
-obj-$(CONFIG_DRM_MGA)   += mga.o
-obj-$(CONFIG_DRM_I810)  += i810.o
+obj-$(CONFIG_DRM_GAMMA) += gamma.o drmlib.o
+obj-$(CONFIG_DRM_TDFX)  += tdfx.o drmlib.o
+obj-$(CONFIG_DRM_R128)  += r128.o drmlib.o
+obj-$(CONFIG_DRM_FFB)   += ffb.o drmlib.o
+obj-$(CONFIG_DRM_MGA)   += mga.o drmlib.o
+obj-$(CONFIG_DRM_I810)  += i810.o drmlib.o
 
 
 # When linking into the kernel, link the library just once. 
 # If making modules, we include the library into each module
 
-ifdef MAKING_MODULES
-  lib = drmlib.a
-else
-  obj-y += drmlib.a
-endif
-
 include $(TOPDIR)/Rules.make
 
-drmlib.a: $(lib-objs)
+drmlib.o: $(lib-objs)
 	rm -f $@
-	$(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs)
+	$(LD) -r -o $@ $(lib-objs)
 
-gamma.o: $(gamma-objs) $(lib)
-	$(LD) -r -o $@ $(gamma-objs) $(lib)
+gamma.o: $(gamma-objs)
+	$(LD) -r -o $@ $(gamma-objs)
 
-tdfx.o: $(tdfx-objs) $(lib)
-	$(LD) -r -o $@ $(tdfx-objs) $(lib)
+tdfx.o: $(tdfx-objs)
+	$(LD) -r -o $@ $(tdfx-objs)
 
-mga.o: $(mga-objs) $(lib)
-	$(LD) -r -o $@ $(mga-objs) $(lib)
+mga.o: $(mga-objs)
+	$(LD) -r -o $@ $(mga-objs)
 
-i810.o: $(i810-objs) $(lib)
-	$(LD) -r -o $@ $(i810-objs) $(lib)
+i810.o: $(i810-objs)
+	$(LD) -r -o $@ $(i810-objs)
 
-r128.o: $(r128-objs) $(lib)
-	$(LD) -r -o $@ $(r128-objs) $(lib)
+r128.o: $(r128-objs)
+	$(LD) -r -o $@ $(r128-objs)
 
-ffb.o: $(ffb-objs) $(lib)
-	$(LD) -r -o $@ $(ffb-objs) $(lib)
+ffb.o: $(ffb-objs)
+	$(LD) -r -o $@ $(ffb-objs)

             reply	other threads:[~2001-01-01  6:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-01  5:52 Adam J. Richter [this message]
2001-01-01  6:45 ` Keith Owens
2001-01-01  7:24   ` Adam J. Richter
2001-01-01  7:47 Adam J. Richter

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=20001231215216.A17686@baldur.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=faith@valinux.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®