All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] building a glibc-based tool chain
@ 2000-04-06 18:05 Paul Bame
  2000-04-09  6:06 ` Bdale Garbee
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Bame @ 2000-04-06 18:05 UTC (permalink / raw)
  To: parisc-linux


Well it still doesn't work, but here are some UGLY HACKS I use to
get a tool chain built using our glibc, which only works on x86 I think.
There are many many failure modes which these steps avoid, or so I hope.
Lots of this is probably my misunderstanding of the glibc/gcc relationship.

First grab binutils and build it as usual.  I used

    .../binutils/configure --target=hppa1.1-linux --disable-nls \
	--prefix=/opt/palinux
    make
    make install

DO NOT allow the default --prefix to be used or you'll be SCREWED later
when you try to build gcc.

Fix your $PATH before going further:

    PATH=/opt/palinux/bin:$PATH

Now the nasty one.  Grab glibc and configure it:
    !! DO NOT allow the default --prefix to be used or you'll be SCREWED
    !! later when you try to build gcc.  If by chance you do an install
    !! into /usr/local you'll have to remove those files before gcc will
    !! build.

    .../glibc/configure --target=hppa1.1-linux --disable-nls \
	--prefix=/opt/palinux --disable-shared --disable-sanity-checks
    make

This will fail with undefined references.  Do:
    ls > nss/makedb
    make

This should complete.  This is pretty creepy but...

    for n in *
    do
	touch $n/stubs
    done

    make install

This will fail, but gets far enough to be useful.

Now in the top-level makefile in the real glibc source tree, remove
the dependency like this diff shows (otherwise the manual/ subdir build
will prevent success).

    diff -r1.1 Makefile
    142c142
    < $(inst_includedir)/gnu/stubs.h: subdir_install
    ---
    > $(inst_includedir)/gnu/stubs.h: 

Then:

    make /your/install/directory/include/gnu/stubs.h

Now remove the #ifdef __USE_UNIX98 and the matching #endif  /* Unix98 */
from /your/install/directory/include/unistd.h around line 238

Time for gcc

    .../gcc/configure --target=hppa1.1-linux --disable-nls --prefix=/opt/palinux

    make
    make install

For some unknown reason, this new hppa1.1-linux-gcc doesn't look in
/opt/palinux/include for headers, thus a quick hack:

    mv /opt/palinux/lib/gcc*/*/*/include/* /opt/palinux/include
    rmdir /opt/palinux/lib/gcc*/*/*/include/
    ln -s /opt/palinux/include /opt/palinux/lib/gcc*/*/*/include/

It might be better to use a different --prefix when configuring glibc
so as to have these header files installed where gcc expects to find them.

At this point I was able to compile but not link.  For some reason gcc
doesn't look in /opt/paliux/lib for crt1.o and friends.  When I
added crt0.o and libc by hand, the link failed with a meaningless error.

	-P

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-04-14 22:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-06 18:05 [parisc-linux] building a glibc-based tool chain Paul Bame
2000-04-09  6:06 ` Bdale Garbee
2000-04-09  7:27   ` Bdale Garbee
2000-04-09 16:17     ` David Huggins-Daines
2000-04-09 16:56       ` Bdale Garbee
2000-04-11 15:50       ` Paul Bame
2000-04-13 23:38         ` Paul Bame
2000-04-14 21:48           ` David Huggins-Daines

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.