On Fri, Apr 28, 2023 at 8:23 AM Florian Weimer <fweimer(a)redhat.com> wrote:
Looking at
Information for RPM mingw64-zlib-1.2.13-2.fc38.noarch.rpm
<
https://koji.fedoraproject.org/koji/rpminfo?rpmID=33118048>
sysroot paths look like this:
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/zlib1.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/include/zconf.h
/usr/x86_64-w64-mingw32/sys-root/mingw/include/zlib.h
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libz.dll.a
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/zlib.pc
Is the /mingw/ part of the sysroot path, or is it within the sysroot?
Would I use --sysroot=/usr/x86_64-w64-mingw32/sys-root or
--sysroot=/usr/x86_64-w64-mingw32/sys-root/mingw to build against the
sysroot?
I assumed the latter, but now I wonder if /mingw in the sysroot is the
analogue of /usr in GNU/Linux sysroots.
Eventually, we want to produce some GNU/Linux sysroots. I picked
/usr/%{_arch}-redhat-linux/sys-root/fc%{fedora}
or (depending on the operating system)
/usr/%{_arch}-redhat-linux/sys-root/el%{rhel}
or (as the fallback)
/usr/%{_arch}-redhat-linux/sys-root/root
and we have /usr inside the sysroot, e.g. <stdio.h> is
/usr/x86_64-redhat-linux/sys-root/fc35/usr/include/stdio.h
in a Fedora 35 sysroot on x86-64 (although the Fedora 35 update with
this never actually went out). We essentially use the /mingw/ part as
an OS ABI version indicator, to make the different versions
co-installable.
I want to pick this up again and would like to solicit comments if that
OS ABI variant thing is the right approach, or if we should drop it.
Sysroot packages are by nature relocatable, and do not have to be
installed in /, so it's perhaps not a great loss if their version
variants are not co-installable.
We need something like this before we can drop i686 on ELN; it's only
way to enable -m32 in GCC in a sustainable fashion. But we don't need
OS ABI variants for that.
Years ago, when we originally started talking about multilib and
multiarch stuff on the list (I think in the context of both x86 and
ARM), the Exherbo developer brought up the idea of reworking the whole
operating system to sysroots[1].
I was actually in favor of this idea, and I prototyped a distribution
setup with it. The result of that was I found a few issues with how
RPM handles dependency generation for supporting such a setup. One of
the biggest ones is in how we generate the library dependencies, which
I attempted to fix a few years ago[2].
Unfortunately, it hasn't gone anywhere even though I'd still like to do it...
[1]:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.o...
[2]:
https://github.com/rpm-software-management/rpm/pull/1038
--
真実はいつも一つ!/ Always, there's only one truth!