https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90330

--- Comment #26 from Matt Thompson <matthew.thompson at nasa dot gov> ---
(In reply to Iain Sandoe from comment #25)
> 
> > Thanks for the explanations. I'm trying a new build now with gcc-8.2.0 as
> > the compiler passed to configure. 
> > 
> > Here's a(nother dumb) question: let's assume everything works. How exactly
> > can one see what the sysroot is on a compiler? I.e., I could run "gcc-8.2.0
> > -xyz" and see it looks for /usr/include, but "gcc-9.2.0 -xyz" would show the
> > /Library/Developer...
> 
> gcc --print-sysroot
> 
> gcc --help will show you the things that the driver can print for you and
> point to other help lines that might be useful.

Ah. Should have figure that out myself. :shame:

> > 
> > Oh, yes. I was thinking of things we'll be building with this new GCC. I
> > just wish I could figure out the build-with-clang issue. It's like it's
> > missing some C++ library in its link line:
> 
> build with clang should (does for me) work :)

Lucky you. :) My laptop and gcc have some sort of shining thing going on. I
can't build gcc with Spack either. 

> 
> > Now, I do think it's a bit odd that 'main.o' is *after* 'libbackend.a' as I
> > usually put all my .o first then my .a when I build, but I think that's just
> > stylistic. 
> 
> Actually, one difference from the "usual linker" rules on Darwin is that
> ld64 will repeatedly re-visit presented libraries (in their presented order)
> to satisfy symbols.  There is no need for the dance of repeating .a files
> several times.

Huh. Good to know!

> 
> 
> > Plus the C++ is so dense I don't know what this is looking for:
> > 
> > std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)",
> > referenced from:
> >       ipa_icf::sem_item_optimizer::worklist_push(ipa_icf::congruence_class*)
> > in libbackend.a(ipa-icf.o)
> 
> TBH, neither do I from that snippet - but I do think that a correctly
> installed command line tools should just succeed with.
> 
> configure --prefix=/somewhere/nice
> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> 
> and use clang as the bootstrap compiler.
> 
> [as an aside, I do wonder where you are getting your GMP, MPFR, MPC and
> (optionally) ISL from ?] - for the record I usually build them in-tree and
> thus they are bootstrapped with the compiler.

I get those guys by running:

  ./contrib/download_prerequisites

when I first get the source. Maybe there's a better way? I think a recipe I
found long ago did that, so I've just done the same thing myself as it seemed
to work.

Reply via email to