* Building on platforms other than Linux @ 2004-08-11 9:13 Benno 2004-08-11 18:54 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Benno @ 2004-08-11 9:13 UTC (permalink / raw) To: linux-kernel Hi, I was wondering if there were any, in priniciple, objections to making the Linux kernel buildable on different Unix-like platforms? I am currently compiling on MacOSX and this, for the most part was fairly straightforward and simple. The biggest gotcha I had was that libkconfig is compiled as a shared library, and unfortunately shared libraries are done quite different on different systems. Specifically MacOSX doesn't support gcc -shared. libkconfig.so appears to be the only shared library created in the build system, and given that it is only about 95K, and that you don't often run two copies of conf at once, it doesn't seem to buy much. The only other reason for doing it this way is to provide a plugin style architecture but this doesn't appear evident. gconf and qconf appear to manually load libkconfig.so (rather than linking against it), but in both cases it appears to be the very first thing they do is explicitly load libconfig. It would seem that using static libraries would enhance portability, and produce a simpler build system, however I expect I am missing some other reasons. In summary two questions: 1: Is portability of the build system a desirable property? 2: If so, is moving to static libraries a valid way of achieving this? Thanks, Benno ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building on platforms other than Linux 2004-08-11 9:13 Building on platforms other than Linux Benno @ 2004-08-11 18:54 ` Sam Ravnborg 2004-08-11 19:03 ` Arjan van de Ven 2004-08-12 0:22 ` [PATCH] " Benno 0 siblings, 2 replies; 5+ messages in thread From: Sam Ravnborg @ 2004-08-11 18:54 UTC (permalink / raw) To: Benno; +Cc: linux-kernel On Wed, Aug 11, 2004 at 07:13:49PM +1000, Benno wrote: > Hi, > > I was wondering if there were any, in priniciple, objections > to making the Linux kernel buildable on different Unix-like > platforms? The userbase for building kernels are only increasing and there continue to be more focus from the embedded people. Having experince in this field first-hand tells me that a kernel that can be build on several paltforms are a good thing. For kbuild you will at some point start to see patches so at least the build system does not restrict us to Linux alone. People on this list usually reply: "shift development to a Linux based platform". This is for many developers a nice dream, but they are restricted by coporate rules etc. So please feed patches to this list with your findings. > > I am currently compiling on MacOSX and this, for the most part was > fairly straightforward and simple. The biggest gotcha I had was > that libkconfig is compiled as a shared library, and unfortunately shared > libraries are done quite different on different systems. Specifically MacOSX > doesn't support gcc -shared. Please submit a patch for this and make sure to include Roman Zippel, he is the maintainer of kconfig. [I recall RedHat already disables the shared library??] Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building on platforms other than Linux 2004-08-11 18:54 ` Sam Ravnborg @ 2004-08-11 19:03 ` Arjan van de Ven 2004-08-11 19:19 ` Sam Ravnborg 2004-08-12 0:22 ` [PATCH] " Benno 1 sibling, 1 reply; 5+ messages in thread From: Arjan van de Ven @ 2004-08-11 19:03 UTC (permalink / raw) To: Sam Ravnborg; +Cc: Benno, linux-kernel [-- Attachment #1: Type: text/plain, Size: 103 bytes --] > [I recall Red Hat already disables the shared library??] we don't do no such thing, sir. :-) [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building on platforms other than Linux 2004-08-11 19:03 ` Arjan van de Ven @ 2004-08-11 19:19 ` Sam Ravnborg 0 siblings, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2004-08-11 19:19 UTC (permalink / raw) To: Arjan van de Ven; +Cc: Sam Ravnborg, Benno, linux-kernel On Wed, Aug 11, 2004 at 09:03:11PM +0200, Arjan van de Ven wrote: > > > [I recall Red Hat already disables the shared library??] > > we don't do no such thing, sir. :-) OK. It was the following patch that I recalled seeing: http://marc.theaimsgroup.com/?l=linux-kernel&m=108599543602571&w=2 One day I may land a non-interactive frontend for kconfig, so we can have this functionality added in the kernel proper. Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Re: Building on platforms other than Linux 2004-08-11 18:54 ` Sam Ravnborg 2004-08-11 19:03 ` Arjan van de Ven @ 2004-08-12 0:22 ` Benno 1 sibling, 0 replies; 5+ messages in thread From: Benno @ 2004-08-12 0:22 UTC (permalink / raw) To: linux-kernel, roms [-- Attachment #1: Type: text/plain, Size: 1798 bytes --] On Wed Aug 11, 2004 at 20:54:53 +0200, Sam Ravnborg wrote: >On Wed, Aug 11, 2004 at 07:13:49PM +1000, Benno wrote: >> Hi, >> >> I was wondering if there were any, in priniciple, objections >> to making the Linux kernel buildable on different Unix-like >> platforms? > >The userbase for building kernels are only increasing and there >continue to be more focus from the embedded people. >Having experince in this field first-hand tells me that a kernel >that can be build on several paltforms are a good thing. This is the direction I am coming from. >For kbuild you will at some point start to see patches so at least >the build system does not restrict us to Linux alone. Great. >People on this list usually reply: "shift development to a Linux >based platform". This is for many developers a nice dream, >but they are restricted by coporate rules etc. > >So please feed patches to this list with your findings. > >> >> I am currently compiling on MacOSX and this, for the most part was >> fairly straightforward and simple. The biggest gotcha I had was >> that libkconfig is compiled as a shared library, and unfortunately shared >> libraries are done quite different on different systems. Specifically MacOSX >> doesn't support gcc -shared. > >Please submit a patch for this and make sure to include Roman Zippel, he >is the maintainer of kconfig. Attached is a patch to avoid using shared libraries in the build system. It is very simple, instead of [m]conf linked against libkconfig.so, they directly link against $(libkconfig-objs). For (g|q)conf they no longer use dl_open and also directly link against $(libkconfig-objs). (Achieved by export LKC_DIRECT_LINK to the compile.) (Give this change one could also get rid of rules to build .so files in Makefile.lib) Cheers, Benno [-- Attachment #2: no_shared.diff --] [-- Type: text/plain, Size: 1342 bytes --] --- ../../../linux-2.6.7/scripts/kconfig/Makefile 2004-06-16 15:20:26.000000000 +1000 +++ Makefile 2004-08-12 09:53:15.000000000 +1000 @@ -68,8 +68,8 @@ libkconfig-objs := zconf.tab.o host-progs := conf mconf qconf gconf -conf-objs := conf.o libkconfig.so -mconf-objs := mconf.o libkconfig.so +conf-objs := conf.o $(libkconfig-objs) +mconf-objs := mconf.o $(libkconfig-objs) ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 @@ -81,11 +81,11 @@ ifeq ($(qconf-target),1) qconf-cxxobjs := qconf.o -qconf-objs := kconfig_load.o +qconf-objs := $(libkconfig-objs) endif ifeq ($(gconf-target),1) -gconf-objs := gconf.o kconfig_load.o +gconf-objs := gconf.o $(libkconfig-objs) endif clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \ @@ -96,10 +96,10 @@ HOSTCFLAGS_zconf.tab.o := -I$(src) HOSTLOADLIBES_qconf = -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(QTLIB) -ldl -HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include +HOSTCXXFLAGS_qconf.o = -DLKC_DIRECT_LINK -I$(QTDIR)/include HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` -HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` +HOSTCFLAGS_gconf.o = -DLKC_DIRECT_LINK `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-12 0:37 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-08-11 9:13 Building on platforms other than Linux Benno 2004-08-11 18:54 ` Sam Ravnborg 2004-08-11 19:03 ` Arjan van de Ven 2004-08-11 19:19 ` Sam Ravnborg 2004-08-12 0:22 ` [PATCH] " Benno
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®