mbox series

[0/2] Fix allmodconfig build with bare-metal toolchain

Message ID 20180828142421.15335-1-semen.protsenko@linaro.org
Headers show
Series Fix allmodconfig build with bare-metal toolchain | expand

Message

Sam Protsenko Aug. 28, 2018, 2:24 p.m. UTC
Attempt to build allmodconfig (for ARM platforms) using bare-metal
toolchain fails with errors related to __linux__ definition. It's only
defined on Linux toolchains, but not defined on bare-metal toolchains.
This patch series fixes that.

Some similar patches (for different files) were applied previously:
  - commit 4c82456eeb4d ("fuse: fix type definitions in uapi header")
  - commit b6330548383c ("drm.h: Fix DRM compilation with bare-metal
toolchain.")

Sam Protsenko (2):
  codafs: Fix build using bare-metal toolchain
  scsi: aic7xxx: Fix build using bare-metal toolchain

 drivers/scsi/aic7xxx/aic7770.c                  |  2 +-
 drivers/scsi/aic7xxx/aic79xx.h                  |  4 ++--
 drivers/scsi/aic7xxx/aic79xx_core.c             | 12 ++++++------
 drivers/scsi/aic7xxx/aic79xx_pci.c              |  2 +-
 drivers/scsi/aic7xxx/aic7xxx.h                  |  4 ++--
 drivers/scsi/aic7xxx/aic7xxx_93cx6.c            |  2 +-
 drivers/scsi/aic7xxx/aic7xxx_core.c             | 12 ++++++------
 drivers/scsi/aic7xxx/aic7xxx_pci.c              |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm.h            |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y       |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_scan.l       |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c     |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h     |  2 +-
 include/uapi/linux/coda.h                       |  5 +++++
 16 files changed, 32 insertions(+), 27 deletions(-)

-- 
2.18.0

Comments

Andy Shevchenko Aug. 28, 2018, 5:03 p.m. UTC | #1
On Tue, Aug 28, 2018 at 5:24 PM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>

> The kernel is self-contained project and can be built with bare-metal

> toolchain. But bare-metal toolchain doesn't define u_quad_t type.

> Because of this codafs build fails when building with bare-metal

> toolchain. This patch fixes it by defining u_quad_t type in case when

> non-Linux toolchain is used.


>  #endif /* !KERNEL */


I'm wondering what the heck KERNEL is doing in UAPI header.
Looks like this header is split wrongly in the first place.

> +#if defined(__KERNEL__) && !defined(__linux__) && !defined(_UQUAD_T_) && \


P.S. Actually it's the only header which uses KERNEL in UAPI.
Definitely it should be fixed first.

--
With Best Regards,
Andy Shevchenko
Andy Shevchenko Aug. 28, 2018, 5:07 p.m. UTC | #2
On Tue, Aug 28, 2018 at 8:03 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:

> P.S. Actually it's the only header which uses KERNEL in UAPI.

> Definitely it should be fixed first.


Okay, it seems I missed __ parts. So, my statement above is wrong.

-- 
With Best Regards,
Andy Shevchenko