Skip to content

Fix two sh keywords in the csh setup scripts (fi, elseif) - #1940

Merged
rosethompson merged 1 commit into
openhwfoundation:mainfrom
davidharrishmc:dh/csh-keywords
Oct 6, 2026
Merged

rosethompson merged 1 commit into
openhwfoundation:mainfrom
davidharrishmc:dh/csh-keywords

Conversation

@davidharrishmc

Copy link
Copy Markdown
Contributor

Source: this is a copy of #1842 by @tropibyte, who found and fixed both bugs. That PR cannot be merged because its author has not signed the Eclipse Contributor Agreement, so this PR re-applies the same two-token change. Credit for the report and the fix goes to @tropibyte (#1842).

setup.csh closes an if with fi, and site-setup.csh uses elseif. Neither is csh syntax:

  • setup.csh:40, fi → endif. The block has an else, so tcsh searches for endif, runs off the end of the file and reports if: then/endif not found. setup.csh therefore fails whenever $RISCV/site-setup.csh exists.
  • site-setup.csh:57, elseif → else if. tcsh reports Badly placed ()'s., so the gcc-10 fallback for Ubuntu 20.04 is never put on PATH.

🤖 Generated with Claude Code

setup.csh closed an if/else with 'fi', so tcsh searched for endif, ran off
the end of the file and failed with 'if: then/endif not found' whenever
$RISCV/site-setup.csh exists.  site-setup.csh used 'elseif', which tcsh
rejects with 'Badly placed ()'s.', so the gcc-10 fallback was never taken.

Reported and first fixed by @tropibyte in openhwfoundation#1842; this is an
independent copy of that two-token change because that PR cannot be merged
without an Eclipse Contributor Agreement.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: David Harris <David_Harris@hmc.edu>
@rosethompson
rosethompson merged commit 6fcb5d0 into openhwfoundation:main Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants