https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=172946

John Baldwin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #5 from John Baldwin <[email protected]> ---
We have never installed all of the headers.  /usr/include/machine is only for
the current architecture and the header files from other architectures have
never been installed.  There is no, and never has been, /usr/include/alpha on
any FreeBSD/i386 system for example.  /usr/include/x86 is a special case for
amd64 and i386 to allow those two arches to share headers so that `cc -m 32`
works.  The same for /usr/include/arm for armv7 and aarch64.

Currently, cross-compilation requires having a sysroot built for the
architecture which includes the MD headers in /usr/include/machine and the
architecture-specific libraries in /usr/lib.  We don't install armv7 libraries
as part of an amd64 world.  Instead, for cross-compilation an armv7 sysroot has
to be created either via 'make installworld' to a DESTDIR or extracting
base.txz, etc. and then using the --sysroot argument to cc and ld (and `set
sysroot` in gdb).

If we want to fix this properly, we just need to add
BSD.include.${MACHINE_ARCH}.dist files that contain architecture-specific
directories.  The existing entry for /usr/include/machine/pc should move into
the i386/amd64 file (and those two arches can probably just share a
BSD.include.x86.dist if we support an optional
BSD.include.${MACHINE_CPUARCH}.dist file).  We would only use the matching MD
tree files when creating directories and install the matching tree files in
/etc/mtree.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to