diff mbox series

[v2,4/6] package make: build RISC-V nommu builds as linux

Message ID 20200908113324.1022230-5-damien.lemoal@wdc.com
State Changes Requested
Headers show
Series Add support for Kendryte K210 RISC-V boards | expand

Commit Message

Damien Le Moal Sept. 8, 2020, 11:33 a.m. UTC
From: Christoph Hellwig <hch@lst.de>

Using *-uclinux-* seems like an only partially followed convention.
And at least for RISC-V gcc doesn't know about uclinux tuples, so
switch back to the normal Linux one for now.

Signed-off-by: Christoph Hellwig <hch@lst.de>

[Damien]
* Make the change conditional on BR2_riscv arch being "y".

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 package/Makefile.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Yann E. MORIN Sept. 8, 2020, 9:56 p.m. UTC | #1
On 2020-09-08 20:33 +0900, Damien Le Moal spake thusly:
> From: Christoph Hellwig <hch@lst.de>
> 
> Using *-uclinux-* seems like an only partially followed convention.
> And at least for RISC-V gcc doesn't know about uclinux tuples, so
> switch back to the normal Linux one for now.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> [Damien]
> * Make the change conditional on BR2_riscv arch being "y".
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>  package/Makefile.in | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 51f5cbce4f..28c470aea6 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -39,9 +39,14 @@ endif
>  # Compute GNU_TARGET_NAME
>  GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
>  
> -# FLAT binary format needs uclinux
> +# FLAT binary format needs uclinux, except RISC-V which needs
> +# the regular linux name.
>  ifeq ($(BR2_BINFMT_FLAT),y)
> +ifeq ($(BR2_riscv),y)
> +TARGET_OS = linux
> +else
>  TARGET_OS = uclinux
> +endif
>  else
>  TARGET_OS = linux
>  endif

I think I'd like a more compact solution:

    # FLAT binary format needs uclinux, except for riscv which needs the regular linux name.
    ifeq ($(BR2_riscv):$(BR2_BINFMT_FLAT),:y)
    TARGET_OS = uclinux
    else
    TARGET_OS = linux
    endif

No need to resend just for that.

Regards,
Yann E. MORIN.

> -- 
> 2.26.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/Makefile.in b/package/Makefile.in
index 51f5cbce4f..28c470aea6 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -39,9 +39,14 @@  endif
 # Compute GNU_TARGET_NAME
 GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
 
-# FLAT binary format needs uclinux
+# FLAT binary format needs uclinux, except RISC-V which needs
+# the regular linux name.
 ifeq ($(BR2_BINFMT_FLAT),y)
+ifeq ($(BR2_riscv),y)
+TARGET_OS = linux
+else
 TARGET_OS = uclinux
+endif
 else
 TARGET_OS = linux
 endif