I am trying to compile gcc 10.3
from source. In order for it to compile on modern kernels (which don't have the <linux/cyclades.h>
header), I need to manually apply a certain commit that removes the cyclades-related lines of code from gcc (that commit was after 10.3 release). In particular, that commit removes several lines from three files.
I have the source code of gcc 10.3
. I want to automatically apply the diff of that commit to it - automatically edit the three files according to the commit. It needs to be done automatically. Is there a way to do so without manually using sed
with hand-crafted calls for each line of code that was removed?
CodePudding user response:
What I want can be achieved with the patch
command. On Fedora it can be installed with sudo dnf install patch
. I learned how to use patch
by reading a post on redhat.com.