This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

building linux kernel on cygwin (and MacOSX) (was: crosstools cygwinwoes)


bertrand marquis wrote:
My failure from 3.3.3 is slightly different.

$ make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
HOSTLD scripts/kconfig/mconf
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
scripts/kconfig/libkconfig.so(.text+0x0):crtstuff.c: multiple definition of
`___do_sjlj_init'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/crtbegin.o(.text+0x0):crtstuff.c:
first defined here
make[1]: *** [scripts/kconfig/mconf] Error 1
make: *** [menuconfig] Error 2

I had the same problem last week. It seems that mconf is linked using a .so file. I had to change this to link mconf with the .o file. I also had problems because to compile the kconfg_elk or something like that program in script/, we need elf.h header. I solve that using the libelf to have a elf.h under cygwin.

I assume you mean the one linked to from http://www.gnu.org/directory/libs/misc/libelf.html (the one in elfutils from http://people.redhat.com/drepper/ is problematic because (a) the author provides no source tarball, (b) doesn't release the whole package under a free license.)

Maybe you could package up libelf as a cygwin package and contribute it to the cygwin project.
That would be quite helpful.

here is what i'm using:

gcc 3.2.3
glibc 2.3.2
binutils 2.14
kernel 2.6.7 (but the patch is also good for 2.6.6)

here is the patch i'm trying to use now, i'm still under progress for kernel 2.6.7 so i don't know if everything else will work:

--- linux-x86-2.6.7/scripts/kconfig/Makefile 2004-06-16 07:20:26.000000000 +0200
+++ linux-x86-2.6.7.cyg/linux-x86-2.6.7/scripts/kconfig/Makefile 2004-06-24 10:39:18.824400000 +0200
@@ -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.o
+mconf-objs    := mconf.o zconf.tab.o

ifeq ($(MAKECMDGOALS),xconfig)
    qconf-target := 1
@@ -89,11 +89,12 @@
endif

clean-files    := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
-           .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
+           .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c libkconfig.o

# generated files seem to need this to find local include files
HOSTCFLAGS_lex.zconf.o    := -I$(src)
HOSTCFLAGS_zconf.tab.o    := -I$(src)
+HOSTCFLAGS_libkconfig.o    := -I$(src)

HOSTLOADLIBES_qconf = -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(QTLIB) -ldl
HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include
@@ -101,6 +102,9 @@
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`


+$(obj)/libkconfig.c: $(obj)/zconf.tab.c $(obj)/lex.zconf.c
+ cp $< $@
+
$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h


$(obj)/qconf.o: $(obj)/.tmp_qtcheck

I can't try that myself at the moment, but it looks reasonable, and non-cygwin-specific. Maybe someone could verify this helps Mac OS X build the linux kernel, and doesn't hurt building it on Linux? - Dan

--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]