From owner-svn-src-all@freebsd.org Sun Jun 28 07:13:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A0B998FF2B; Sun, 28 Jun 2015 07:13:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5503F1266; Sun, 28 Jun 2015 07:13:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igrv9 with SMTP id v9so23659606igr.1; Sun, 28 Jun 2015 00:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vWiu+eXNcDGK1A0MvKFkj3EkatIoF0QrnNbgFqjXXT4=; b=g2lltKFzQjoCs0Xu2JDgVgO1XuaWDkcXdJT2p6IkZbFoVFYSPXvE52wK70wObLNdwv CtWgtyme72P//xurwZf0rz3nTNMwHktfIwGZZ66HQOh4wKEiPzA56MSud8B6kmOFp0W0 zwyAIXkun3Rf409S/sZo+uzrAVXUCJdugM57B92npIWKVFH7gm7YeqUmSNM4xn5UGkbA 1nkCRNyLodp2wRuN5VIzOuwZOT9iASPiNmL9qqm4GLOCxrr2hSGnPhVwIckiYIGqmgfG JBAKTTWNQFqm/rLEOwhGSQ0+gVSOlWRYS3JvLoD7rthF3coUdZnjj1WWwJRWzBox/tTl U8qQ== MIME-Version: 1.0 X-Received: by 10.107.11.169 with SMTP id 41mr12845019iol.8.1435475591738; Sun, 28 Jun 2015 00:13:11 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Sun, 28 Jun 2015 00:13:11 -0700 (PDT) In-Reply-To: References: <201506272328.t5RNSvQS063168@svn.freebsd.org> <260A448A-7195-49E6-8CCD-9F0753B61A18@gmail.com> Date: Sun, 28 Jun 2015 00:13:11 -0700 Message-ID: Subject: Re: svn commit: r284898 - in head: . share/mk From: Adrian Chadd To: Garrett Cooper Cc: Baptiste Daroussin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 07:13:12 -0000 On 27 June 2015 at 23:50, Garrett Cooper wrote: > >> On Jun 27, 2015, at 22:31, Adrian Chadd wrote: >> >>> On 27 June 2015 at 20:37, Garrett Cooper wrote: >>> >>>> On Jun 27, 2015, at 16:28, Baptiste Daroussin 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