Gentoo Archives: gentoo-user

From: Matthias Bethke <Matthias.Bethke@×××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Embedded Gentoo problems
Date: Thu, 18 Aug 2005 13:01:38
Message-Id: 20050818125701.GB10637@huxley.linguistik.uni-erlangen.de
1 To reactivate this old 486 laptop that's been sitting in my basement, I
2 set out to install it with a tiny Gentoo system and use it as a DSL
3 router. The HD is 1.3 GB, so a full glibc-based system wouldn't be much
4 of a problem, but I wanted to experiment with embedded stuff anyway,
5 so...
6 Well, I've never sone a Stage1 install. Upon my first try with Gentoo I
7 ran into some problem and thought WTH, I'll just go with Stage3. But
8 now, following the HOWTO at http://www.bulah.com/embeddedgentoo.html, I
9 have to do it.
10 All is fine up to the bootstrapping. I have a P4 Gentoo machine, trying
11 to compile for i486. My short make.conf:
12
13 CFLAGS="-Os -march=i486 -pipe -fomit-frame-pointer"
14 CHOST="i486-gentoo-linux-uclibc"
15 CXXFLAGS="${CFLAGS}"
16 FEATURES="-sandbox buildpkg"
17 UCLIBC_CPU="486"
18 USE="bitmap-fonts minimal truetype-fonts"
19
20 Trying to boostrap gcc fails with a segfault:
21
22 gengtype-yacc.c: In function `yydestruct':
23 gengtype-yacc.c:725: warning: traditional C rejects ISO C style function definitions
24 stage1/xgcc -Bstage1/ -B/usr/i486-gentoo-linux-uclibc/bin/ -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW -DUSE_UCLIBC -march=i486 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengtype \ gengtype.o gengtype-lex.o gengtype-yacc.o ../libiberty/libiberty.a
25 /usr/i486-gentoo-linux-uclibc/bin/ld: warning: creating a DT_TEXTREL in object.
26 ./gengtype
27 make[2]: *** [s-gtype] Segmentation fault
28 make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.5.20050130-r1/work/build/gcc'
29 make[1]: *** [stage2_build] Error 2
30 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.5.20050130-r1/work/build/gcc'
31 make: *** [bootstrap-lean] Error 2
32
33 I found that if I hack the Makefile to link all of those helper programs
34 in gcc-3.3.5.20050130-r1/work/build/gcc statically, they won't segfault
35 and even produce something that will compile. But then I get another
36 segfault when the resulting "xgcc" binary is run for the first time, so
37 there is probably a systematic problem.
38 Any ideas on what might be going wrong would be highly appreciated.
39
40 cheers!
41 Matthias
42
43 --
44 I prefer encrypted and signed messages. KeyID: 90CF8389
45 Fingerprint: 8E 1F 10 81 A4 66 29 46 B9 8A B9 E2 09 9F 3B 91