-
Notifications
You must be signed in to change notification settings - Fork 224
Fix #1: Add GCC 15/16 include paths for modern distros #5
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
Open
figitaki
wants to merge
1
commit into
anthropics:main
Choose a base branch
from
figitaki:fix-gcc-15-16-include-paths
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+30
−15
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -269,12 +269,19 @@ impl Preprocessor { | |
| "/usr/local/include", | ||
| // x86_64 multiarch (default, removed by set_target for other arches) | ||
| "/usr/include/x86_64-linux-gnu", | ||
| // GCC headers (common versions) | ||
| // GCC headers (common versions) - Debian/Ubuntu | ||
| "/usr/lib/gcc/x86_64-linux-gnu/16/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/15/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/14/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/13/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/12/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/11/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/13/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/14/include", | ||
| "/usr/lib/gcc/x86_64-linux-gnu/10/include", | ||
| // GCC headers - Fedora/RHEL | ||
| "/usr/lib/gcc/x86_64-redhat-linux/16/include", | ||
| "/usr/lib/gcc/x86_64-redhat-linux/15/include", | ||
| "/usr/lib/gcc/x86_64-redhat-linux/14/include", | ||
| "/usr/lib/gcc/x86_64-redhat-linux/13/include", | ||
| "/usr/include", | ||
| ]; | ||
| for candidate in &candidates { | ||
|
|
@@ -470,10 +477,12 @@ impl Preprocessor { | |
| !s.contains("x86_64") | ||
| }); | ||
| let aarch64_paths = [ | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/11/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/12/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/16/include", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assumes a x86-64 host, if running on an arm host, these paths will not work, the correct paths should be /usr/lib/gcc/*. |
||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/15/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/14/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/12/include", | ||
| "/usr/lib/gcc-cross/aarch64-linux-gnu/11/include", | ||
| "/usr/aarch64-linux-gnu/include", | ||
| "/usr/include/aarch64-linux-gnu", | ||
| ]; | ||
|
|
@@ -524,10 +533,12 @@ impl Preprocessor { | |
| !s.contains("x86_64") | ||
| }); | ||
| let riscv_paths = [ | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/12/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/16/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/15/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/14/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/12/include", | ||
| "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include", | ||
| "/usr/riscv64-linux-gnu/include", | ||
| "/usr/include/riscv64-linux-gnu", | ||
| ]; | ||
|
|
@@ -610,14 +621,18 @@ impl Preprocessor { | |
| !s.contains("x86_64") | ||
| }); | ||
| let i686_paths = [ | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/11/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/12/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/16/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/15/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/14/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/11/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/12/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/13/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/12/include", | ||
| "/usr/lib/gcc-cross/i686-linux-gnu/11/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/16/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/15/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/14/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/13/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/12/include", | ||
| "/usr/lib/gcc/i686-linux-gnu/11/include", | ||
| "/usr/i686-linux-gnu/include", | ||
| "/usr/include/i386-linux-gnu", | ||
| ]; | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding include paths. We will be replaced in 6 months. Vibe coding is the future.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't understand, hooman, eventually it'll build a map of all possible paths on all possible machines and then it'll be able to compile "Hello, World!" everywhere!