Re: [coreboot] inteltool and sys/io.h
On Wed, Feb 14, 2018 at 11:11:46AM -0700, Trammell Hudson wrote: > When cross compiling inteltool with musl-libc the header > is not included due to this test in inteltool.h: > > #if defined(__GLIBC__) > #include > #endif Same story on other platforms: sys/io.h[1] is implemented through i386_iopl(2)[2]/amd64_iopl(2)[3] and sysarch(2)[4] on OpenBSD. Many tools under util/ are developed with Linux/glibc in mind (only). > Unfortunately I'm not sure what the right test is here, since > the musl libc team is opposed to having a __MUSL__ define: > > http://openwall.com/lists/musl/2013/03/29/13 1: http://man7.org/linux/man-pages/man2/iopl.2.html 2: http://man.openbsd.org/OpenBSD-6.0/./man2/sysarch.2 3: http://man.openbsd.org/OpenBSD-6.0/./man2/i386/i386_iopl.2 4: http://man.openbsd.org/OpenBSD-6.0/./man2/amd64/amd64_iopl.2 -- coreboot mailing list: coreboot@coreboot.org https://mail.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] inteltool and sys/io.h
On Wed, Feb 14, 2018 at 11:11:46AM -0700, Trammell Hudson wrote: > When cross compiling inteltool with musl-libc the header > is not included due to this test in inteltool.h: > > #if defined(__GLIBC__) > #include > #endif We should provide our own I/O space inlines. ISTR we do for nvramtool, superiotool, and flashrom. For instance, NetBSD libc will not expose these inlines to userland. This is to say nothing of the NetBSD x86 I/O space write inlines having reversed argument order compared to their glibc counterparts. Jonathan Kollasch -- coreboot mailing list: coreboot@coreboot.org https://mail.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] inteltool and sys/io.h
why on earth is that test there? what does glibc have to do with whether you have sys/io.h? I suggest removing the guard. On Wed, Feb 14, 2018 at 10:12 AM Trammell Hudson wrote: > When cross compiling inteltool with musl-libc the header > is not included due to this test in inteltool.h: > > #if defined(__GLIBC__) > #include > #endif > > Unfortunately I'm not sure what the right test is here, since > the musl libc team is opposed to having a __MUSL__ define: > > http://openwall.com/lists/musl/2013/03/29/13 > > -- > Trammell > > -- > coreboot mailing list: coreboot@coreboot.org > https://mail.coreboot.org/mailman/listinfo/coreboot > -- coreboot mailing list: coreboot@coreboot.org https://mail.coreboot.org/mailman/listinfo/coreboot
[coreboot] inteltool and sys/io.h
When cross compiling inteltool with musl-libc the header is not included due to this test in inteltool.h: #if defined(__GLIBC__) #include #endif Unfortunately I'm not sure what the right test is here, since the musl libc team is opposed to having a __MUSL__ define: http://openwall.com/lists/musl/2013/03/29/13 -- Trammell -- coreboot mailing list: coreboot@coreboot.org https://mail.coreboot.org/mailman/listinfo/coreboot