Skip to contentSkip to conversation

sparc: allow sparc32 alias for archhelp

PATCH In review Randy Dunlap 2 participants 4 messages Apr 10, 2023 – Apr 11, 2023 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sparc: allow sparc32 alias for archhelp

Currently, entering

$ make ARCH=sparc32 help
prints the archhelp text for sparc64.

Since "sparc32" is documented (Documentation/kbuild/kbuild.rst) to be a recognized alias for 32-bit sparc, also support that string in sparc's archhelp by allowing either ARCH=sparc or ARCH=sparc32 for sparc32 archhelp.

Fixes 5e53879008b9 ("sparc,sparc64: unify Makefile")
Cc Sam Ravnborg <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Masahiro Yamada <[email protected]>

---
v2: rebase/resend; add Masahiro to Cc: list

 arch/sparc/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/Makefile +1 -1
diff -- a/arch/sparc/Makefile b/arch/sparc/Makefile
@@ -83,7 +83,7 @@ vdso_install:
 KBUILD_IMAGE := $(boot)/zImage
 
 # Don't use tabs in echo arguments.
-ifeq ($(ARCH),sparc)
+ifeq ($(ARCH),$(filter $(ARCH),sparc sparc32))
 define archhelp
   echo  '* image        - kernel image ($(boot)/image)'
   echo  '* zImage       - stripped kernel image ($(boot)/zImage)'
#1 lore raw
Quoted 28 lines · Randy Dunlap

Currently, entering

$ make ARCH=sparc32 help
prints the archhelp text for sparc64.

Since "sparc32" is documented (Documentation/kbuild/kbuild.rst) to be a recognized alias for 32-bit sparc, also support that string in sparc's archhelp by allowing either ARCH=sparc or ARCH=sparc32 for sparc32 archhelp.

Fixes 5e53879008b9 ("sparc,sparc64: unify Makefile")
Cc Sam Ravnborg <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Masahiro Yamada <[email protected]>

---
v2: rebase/resend; add Masahiro to Cc: list

 arch/sparc/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/arch/sparc/Makefile b/arch/sparc/Makefile

arch/sparc/Makefile vdso_install: · line 86

Quoted 5 lines
arch/sparc/Makefile +1 -1
@@ -83,7 +83,7 @@ vdso_install:
 KBUILD_IMAGE := $(boot)/zImage
 
 # Don't use tabs in echo arguments.
-ifeq ($(ARCH),sparc)
+ifeq ($(ARCH),$(filter $(ARCH),sparc sparc32))

ifneq ($(ARCH),sparc64)

is simpler.

Quoted 3 lines
arch/sparc/Makefile +0 -0
 define archhelp
   echo  '* image        - kernel image ($(boot)/image)'
   echo  '* zImage       - stripped kernel image ($(boot)/zImage)'
Signature · 2 lines
Best Regards
Masahiro Yamada
#2 lore raw
In reply to Randy Dunlap
Quoted 28 lines · Randy Dunlap

Currently, entering

$ make ARCH=sparc32 help
prints the archhelp text for sparc64.

Since "sparc32" is documented (Documentation/kbuild/kbuild.rst) to be a recognized alias for 32-bit sparc, also support that string in sparc's archhelp by allowing either ARCH=sparc or ARCH=sparc32 for sparc32 archhelp.

Fixes 5e53879008b9 ("sparc,sparc64: unify Makefile")
Cc Sam Ravnborg <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Masahiro Yamada <[email protected]>

---
v2: rebase/resend; add Masahiro to Cc: list

 arch/sparc/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/arch/sparc/Makefile b/arch/sparc/Makefile

arch/sparc/Makefile vdso_install: · line 88

Quoted 7 lines
arch/sparc/Makefile +1 -1
@@ -83,7 +83,7 @@ vdso_install:
 KBUILD_IMAGE := $(boot)/zImage
 
 # Don't use tabs in echo arguments.
-ifeq ($(ARCH),sparc)
+ifeq ($(ARCH),$(filter $(ARCH),sparc sparc32))
 define archhelp
   echo  '* image        - kernel image ($(boot)/image)'

BTW, this is strange.

The asterisk means it is built by 'all'.

But, I only see the following in this Makefile.

# Default target
all: zImage

Seeing arch/sparc/boot/Makefile,
it is true $(boot)/image is generated as a side-effect of zImage, but it it true for both 32-bit and 64-bit.

I think it is even better to rewrite archhelp to unify the 32/64 bits.

Quoted 1 line
arch/sparc/Makefile +0 -0
   echo  '* zImage       - stripped kernel image ($(boot)/zImage)'
Signature · 2 lines
Best Regards
Masahiro Yamada
#3 lore raw
Quoted 54 lines · Masahiro Yamada
Quoted 28 lines · Randy Dunlap

Currently, entering

$ make ARCH=sparc32 help
prints the archhelp text for sparc64.

Since "sparc32" is documented (Documentation/kbuild/kbuild.rst) to be a recognized alias for 32-bit sparc, also support that string in sparc's archhelp by allowing either ARCH=sparc or ARCH=sparc32 for sparc32 archhelp.

Fixes 5e53879008b9 ("sparc,sparc64: unify Makefile")
Cc Sam Ravnborg <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Masahiro Yamada <[email protected]>

---
v2: rebase/resend; add Masahiro to Cc: list

 arch/sparc/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/arch/sparc/Makefile b/arch/sparc/Makefile

arch/sparc/Makefile vdso_install: · line 88

Quoted 7 lines
arch/sparc/Makefile +1 -1
@@ -83,7 +83,7 @@ vdso_install:
 KBUILD_IMAGE := $(boot)/zImage
 
 # Don't use tabs in echo arguments.
-ifeq ($(ARCH),sparc)
+ifeq ($(ARCH),$(filter $(ARCH),sparc sparc32))
 define archhelp
   echo  '* image        - kernel image ($(boot)/image)'

BTW, this is strange.

The asterisk means it is built by 'all'.

But, I only see the following in this Makefile.

# Default target
all: zImage

Quoted 8 lines

Seeing arch/sparc/boot/Makefile,
it is true $(boot)/image is generated as a side-effect of zImage, but it it true for both 32-bit and 64-bit.

I think it is even better to rewrite archhelp to unify the 32/64 bits.

Yeah, I had thought of that also. I'll do that and resend it.

Thanks.

Quoted 8 lines
Quoted 5 lines
arch/sparc/Makefile +0 -0
   echo  '* zImage       - stripped kernel image ($(boot)/zImage)'
Signature · 1 line
~Randy