Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Mar 2025 17:09:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 172946] x86 missing in src/etc/mtree/BSD.include.dist
Message-ID:  <bug-172946-227-JnS3htjYYr@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-172946-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-172946-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D172946

John Baldwin <jhb@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jhb@FreeBSD.org

--- Comment #5 from John Baldwin <jhb@FreeBSD.org> ---
We have never installed all of the headers.  /usr/include/machine is only f=
or
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 librar=
ies
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 in=
to
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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-172946-227-JnS3htjYYr>