• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do you patch the GCC file in Linux?

EmperorRob

Senior member
I downloaded a patch I need to run drivers for my sound card. It's a patch for the GCC file but I downloaded it and it's a .txt file. I imagine I have to do some kind of diff-insertion, but I'm not sure. Can I get some advice?

BTW, here's the file.
 
Ughghh........long UNIX commands for recompiling things..........ughghgh. I like pretty pictures. Pretty good with Sun's G++ compilers and Javac interpreters though.
Tt
 


<< Would it piss you off if I said man patch? 🙂 >>

There's a patch command? No, I'm being serious here....really.
 
The patch command takes a diff file (obtained using, surprisingly, the diff command) and applies it to an older source code directory.

The syntax is something like &quot;patch -p1 < my_patch.diff&quot; when you're in the source code directory. It might be -p0, I'm not sure. I don't have Linux booted right now so I hope the man page explains it a bit. Why they chose &quot;p1&quot; and &quot;p0&quot; is beyond me. I don't usually find UNIX commands cryptic but patch is weird.
 
yeah, patch is an oddball. It's one of those Unix commands that could be written w/ an easier syntax but it's already there and works fine so nobody bothers to change it.
 
EmperorRob:

Are you already familiar with compiling and installing Linux programs from their source code? If not, then trying to patch and compile gcc is a really bad first time project. Perhaps you can find an updated RPM/deb/tgz/whatever file to use instead...
 
You called it exactly Gantry. The only reason I'm attempting this is b/c my sound card isn't supported under Linux. However I got some drivers off the net, but when I try to compile them I get some errors. I'm running Red Hat 7 btw.

I check and these drivers won't work the the default gcc version included in 7.0 so I d/led this patch. I was hoping to just get a quick fix w/out getting my hands dirty, but I may be out of luck.
 
Of course there is a patch command. C'mon! This is something unix like. 😉. j/k

Yes, in Linux, there is a patch command. 🙂
 
oh, heh, the imfamous RH 7 gcc problem. Yes, unfortunately it can be quite a pain, if you can edit the makefile have it use kgcc instead (kgcc is actually a different version of gcc that RH uses to compile the kernel). That should fix your problems... in fact if I was you I'd delete gcc and just have it as a symlink to kgcc (heck to be honest I wouldn't install RH either... viva slackware!!)
 
You can change the compiler name in Makefile of the program itself, perhaps that will work...

Also, there has been an updated Redhat 7.0 gcc RPM, though I'm not sure if it'll fix your problem or not. Here is the link, you can download and upgrade the gcc via RPM. Like I said though, I'm not sure if this updated gcc will fix your problem, but it certainly can't hurt it and upgrading via rpm is much easier than by source...
 
Back
Top