public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@mengyan1223.wang>
To: Da Shi Cao <dscao999@hotmail.com>,
	"gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: architecture dependent directory of C header
Date: Mon, 28 Mar 2022 18:29:06 +0800	[thread overview]
Message-ID: <a3da985771cb5df2b51adb07a5e22cc526242c0b.camel@mengyan1223.wang> (raw)
In-Reply-To: <SN4PR22MB32228C5C95CD42D02361529D8C1C9@SN4PR22MB3222.namprd22.prod.outlook.com>

On Sun, 2022-03-27 at 15:14 +0000, Da Shi Cao wrote:
> Hi Ruoyao,
> 
> I'm trying to build a cross gcc on X86_64, with target armhf. The
> cross gcc will have /usr/include/arm-linux-gnueabihf, which is already
> populated, as its header search directory if the gcc is configured
> with:
> --enable-multiarch --with-arch=armv7-a --with-fpu=neon-vfpv4 --with-
> float=hard
> 
> But to build a gcc with target aarch64, only --with-arch=armv8-a is
> used in the configuration and /usr/include/aarch64-linux-gnueabi will
> be among the header search directories of the resulting gcc. I'll do
> this build again to confirm it.
> 
Yes this is the expected behavior.

Note that the "multiarch" directory is normally not used for a cross
compiler.  If your cross compiler relies on something in /usr/include,
it looks like you are doing something wrong.  Generally a sysroot is
used by a cross compiler to find target headers and libraries.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

      reply	other threads:[~2022-03-28 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26 12:37 Da Shi Cao
2022-03-26 14:50 ` Xi Ruoyao
2022-03-26 23:53   ` Da Shi Cao
2022-03-27  9:37     ` Xi Ruoyao
2022-03-27 15:14       ` Da Shi Cao
2022-03-28 10:29         ` Xi Ruoyao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3da985771cb5df2b51adb07a5e22cc526242c0b.camel@mengyan1223.wang \
    --to=xry111@mengyan1223.wang \
    --cc=dscao999@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).