Skip to content

Make the output of sys/conf/newvers.sh more stable. - #2651

Open
qwattash wants to merge 1 commit into
devfrom
fix-newvers
Open

Make the output of sys/conf/newvers.sh more stable.#2651
qwattash wants to merge 1 commit into
devfrom
fix-newvers

Conversation

@qwattash

Copy link
Copy Markdown
Contributor

Maybe I should just PR it upstream directly?

If the output from $CC -v contains the word 'version' in other lines,
the resulting version string will contain newlines.
As a result, the generated vers.c compiler_version string will be broken up
by newlines and generate a compiler error.

This does not further filter the $CC -v output, but ensures that newlines
are escaped, so that the resulting C-string is legal.
@qwattash
qwattash requested a review from brooksdavis May 25, 2026 14:30

@bsdjhb bsdjhb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, can you describe a case where this makes a difference? For all the compilers I have to hand on my FreeBSD desktop this doesn't make any change in the output.

@bsdjhb

bsdjhb commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Oops, I see that your commit comment does describe the case, not sure why that wasn't in the default PR description. I do think an upstream PR would be great as I'd rather the change be upstream if possible.

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