kconf: .so linking

Arjan van de Ven (arjanv@redhat.com)
09 Jul 2003 12:38:12 +0200


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-31943-1057747427-0001-2
Content-Type: multipart/mixed; boundary="=-DHFYkwvqlaTQOV/xCMAr"

--=-DHFYkwvqlaTQOV/xCMAr
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

in the 2.5.74 kconfig makefile, the scripts/kconfig/conf binary is built
such that it requires a scripts/kconfig/libkconfig.so relative to the
current working directory. Several tools (like rpm and prelink) really
really don't like this, and in addition it's just untidy.

The attached patch fixes this by linking the .so file into the conf
binary with an "origine" path which means "same directory as the
binary". This keeps the tools happy and works better as a side effect.

Greetings,
Arjan van de Ven

--=-DHFYkwvqlaTQOV/xCMAr
Content-Description:
Content-Disposition: inline; filename=kconfig.patch
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

--- linux-2.5.74/scripts/kconfig/Makefile.org 2003-07-02 22:57:42.000000000=
+0200
+++ linux-2.5.74/scripts/kconfig/Makefile 2003-07-09 12:20:49.019013406 +02=
00
@@ -15,7 +15,7 @@
libkconfig-objs :=3D zconf.tab.o
=20
host-progs :=3D conf mconf qconf gconf
-conf-objs :=3D conf.o libkconfig.so
+conf-objs :=3D conf.o
mconf-objs :=3D mconf.o libkconfig.so
=20
ifeq ($(MAKECMDGOALS),$(obj)/qconf)
@@ -34,13 +34,15 @@
HOSTCFLAGS_lex.zconf.o :=3D -I$(src)
HOSTCFLAGS_zconf.tab.o :=3D -I$(src)
=20
+HOSTLOADLIBES_conf =3D -Wl,-rpath,\$$ORIGIN -Lscripts/kconfig -lkconfig
+
HOSTLOADLIBES_qconf =3D -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -l$(QTLIB) =
-ldl
HOSTCXXFLAGS_qconf.o =3D -I$(QTDIR)/include=20
=20
HOSTLOADLIBES_gconf =3D `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --li=
bs`
HOSTCFLAGS_gconf.o =3D `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cfl=
ags`
=20
-$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.t=
ab.h
+$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.t=
ab.h $(obj)/libkconfig.so
=20
$(obj)/qconf.o: $(obj)/.tmp_qtcheck
=20

--=-DHFYkwvqlaTQOV/xCMAr--

--=_courier-31943-1057747427-0001-2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Transfer-Encoding: 7bit
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA/C/CUxULwo51rQBIRAo6CAJ98GVfT/bVsj1Kky5liChtbu2r4wwCeNKEG
mLksIEKaphYg9tqxPPq5b9A=
=0X1w
-----END PGP SIGNATURE-----

--=_courier-31943-1057747427-0001-2--