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@xxxxxxxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University