Re: recursive configure
Andrew Pinski <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CA+=Sn1kEJ2BiM-6vxT5Veo5CibH8-aFKv1p3vxBNjpkEDHj9Jg@mail.gmail.com> |
On Wed, Nov 20, 2024 at 12:02 AM Jack Andrews <[email protected]> wrote: > > Hi newlib, I hope you're well. Thanks for the great lib. > > I'm porting newlib to BareMetal OS. I'm trying to understand the build > process. When I remove libgloss/Makefile.in, I can still configure > newlib - why? Shouldn't configure be recursive? I've tried configuring > libgloss separately but that fails. This is partly because newlib toplevel shares the same toplevel configure as GCC/binutils/gdb. So subdirectories can either be a target library/program or a host (or even a build) library/program too. So the toplevel configure only configures the toplevel makefile and then when invoking make, it will do the configures then. Also not all targets use libgloss but still will use newlib. So there is no reason to configure in the libgloss subdirectory for those cases. Oh and you can do a combined build with GCC and binutils/gdb with newlib and get a full set of multilibs even installed in the correct location. For you OS, if you don't need libgloss, you can edit the toplevel configure.ac (and regenerated configure) to disable it for that target. See around `# Disable newlib and libgloss for various target OSes.`. Hope this helps. Thanks, Andrew > > Here's what I did in a script: > > $ uname -sp > Linux x86_64 > $ cat mail.sh > ver="4.4.0.20231231" > pkg=newlib-$ver > tar=$pkg.tar.gz > > if [ ! -e $tar ]; then wget ftp://sourceware.org/pub/newlib/$tar; fi > tar xf $tar > > rm -rf build; mkdir build; cd build > if ../$pkg/configure >/dev/null; then echo configure works; fi > if ../$pkg/libgloss/configure >/dev/null; then echo configure libgloss works; fi > rm ../$pkg/libgloss/Makefile.in > if ../$pkg/configure >/dev/null; then echo why does configure > still work?; fi > > cd .. > $ bash mail.sh > configure works > configure: error: cannot run /bin/bash ../config.sub > why does configure still work? > $ > > thanks in advance, > jack