https://github.com/torvalds/linux
Revision a99efa00891b66405ebd25e49868efc701fe1546 authored by Linus Torvalds on 29 December 2019, 18:01:27 UTC, committed by Linus Torvalds on 29 December 2019, 18:01:27 UTC
Pull RISC-V fixes from Paul Walmsley:
 "One important fix for RISC-V:

   - Redirect any incoming syscall with an ID less than -1 to
     sys_ni_syscall, rather than allowing them to fall through into the
     syscall handler.

  and two minor build fixes:

   - Export __asm_copy_{from,to}_user() from where they are defined.
     This fixes a build error triggered by some randconfigs.

   - Export flush_icache_all(). I'd resisted this before, since
     historically we didn't want modules to be able to flush the I$
     directly; but apparently everyone else is doing it now"

* tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: export flush_icache_all to modules
  riscv: reject invalid syscalls below -1
  riscv: fix compile failure with EXPORT_SYMBOL() & !MMU
2 parent s d756638 + 1833e32
Raw File
Tip revision: a99efa00891b66405ebd25e49868efc701fe1546 authored by Linus Torvalds on 29 December 2019, 18:01:27 UTC
Merge tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Tip revision: a99efa0
gcc-version.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# gcc-version gcc-command
#
# Print the gcc version of `gcc-command' in a 5 or 6-digit form
# such as `29503' for gcc-2.95.3, `30301' for gcc-3.3.1, etc.

compiler="$*"

if [ ${#compiler} -eq 0 ]; then
	echo "Error: No compiler specified." >&2
	printf "Usage:\n\t$0 <gcc-command>\n" >&2
	exit 1
fi

MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
back to top