Skip to content

Commit

Permalink
Merge pull request #930 from riscv/upstream_diffs
Browse files Browse the repository at this point in the history
Copy tool files from upstream.
  • Loading branch information
timsifive committed Oct 5, 2023
2 parents 2f17147 + 477f702 commit 833be46
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 80 deletions.
124 changes: 55 additions & 69 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,78 +28,64 @@ env:
- CC=clang-9

language: c
dist: trusty

matrix:
include:
- os: linux
env:
- BUILD=x86_64-linux-gnu
- EXECUTABLE=openocd
addons:
apt:
packages:
- patchutils
compiler: gcc
git:
depth: 1
autocrlf: input

- os: linux
env:
- BUILD=i686-linux-gnu
- CFLAGS=-m32
- EXECUTABLE=openocd
addons:
apt:
packages:
- gcc-multilib patchutils
compiler: gcc
script:
- $mingw64 ${CC} --version
- $mingw64 env
- $mingw64 ./bootstrap
- $mingw64 ./configure
- $mingw64 make

- os: linux
env:
- BUILD=x86_64-linux-gnu
- EXECUTABLE=openocd
addons:
apt:
packages:
- patchutils
compiler: clang
before_install:
- |-
case $TRAVIS_OS_NAME in
linux)
sudo apt install ${CC} libusb-1.0-0-dev
;;
osx)
brew install libtool automake libusb libusb-compat hidapi libftdi
;;
windows)
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
choco uninstall -y mingw
choco upgrade --no-progress -y msys2
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
export mingw64="$msys2 -mingw64 -full-path -here -c \$\* --"
export msys2+=" -msys2 -c \$\* --"
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain autoconf autoconf-archive automake automake-wrapper binutils gcc gettext git libtool m4 make pkg-config tcl texinfo mingw-w64-x86_64-libusb mingw-w64-x86_64-libusb-compat-git mingw-w64-x86_64-libjaylink-git mingw-w64-x86_64-libftdi mingw-w64-x86_64-hidapi mingw-w64-x86_64-clang
## FIXME: Also build for i686?
## Install more MSYS2 packages from https://packages.msys2.org/base here
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
export PATH=/C/tools/msys64/mingw64/bin:$PATH
export MAKE=mingw32-make # so that Autotools can find it
;;
esac
- os: linux
env:
- BUILD=i686-linux-gnu
- CFLAGS=-m32
- CONFIGURE_ARGS="--disable-target64"
- EXECUTABLE=openocd
compiler: clang
addons:
apt:
packages:
- gcc-multilib patchutils
before_cache:
- |-
case $TRAVIS_OS_NAME in
windows)
# https://unix.stackexchange.com/a/137322/107554
$msys2 pacman --sync --clean --noconfirm
;;
esac
- os: linux
env:
- BUILD=i686-w64-mingw
- CONFIGURE_ARGS="--build=i686-unknown-linux-gnu --host=i686-w64-mingw32"
- EXECUTABLE=openocd.exe
compiler: i686-w64-mingw32-gcc
addons:
apt:
packages:
- binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 patchutils
cache:
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64

script:
# This is here for the signoff check.
# Disabled because when travis does the integration build the last change
# is an automated change, which won't have the Signed-off-by line.
#- ./tools/checkpatch.sh

# Ideally we'd diff back to where we either branched off OpenOCD or master,
# or riscv. But that's tricky, and the default git clone only gets the last
# 50 changes any case. Most merges won't consist of more than 40 changes,
# so this should work fine most of the time, and be a lot better than not
# checking at all.
- git diff -U20 HEAD~40 |
filterdiff -x "a/src/jtag/drivers/libjaylink/*" -x "a/tools/git2cl/*"
-x "b/src/gnulib/*" |
./tools/scripts/checkpatch.pl --no-signoff -
- ./bootstrap && ./configure --enable-remote-bitbang --enable-jtag_vpi $CONFIGURE_ARGS && make
- file src/$EXECUTABLE
matrix:
include:
- os: osx
env:
- CC=clang
- os: windows
env:
- CC=gcc
21 changes: 10 additions & 11 deletions tools/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3562,17 +3562,16 @@ sub process {
}

# Check for FSF mailing addresses.
# Don't care in this branch. This always messes up when we merge changes down.
#if ($rawline =~ /\bwrite to the Free/i ||
# $rawline =~ /\b675\s+Mass\s+Ave/i ||
# $rawline =~ /\b59\s+Temple\s+Pl/i ||
# $rawline =~ /\b51\s+Franklin\s+St/i) {
# my $herevet = "$here\n" . cat_vet($rawline) . "\n";
# my $msg_level = \&ERROR;
# $msg_level = \&CHK if ($file);
# &{$msg_level}("FSF_MAILING_ADDRESS",
# "Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. OpenOCD already includes a copy of the GPL.\n" . $herevet)
#}
if ($rawline =~ /\bwrite to the Free/i ||
$rawline =~ /\b675\s+Mass\s+Ave/i ||
$rawline =~ /\b59\s+Temple\s+Pl/i ||
$rawline =~ /\b51\s+Franklin\s+St/i) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
my $msg_level = \&ERROR;
$msg_level = \&CHK if ($file);
&{$msg_level}("FSF_MAILING_ADDRESS",
"Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. OpenOCD already includes a copy of the GPL.\n" . $herevet)
}

# check for Kconfig help text having a real description
# Only applies when adding the entry originally, after that we do not have
Expand Down

0 comments on commit 833be46

Please sign in to comment.