Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2015 00:13:11 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        Garrett Cooper <yaneurabeya@gmail.com>
Cc:        Baptiste Daroussin <bapt@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r284898 - in head: . share/mk
Message-ID:  <CAJ-Vmo=7OhvroDFdaM-0aYz-CRVj_o6LMVx8Rg_C5gzvuhy02g@mail.gmail.com>
In-Reply-To: <FDBB2B3E-B86A-4324-8E0B-C9D81D9F733B@gmail.com>
References:  <201506272328.t5RNSvQS063168@svn.freebsd.org> <260A448A-7195-49E6-8CCD-9F0753B61A18@gmail.com> <CAJ-Vmo=0Ewo4Gmh5PPL_rJ7fT7RxvQQ3ebO6wpHKfW_iyDw-fA@mail.gmail.com> <FDBB2B3E-B86A-4324-8E0B-C9D81D9F733B@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27 June 2015 at 23:50, Garrett Cooper <yaneurabeya@gmail.com> wrote:
>
>> On Jun 27, 2015, at 22:31, Adrian Chadd <adrian.chadd@gmail.com> wrote:
>>
>>> On 27 June 2015 at 20:37, Garrett Cooper <yaneurabeya@gmail.com> wrote:
>>>
>>>> On Jun 27, 2015, at 16:28, Baptiste Daroussin <bapt@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=7OhvroDFdaM-0aYz-CRVj_o6LMVx8Rg_C5gzvuhy02g>