So, what I had to accomplish here was build a gcc package with all the patches necessary for the modifications needed by DXR. This sounds easier than it was, although looking back at it now the reason it took so long was a very small mistake.
The first thing that I started with was getting the spec file for regular gcc by running the command
"yumdownloader --source gcc"
followed by
"rpm -i gcc-4.3.2-7.src.rpm"
where both commands were done in my ~/rpmbuild/SOURCES/ directory.
Next thing I did was grab the patches using the command
hg init .
hg clone http://hg.mozilla.org/users/tglek_mozilla.com/gcc-moz-plugin-mq ~/gccplugins
and that put the patches in the directory ggcplugins in my home directory. After that I copied all the patches to the ~/rpmbuild/SOURCES directory.
From there all I had to do was the spec file which seemed easy. I added the lines -
#My Edits for modified GCC build
Patch20: plugin.patch
Patch21: gty.patch
Patch22: nopoison.patch
Patch23: parm_attrs.patch
Patch24: c_process_decl.patch
near the top of the file, and then the following lines in the %prep section -
#my patches
pwd
%patch20 -p1 -b .c_process_decl~
%patch21 -p1 -b .gty~
%patch22 -p1 -b .nopoison~
%patch23 -p1 -b .parm_attrs~
%patch24 -p1 -b .plugin~
My first problem came from using the -p0 switch when with these particular patches they need to use the -p1 switch. After my teacher and I found that out, there was still a problem becuase the patch failed because it was looking for the file gcc/tree-plugin-pass.c. After a good amount of googling I found that this file was actually created by one of the other patches (plugin.patch).
I then switched out c_process_decl with plugin and after that it built successfully.
The final build times were-
real 85m55.771s
user 135m26.897s
sys 51m59.042s
real 85m55.771s
user 135m26.897s
sys 51m59.042s