svn commit: r284898 - in head: . share/mk

Adrian Chadd adrian.chadd at gmail.com
Sun Jun 28 07:13:12 UTC 2015


On 27 June 2015 at 23:50, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>
>> On Jun 27, 2015, at 22:31, Adrian Chadd <adrian.chadd at gmail.com> wrote:
>>
>>> On 27 June 2015 at 20:37, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>>>
>>>> On Jun 27, 2015, at 16:28, Baptiste Daroussin <bapt at 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


More information about the svn-src-head mailing list