Skip to content

Commit 4748fdc

Browse files
Add doc for sending patches to GCC
1 parent 2f11b37 commit 4748fdc

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

doc/sending-gcc-patch.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
This guide explains what to do to send a GCC patch for review.
2+
3+
All the commands are supposed to be run in the folder where you cloned GCC.
4+
5+
```bash
6+
./contrib/gcc-changelog/git_check_commit.py
7+
```
8+
9+
You can provide a specific commit hash:
10+
11+
```bash
12+
./contrib/gcc-changelog/git_check_commit.py abdef78989
13+
```
14+
15+
a range:
16+
17+
```bash
18+
./contrib/gcc-changelog/git_check_commit.py HEAD~2
19+
```
20+
21+
or even a comparison with a remote branch:
22+
23+
```bash
24+
./contrib/gcc-changelog/git_check_commit.py upstream/master..HEAD
25+
```
26+
27+
When there is no more errors, generate the git patch:
28+
29+
```bash
30+
git format-patch -1 `git rev-parse --short HEAD`
31+
```
32+
33+
Then you can run the remaining checks using:
34+
35+
```bash
36+
contrib/check_GNU_style.sh 0001-your-patch.patch
37+
```
38+
39+
When you have no more errors, you can send the `.patch` file to GCC by sending an
40+
email to `[email protected]` and to the relevant GCC mailing lists
41+
depending on what your patch changes. You can find the list of the mailing lists
42+
[here](https://gcc.gnu.org/lists.html).
43+
44+
You can find more information about "contributing to GCC" [here](https://gcc.gnu.org/contribute.html).

0 commit comments

Comments
 (0)