From owner-svn-ports-all@freebsd.org Sat Mar 24 06:35:25 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2AB7F4AE6B; Sat, 24 Mar 2018 06:35:25 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (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 628CC7BF27; Sat, 24 Mar 2018 06:35:25 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-it0-x243.google.com with SMTP id 19-v6so5111996itw.3; Fri, 23 Mar 2018 23:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=LNy+sSOnO+b0H91QptBKVxktbL6X7q6JSRllp1tcs1w=; b=tpJP15ejODCWPy4asCX/g7OdIfu3y7qHtzeAr22IXsPZ9SIDyTpp/h28/QlVl1BugL k2MBjf6PvqtbTJsutKalXG1ejsc+NFAYW11/lBuj2ZvsFfJ6uxFqDfXp4tOXiFtEnbTF bQIf+lnb/YDwk4s7Y693ohT/kBDWi3sSpDKHGMtDuKPXDL9blJr6CEqiDezMzT2+Jjw0 LAP/ywQ3RsvLTQIKHK/Z8o5FoP1UWrZHYXcmTfvRsgih5nB2hjBXQm2hzYESMJgXnkhQ G2tn7cowTIaCoek8xHYVL37euGfhlsSKceXEnDxjHbFjkRgDA8wFlAf4R6Fqikm0XX0G dNzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=LNy+sSOnO+b0H91QptBKVxktbL6X7q6JSRllp1tcs1w=; b=Ihu2qLhjOX93Z6R5wc5L4Nt90A+Tx1Uu0DtuPUfdMh3U0CvVgfF/Su9pvsn/oHr8AK cDjRoNWjauP9vDni9tuqclrJy7mahr2aenlTejA1Y5Ve8yhrLirQusB9HVvs4Kh48JFq Y7RnQZNEQFIJl2JEF7H5BU1ydXKVCzDEC7h69ZBxfaJXBu1ALPBXhrk6mRraSivLFRwu lntIB1i8A4APqY1NtT4K58k4hbnZSYi17d6eNlJjEWyU4bMvwqt/TmECUpIUHngL4BUQ 3eNbCb/p7P1sTV0IGpLaFKlBd1sh6DUqGbbzRGBOUsLE6+0Uosh6JUb3pPRHc29qsUtv cmKg== X-Gm-Message-State: AElRT7GlEiy/vWJujli/dwJ4/Aoq3ck+YWiQYKZnLrFyvxpKQOR817Sr y/Jau3LtdbJvf4PLGp+reTQdaPnzxFclKMPUpFHY5A== X-Google-Smtp-Source: AIpwx49APcGXGtuEcQ1va1M/J8t9G+7vBOT3ePPgs0bnUwZClTY50/X4t4y1alX+rc1RSVhVgH1vOiGTPH4i2mEKNq4= X-Received: by 2002:a24:69ca:: with SMTP id e193-v6mr533949itc.62.1521873324543; Fri, 23 Mar 2018 23:35:24 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.184.135 with HTTP; Fri, 23 Mar 2018 23:35:24 -0700 (PDT) In-Reply-To: <201803232353.w2NNrqnJ028176@repo.freebsd.org> References: <201803232353.w2NNrqnJ028176@repo.freebsd.org> From: Antoine Brodin Date: Sat, 24 Mar 2018 07:35:24 +0100 X-Google-Sender-Auth: FjxiMP6qiISrrM0YqSB7WwtUDr4 Message-ID: Subject: Re: svn commit: r465416 - in head/devel: aarch64-gcc amd64-gcc mips-gcc mips64-gcc powerpc64-gcc sparc64-gcc To: John Baldwin Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 06:35:26 -0000 On Sat, Mar 24, 2018 at 12:53 AM, John Baldwin wrote: > Author: jhb (src,doc committer) > Date: Fri Mar 23 23:53:52 2018 > New Revision: 465416 > URL: https://svnweb.freebsd.org/changeset/ports/465416 > > Log: > Fix --sysroot for cross-toolchain GCC packages > > By default, GCC assumes that a cross compiler should not have any valid > initial include or library paths aside from /usr/local/lib/gcc//. > This means that one cannot use --sysroot to point to a system root for > another architecture and have GCC automatically look for headers in > ${sysroot}/usr/include, etc. Currently we workaround this in FreeBSD's > build system with explicit -isystem, -B, and -L directives. However, > this is cumbersome compared to clang (where a bare --sysroot DTRT) > especially when using the compiler to build other software (such as test > programs, etc.). > > One can override GCC's assumption and force it to assume that it should > honor --sysroot by setting the '--with-sysroot' option to force GCC to > assume a specific system root. By setting this to '/', this means that > the cross-compiler will attempt to use the host's headers by default > if --sysroot is not specified, but if --sysroot is specified then > it is fully honored including for include paths and library paths. With > this change I can now cross-compile both C and C++ binaries simply by > using --sysroot without the need for -isystem, -B, or -L directives. Note > that the base/gcc and devel/riscv64-gcc ports both use --with-sysroot='/' > already. > > By default, GCC looks for headers in /usr/local/include (under the > sysroot) before /usr/include. To disable this and only look for headers > in /usr/include, patch gcc/Makefile.in to not define LOCAL_INCLUDE_DIR. > > Once -nostdinc is no longer required, the headers installed along with the > compiler are now used for compiling worlds and test programs. The "fixed" > headers in include-fixed are generally not helpful and are also derived > from the host's headers which might not match the target --sysroot, so > just delete them entirely. Even the stub limits.h headers GCC ships when > using an empty build sysroot are not helpful and need to be removed. > > On a related note, I also fixed the name of the C++ include directory > option to configure. By my reading it is 'with-gxx-include-dir' rather > than 'with-gcc-include-dir'. > > Reviewed by: bapt, brooks, kan > Sponsored by: DARPA / AFRL > Differential Revision: https://reviews.freebsd.org/D14627 > > Modified: > head/devel/aarch64-gcc/pkg-plist > head/devel/amd64-gcc/pkg-plist > head/devel/mips-gcc/pkg-plist > head/devel/mips64-gcc/pkg-plist > head/devel/powerpc64-gcc/Makefile > head/devel/powerpc64-gcc/pkg-plist > head/devel/sparc64-gcc/pkg-plist Hi, It seems some ports were missed, like devel/aarch64-none-elf-gcc and devel/arm-none-eabi-gcc Antoine