tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libgcc not built?

I successfully followed the steps 1 to 8

I had to add a few missing parts and to fix some perl issues in gettext
but it worked pretty well!

But I'm stuck at step 9 because libc wants to link as a shared library
and my toolchain does not support shared libraries.

Can I just generate a static libc.a?

nbmake-milkymist dependall install MKGCC=no HAVE_GCC=45
dependall ===> csu
dependall ===> libc
#     build  libc/
rm -f
-nodefaultlibs -Wl,-x -shared -Wl,-soname,
-Wl,--warn-shared-textrel -Wl,-z,initfirst  
--sysroot=/home/fallen/dev/NetBSD/obj/destdir.milkymist  -o  -Wl,-rpath,/lib  -L=/lib  -Wl,--whole-archive
libc_pic.a  -Wl,--no-whole-archive -lgcc
-shared not supported
collect2: ld returned 1 exit status

*** Failed target:

Le 01/04/2019 à 21:28, matthew green a écrit :
>>>> Thanks for your answer :)
>>>> Is src/tools/gcc/README.mknative relevant for my cross compilation
>>>> toolchain?
>>>> Or only for a *native* (host=lm32 target=lm32) toolchain?
>>> you need libgcc from somewhere.  typically that comes from
>>> base netbsd, but for brand new ports with no in-tree help
>>> it may come from the $EXTERNAL_TOOLCHAIN.  for new ports
>>> using base gcc, we typically use libgcc built normally,
>>> but if you don't want a host compiler, MKGCCCMDS=no is
>>> supported (and default, on eg sun2.)
>>> which compiler are you using?
>> I am using the cross compiler built by ./ -m milkymist -u -U tools
>> It seems that when it builds the cross compiler, it does not build the 
>> libgcc.
>> How am I supposed to make the build system generate libgcc?
>> I use MKGCCCMDS=no when I run the "build" target (./ -m 
>> milkymist -u -U build).
>> Maybe I should use it also for the "tools" target?
> see src/tools/gcc/README.mknative.  to get libgcc you'll need
> to get this working at least minimally.  there is a special
> bootstrap for just libgcc itself that may still work, but it
> has been a while since a brand new platform was added.  the
> readme seems to have most useful details, but let me know if
> you aren't sure.
> you may want to set MKGCCCMDS=no always.  btw, this has no
> effect on the tools build.  it only affects whether the gcc
> commands (/usr/bin/gcc etc) are installed or not.
> .mrg.

Home | Main Index | Thread Index | Old Index