[lkml]   [2004]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] Re: Building on platforms other than Linux
    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.


    >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, 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)


    --- ../../../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 :=

    host-progs := conf mconf qconf gconf
    -conf-objs := conf.o
    -mconf-objs := mconf.o
    +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)

    ifeq ($(gconf-target),1)
    -gconf-objs := gconf.o kconfig_load.o
    +gconf-objs := gconf.o $(libkconfig-objs)

    clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
    @@ -96,10 +96,10 @@ := -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)/
     \ /
      Last update: 2005-03-22 14:05    [W:0.028 / U:24.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site