Repository navigation
Fix two sh keywords in the csh setup scripts (fi, elseif) - #1940
Merged
rosethompson merged 1 commit intoOct 6, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cshcloses anifwithfi, andsite-setup.cshuseselseif. Neither is csh syntax:setup.csh:40,fi→endif. The block has anelse, so tcsh searches forendif, runs off the end of the file and reportsif: then/endif not found.setup.cshtherefore fails whenever$RISCV/site-setup.cshexists.site-setup.csh:57,elseif→else if. tcsh reportsBadly placed ()'s., so thegcc-10fallback for Ubuntu 20.04 is never put onPATH.🤖 Generated with Claude Code