How to Apply a GCC Patch

谁说胖子不能爱 提交于 2019-12-01 16:49:26

问题


I'm trying to apply this patch to GCC on MinGW to get it to compile GDC 2, but I don't know how. (I'm still new to the internals of GCC, and even to *nix tools in general.) I know there's the patch command but I can't figure out how to use it, and I don't even know if I have enough information for this.

How do I apply the patch for GCC?


回答1:


By default GNU Patch can be used by feeding a patch file to it from stdin (console input), e.g.:

patch < file.patch

There are many switches and options patch can use, the functionality 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 demonstration is found on wikipedia.




回答2:


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



来源:https://stackoverflow.com/questions/5189085/how-to-apply-a-gcc-patch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!