MEN-Mikro-Elektronik / 13MD05-90

MDIS5 System Package for Linux (including drivers)
Other
4 stars 4 forks source link

Fix compilation after -isystem option removal on kernel #280

Closed mad-jsanjuan closed 1 year ago

mad-jsanjuan commented 1 year ago

The Linux kernel has removed the -isystem compiler option to avoid accidental inclusion of undesireable headers from version 5.16. This fixes the compilation error an uses the headers included in the kernel tree.

mad-jsanjuan commented 1 year ago

I just realized this will not completely fix https://github.com/MEN-Mikro-Elektronik/13MD05-90/issues/277 . The RHEL 9 distro comes with a patched 5.14 kernel but it seems to have this isystem stuff backported. So we may need to also include something like #ifdef RHEL_RELEASE_VERSION.

I'll put this to draft until we fix this for all scenarios.

dpfeuffer commented 1 year ago

I just realized this will not completely fix #277 . The RHEL 9 distro comes with a patched 5.14 kernel but it seems to have this isystem stuff backported. So we may need to also include something like #ifdef RHEL_RELEASE_VERSION.

I'll put this to draft until we fix this for all scenarios.

It is sufficient to support RHEL 9.1 kernel 5.15, but not necessarily all scenarios. However, if it's easy to support other RHEL variants, go for it ;-)

mad-jsanjuan commented 1 year ago

There is a 6.1 compilation error which is unrelated to what this Pull Request is addressing. Reported here: https://github.com/MEN-Mikro-Elektronik/13MD05-90/issues/281