-   Linux - Software (
-   -   Specifying compiler for 'make' to use (

litlmary 06-27-2005 02:27 PM

Specifying compiler for 'make' to use
I have a driver that I need to compile that comes with a simple makefile and a few supporting files. In FC3 with gcc3.2 all I had to do is run 'make' and it compiled just fine.

Now I am in FC4, which ships with gcc4, and the driver is apparently incompatible with gcc4.

Lucky me, gcc3.2 is included on the FC4 cd's and I have installed it.

How do I compile the driver using gcc3.2, though? The system still defaults to gcc4, and complains when I try to run 'make'.

I have tried to remove gcc4, but a bug in FC4 makes it extremely difficult.

I have heard of cases where people made minor changes to the supporting files and got an older driver to work with gcc4, but that is above me.

So, any help?


exvor 06-27-2005 03:08 PM

This is how we used to do it for kernel compile.

we dont do this anymore by the way because 3.3 fixed the issues with 3.0 :)

make CC=/opt/gcc.2.95.3/bin/gcc dep && clean && bzImage ; for example

litlmary 06-28-2005 03:19 PM

New error now that I am using the correct compiler:


make -C /lib/modules/2.6.11-1.1369_FC4/build SUBDIRS=/data/rtl MODVERDIR=/data/rtl modules
make[1]: Entering directory `/usr/src/kernels/2.6.11-1.1369_FC4-i686'
  CC [M]  /data/rtl/r8180_pci_init.o
cc1: invalid option `tune=pentium4'
make[2]: *** [/data/rtl/r8180_pci_init.o] Error 1
make[1]: *** [_module_/data/rtl] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.11-1.1369_FC4-i686'
make: *** [modules] Error 2

This is fun.

Any more help?

litlmary 06-28-2005 06:18 PM

Quick note that I forgot.

A search for files in the directory that contain the word "pentium4" turns up zip.

Some googling indicated that commenting such a line out would cure it, but I don't have a line like that.


foo_bar_foo 06-29-2005 12:53 AM

that would be -mtune=pentium4 somewhere in

i think -- just an slightly educated guess

they build one compiler so it uses the tune flag and the other compiler without
silly fedora people

timpalpant 07-01-2005 08:27 PM

I've been having this same problem, and the only way I've found to get around it is to use the windows driver with ndiswrapper.

I went looking for that "-mtune=pentium4" line in both the driver makefile and the kernel makefile and couldn't find it in either, but after some googling, I came upon the GCC Optimization flags "-march" and "-mcpu", both of which take values such as pentium4. Unfortunately, I searched for these tags in both makefiles and couldn't find them either.

In the driver makefile, however, there is this "-O6" tag which might be some sort of optimization but it still didn't compile after removing that line.

All in all, that mtune/march/mcpu flag is being added somewhere I don't know about (I new to linux so I really don't have much clue how this works). Installing the ndiswrapper driver was very easy though. Simply download ndiswrapper from sourcefourge, extract it and run make / make install. Then download the windows Realtek 8180 driver and extract it. Then type:

ndiswrapper -i realtek_driver_name.inf

That installed it and loaded int for me. The nice thing about the ndiswrapper driver (although I hate using a windows driver) was that it loaded into the Network Configuration Dialog that ships with Fedora. (You might have to manually add the wireless connection, but the hardware is installed.

Hope this works for others.

All times are GMT -5. The time now is 11:00 PM.