Re: [PATCH] tools/nolibc: add 64-bit parisc support

David Laight <[email protected]>
Newsgroups org.kernel.vger.linux-parisc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <20260824091958.7810094f@pumpkin>
On Thu, 20 Aug 2026 11:32:50 +0200
Thomas Weißschuh <[email protected]> wrote:

> Extend the existing parisc support to also handle 64-bit mode.
> 
> Some peculiarities:
> * The nonstandard ftruncate64 system call requires a workaround.
> * The linker defaults to main() as entry point, which needs to be
>   switched to _start() explicitly.
> * The linker defaults to dynamic linking, which needs to be disabled
>   explicitly.
> * With the default -Os, gcc does not use 64-bit multiplication
>   instructions, requiring libgcc. Use -O2 instead.
> * There is no qemu-user available.
> * CONFIG_COMPAT needs to be disabled to avoid build errors due to a
>   missing 32-bit vDSO compiler.
...
> diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/selftests/nolibc/run-tests.sh
> index 3da806e2b302..a50a47d9df2c 100755
> --- a/tools/testing/selftests/nolibc/run-tests.sh
> +++ b/tools/testing/selftests/nolibc/run-tests.sh
> @@ -29,7 +29,7 @@ all_archs=(
>  	sparc32 sparc64
>  	m68k
>  	sh4
> -	parisc32
> +	parisc32 parisc64
>  	alpha
>  	hexagon
>  )
> @@ -122,6 +122,7 @@ crosstool_arch() {
>  	sparc*) echo sparc64;;
>  	x32*) echo x86_64;;
>  	parisc32) echo hppa;;
> +	parisc64) echo hppa64;;
>  	*) echo "$1";;
>  	esac
>  }
> @@ -206,11 +207,11 @@ test_arch() {
>  			exit 1
>  	esac
>  	printf '%-15s' "$arch:"
> -	if [ "$arch" = "m68k" -o "$arch" = "sh4" -o "$arch" = "openrisc" -o "$arch" = "parisc32" -o "$arch" = "alpha" ] && [ "$llvm" = "1" ]; then
> +	if [ "$arch" = "m68k" -o "$arch" = "sh4" -o "$arch" = "openrisc" -o "$arch" = "parisc*" -o "$arch" = "alpha" ] && [ "$llvm" = "1" ]; then

Would it be better to put the llvm condition first?

>  		echo "Unsupported configuration"

"Unsupported compiler" ?

>  		return
>  	fi
> -	if [ "$arch" = "x32" ] && [ "$test_mode" = "user" ]; then
> +	if [ "$arch" = "x32" -o "$arch" = "parisc64" ] && [ "$test_mode" = "user" ]; then

Ditto.

David

>  		echo "Unsupported configuration"
>  		return
>  	fi
> 
> ---
> base-commit: 7f4233794df172ab1d286dc0fbd70da2cc837654
> change-id: 20260407-nolibc-parisc64-3ca0547c2af9
> 
> Best regards,
> --  
> Thomas Weißschuh <[email protected]>
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.