LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-27-2005, 02:27 PM   #1
litlmary
Member
 
Registered: May 2005
Location: Texas, somewhere near Houston (I think)
Distribution: See my sig
Posts: 307

Rep: Reputation: 30
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?

TIA
 
Old 06-27-2005, 03:08 PM   #2
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,488

Rep: Reputation: 67
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
 
Old 06-28-2005, 03:19 PM   #3
litlmary
Member
 
Registered: May 2005
Location: Texas, somewhere near Houston (I think)
Distribution: See my sig
Posts: 307

Original Poster
Rep: Reputation: 30
New error now that I am using the correct compiler:

Code:
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?
 
Old 06-28-2005, 06:18 PM   #4
litlmary
Member
 
Registered: May 2005
Location: Texas, somewhere near Houston (I think)
Distribution: See my sig
Posts: 307

Original Poster
Rep: Reputation: 30
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.

TIA
 
Old 06-29-2005, 12:53 AM   #5
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
that would be -mtune=pentium4 somewhere in
/usr/src/kernels/2.6.11-1.1369_FC4-i686/Makefile

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
 
Old 07-01-2005, 08:27 PM   #6
timpalpant
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no make command,,, most likely compiler missing anubis26 Ubuntu 17 10-24-2005 12:40 AM
Make and compiler problem fiveball02 Slackware 2 09-28-2005 10:32 PM
make / compiler problem??? bograt Linux - Software 9 02-25-2005 06:16 PM
C Compiler (make command) Caboose447 Suse/Novell 5 12-14-2004 05:19 PM
C compiler and MAKE problems spotz78 Linux - Newbie 5 09-15-2004 04:19 PM


All times are GMT -5. The time now is 04:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration