Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion of compiler option guide to machine readable format #490

Open
mayank-ramnani opened this issue May 16, 2024 · 0 comments
Open

Comments

@mayank-ramnani
Copy link
Contributor

In the future, there might be tools based on the OpenSSF compiler options guide.
This issue is a tracker to make the guide suitable to be converted into a machine readable format like json.
Tools such as the one I am working on (https://github.com/mayank-ramnani/temper) need the options in a machine readable format to do processing using them.

Currently, the guide has some inconsistencies which make it difficult to convert to a machine readable format.

Some issues in parsing:

  1. Non-standard table format:
  • There are only a few rows in which the column “Compiler Flag” contains additional data other than the flag:
  • Example:
-D_FORTIFY_SOURCE=3
(requires -O1 or higher,
may require prepending -U_FORTIFY_SOURCE)
  • Suggestion: Move the additional details to another column, maybe to description. Have a standard table format.
  1. Non-standard version mentions.
  • Suggestion: Mention till patch version (ex: gcc 2.95.3) instead of just the major version (ex: gcc 12)

I will update this thread with more insights and can create a PR that implements the above.

The script I created to scrape the webpage and convert it to json: doesn't give perfect results due to inconsistencies in the guide - https://github.com/mayank-ramnani/temper/blob/main/extra/scraper.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants