How to apply a gcc patch

I am trying to apply this patch to GCC on MinGW to get it to compile GDC 2 , but I do not know how to do it. (I'm still not familiar with the internal components of GCC and even the * nix tools in general.) I know that there is a patch command, but I canโ€™t figure out how to use it, and I donโ€™t even know, I have enough information for this .

How to apply a patch for GCC?

+4
source share
2 answers

By default, GNU Patch can be used by loading the patch file into it from stdin (input to the console), for example:

 patch < file.patch 

There are many switches and patch options, the functionality of which is described here:

http://www.rtr.com/winpak/Documentation/patch.htm

http://www.gnu.org/software/diffutils/manual/html_mono/diff.html#Invoking%20patch

patch and diff work hand in hand. A small demo is found on wikipedia .

+1
source

Take a look at the patch manual pages. Just type man patch in the terminal window ... usually I think you want to do patch -p0 -i your_file.diff .

0
source

Source: https://habr.com/ru/post/1342221/


All Articles