tech-toolchain archive

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

Re: libgcc not built?

I was able to "complete" step 9 by doing:

nbmake-milkymist libc/obj/libc.a install MKGCC=no HAVE_GCC=45

I specified "libc/obj/libc.a" target instead of "dependall".

Then, for the next step I had to patch the lua/Makefile to add an " &&
${MKSHARED} != no" so that it does not try to build

But then all went fine.

I'm still stuck at step 10 though, config.log says it cannot find "libgcc".

So it seems I still don't have libgcc.


Le 01/04/2019 à 23:33, Yann Sionneau a écrit :
> 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
> /home/fallen/dev/NetBSD/obj/tooldir.Linux-4.18.0-16-generic-x86_64/bin/lm32--netbsd-gcc
> -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
> /home/fallen/dev/NetBSD/obj/tooldir.Linux-4.18.0-16-generic-x86_64/lib/gcc/lm32--netbsd/4.5.4/../../../../lm32--netbsd/bin/ld:
> -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