linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: junio@siamese.dhis.twinsun.com
To: Alan Cox <laughing@shared-source.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] link failur in Linux 2.4.9-ac16 around apm.o and sysrq.o
Date: 27 Sep 2001 22:21:24 -0700	[thread overview]
Message-ID: <7v8zezki0b.fsf@siamese.dhis.twinsun.com> (raw)
In-Reply-To: <20010927185107.A17861@lightning.swansea.linux.org.uk>
In-Reply-To: <20010927185107.A17861@lightning.swansea.linux.org.uk>

2.4.9-ac16 fails to link with CONFIG_APM=y and
CONFIG_MAGIC_SYSRQ=n.  This is because apm.c unconditionally
makes calls to functions (__sysrq_lock_table and friends)
defined in sysrq.c.

I can think of a couple of different approaches to work this
around, but is there an established proper way to resolve this
kind of dependency in the kernel code?

I've attached a fix based on (3) below at the end of this message.

 (1) In include/linux/sysrq.h, define stubs for
     __sysrq_lock_table that does not do anything when
     CONFIG_MAGIC_SYSRQ is not set;

 (2) Change ''make config'' procedure so that CONFIG_MAGIC_SYSRQ
     is always set if CONFIG_APM is defined;

 (3) Change drivers/char/Makefile to make sysrq.o to be linked
     in if CONFIG_APM is defined (even if CONFIG_MAGIC_SYSRQ is).

--- 2.4.9-ac16.sffix/drivers/char/Makefile	Thu Sep 27 12:46:56 2001
+++ 2.4.9-ac16.sffix/drivers/char/Makefile	Thu Sep 27 22:08:19 2001
@@ -143,6 +143,7 @@
 endif
 
 obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
+obj-$(CONFIG_APM) += sysrq.o
 obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o
 obj-$(CONFIG_ROCKETPORT) += rocket.o
 obj-$(CONFIG_MOXA_SMARTIO) += mxser.o

  parent reply	other threads:[~2001-09-28  5:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27 17:51 Linux 2.4.9-ac16 Alan Cox
2001-09-27 18:26 ` Udo A. Steinberg
2001-09-27 18:28 ` Rik van Riel
2001-09-27 19:03 ` [PATCH] 2.4.9-ac16 swapoff 2*vfree Hugh Dickins
2001-09-27 19:36   ` Alexander Viro
2001-09-27 19:03 ` Linux 2.4.9-ac16 Tom Rini
2001-09-27 23:06   ` Alan Cox
2001-09-27 23:11     ` Tom Rini
2001-09-27 19:31 ` Kent Borg
2001-09-28  1:07 ` [REPORT] (PPC) Compile Error (Linux 2.4.9-ac[12-16]) Tsunehiko Baba
2001-09-28 14:15   ` Tom Rini
2001-09-28 14:40     ` Alan Cox
2001-09-28 14:41       ` Tom Rini
2001-09-28  5:21 ` junio [this message]
2001-09-28  5:47   ` [PATCH] link failur in Linux 2.4.9-ac16 around apm.o and sysrq.o junio
2001-09-28 15:41     ` Randy.Dunlap
2001-09-28 15:58     ` Crutcher Dunnavant
2001-09-28 15:30 ` Linux 2.4.9-ac16 Stefan Becker
2001-09-28 16:39   ` Rik van Riel
2001-09-28 17:15     ` Tim Connors
2001-09-28 20:52 ` Russell King

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=7v8zezki0b.fsf@siamese.dhis.twinsun.com \
    --to=junio@siamese.dhis.twinsun.com \
    --cc=laughing@shared-source.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] link failur in Linux 2.4.9-ac16 around apm.o and sysrq.o' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox