On 27 June 2015 at 23:50, Garrett Cooper <yaneurab...@gmail.com> wrote: > >> On Jun 27, 2015, at 22:31, Adrian Chadd <adrian.ch...@gmail.com> wrote: >> >>> On 27 June 2015 at 20:37, Garrett Cooper <yaneurab...@gmail.com> wrote: >>> >>>> On Jun 27, 2015, at 16:28, Baptiste Daroussin <b...@freebsd.org> wrote: >>>> >>>> Author: bapt >>>> Date: Sat Jun 27 23:28:56 2015 >>>> New Revision: 284898 >>>> URL: https://svnweb.freebsd.org/changeset/base/284898 >>>> >>>> Log: >>>> Make all shared library a relative symlink >>>> >>>> This makes sysroot usable for cross building, it also removes the need for >>>> _SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no >>>> time >>>> to test it) >>>> >>>> Differential Revision: https://reviews.freebsd.org/D2920 >>>> Submitted by: imp, adrian >>>> Tested by: adrian >>> >>> Thank you!!! Now all you need to do is fix the ldscripts (lib/libc, etc) to >>> not have absolute paths. >> >> Yup! But it's baby steps. >> >> I'm looking at the netbsd gcc patches right now to see how they fixed >> up sysroot. It doesn't look like they fully fixed gcc sysroot >> behaviour. :( > > How is it broken?
ok, I figured out how to get it to work. It's not broken (this time!) The port cross gcc compiler(s) in freebsd are compiled with --without-includes, which removes /usr/include from the search path. So unless we specify it, it can't find anything in include paths. However, if you do -I/usr/include, it is an absolute path. The sysroot isn't applied to it. One must use -I=/usr/include - then the sysroot stuff gets appended correctly. So now I have dnsmasq and dropbear cross compiling successfully against a freebsd-head mips sysroot. Next up, lua and some tiny http server.. (And yes, we should also fix those linker scripts. :-) -adrian _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"