LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 10-20-2005, 09:59 AM   #1
ruben22
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Rep: Reputation: 0
gcc unrecognized option


Hello,

I've just started with Linux From Scratch (6.1)

I have put up a mighty struggle (started over from "scratch" several times), but i keep encountering the same problem.

When i get to chapter 5.7 (adjusting the toolchain) of the online installation manual, i keep getting the following error whilst applying the "specfile" (which i copy-pasted in a file specfile.sh and adjusted a little) :

SPECFILE=`gcc --print-file specs` &&
sed 's@ /mnt/lfs/tools/lib/ld-linux.so.2@ /mnt/lfs/tools/lib/ld-linux.so.2@g' \
$SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE

The error i get when trying to execute it:

gcc: unrecognized option '-mtune=pentiumpro'

Besides the fact that i don't even have a pentiumpro architecture, i don't have a clue about where to adjust this "flag"

Any help would be appreciated!!
 
Old 10-20-2005, 10:26 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Hello!

Have a look in the gcc manual.

Greetings
 
Old 10-20-2005, 10:41 AM   #3
mr_demilord
Member
 
Registered: Sep 2005
Posts: 244

Rep: Reputation: 30
It's --mtune=pentiumpro instead of -mtune=pentiumpro
 
Old 10-20-2005, 10:53 AM   #4
ruben22
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
@ mr_demilord:

Yeah for all i know it might as well be the problem, but the error really states :

gcc: unrecognized option '-mtune=pentiumpro' .

If I understand correctly, I have to find some sort of configuration file that "gives" the (false) -mtune setting and correct it.

I will read the gcc manual, as suggested by Keruskerfürst, maybe it'll provide some answers as to where this file is to be found.

Tnx for the quick replies!!!!
 
Old 10-20-2005, 11:05 AM   #5
ruben22
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
I just "read" the gcc manual and i think i found the problem.

I have to change the -mtune=pentiumpro flag to -mtune=pentium3 .

The manual didn't state however, which file(s?) needs to be edited in order to do this. I did some googling and stumbled upon a gentoo installation manual that referred to a make.conf file in the /etc directory, but there is no make.conf file on my LFS installation yet.....
 
Old 10-20-2005, 02:48 PM   #6
mr_demilord
Member
 
Registered: Sep 2005
Posts: 244

Rep: Reputation: 30
You know if you use optizimation flags on critical packages like GCC binutils for example that the build has a higher chance to fail and will fail and the speed increasment is 0%.

The book doesn't warn the people without a reason..

If I was you, I'll only use optmization flags on less critical packages like mozilla products openoffice gimp media players like xine.

my 2 cents

Last edited by mr_demilord; 10-20-2005 at 02:50 PM.
 
Old 10-20-2005, 07:34 PM   #7
ruben22
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
@mr_demilord

Im aware of this. My problem is not how to set flags, but to how UNSET them. I have followed the book almost to the letter (and i most definately didn't specify any pentium pro flags, i don't even have a pentium pro machine), and i didn't specify any pentium pro flags, but the gcc "compiler" (if i use the right word....) magically seems to presume it.

I have reread the LFS book, but it doesn't mention how to set or unset the -mtune flag (let alone how to alter it) .

Maybe i should try to install LFS on a different machine? Or with a preinstalled linux machine (i'm using the CD as start operating system right now)?

Grtz
 
Old 10-21-2005, 04:55 AM   #8
mr_demilord
Member
 
Registered: Sep 2005
Posts: 244

Rep: Reputation: 30
Quote:
Originally posted by ruben22
@mr_demilord

Im aware of this. My problem is not how to set flags, but to how UNSET them. I have followed the book almost to the letter (and i most definately didn't specify any pentium pro flags, i don't even have a pentium pro machine), and i didn't specify any pentium pro flags, but the gcc "compiler" (if i use the right word....) magically seems to presume it.

I have reread the LFS book, but it doesn't mention how to set or unset the -mtune flag (let alone how to alter it) .

Maybe i should try to install LFS on a different machine? Or with a preinstalled linux machine (i'm using the CD as start operating system right now)?

Grtz
Sorry I didn't read it to well, my apologises.
It should work with the LFS cd, it's very strange

I found a way to unset it.

Open up a terminal
type in <unset CFLAGS>
and <unset CXXFLAGS>
and it should unset the optimizations flags..
hope it helps..
 
Old 10-27-2005, 08:59 PM   #9
ruben22
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
After a couple of retries, i discovered that my problem had something to do with the way i tried to implement the specfile.

I copy-pasted the whole section to a " specfile.s " file (on a windows xp machine...).

I then tried to execute the file with " ./specfile.s (on the LFS system)" . For some (probably very obvious) reason, this didn't work. As I couldn't think of any other way to copy - paste things, i tried to type it manually and behold: things worked.

I am well underway with my LFS installation again :P.

I hope this will help somebody else out...

Tnx for all the replies,

Ruben
 
Old 11-12-2008, 04:41 AM   #10
Stephann
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
Quote:
I found a way to unset it.

Open up a terminal
type in <unset CFLAGS>
and <unset CXXFLAGS>
and it should unset the optimizations flags..
hope it helps..
That fixed the problem for me, I'm using a Pentium IV.

For those who're wondering, when copying the whole line I had to include the greater than (>) symbol when I was cutting and pasting from the book examples (originally, I just assumed it was to reflect how the terminal looked.) For the record, when using the 'unset' commands, it should look like:

Code:
lfs:/mnt/lfs$ unset CFLAGS

Last edited by Stephann; 11-12-2008 at 04:45 AM.
 
  


Reply



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
what does the option -s of gcc mean ? hongxing Linux - Software 3 11-28-2005 08:12 PM
mysqld: unrecognized option `--skip-external-locking' MaulingMonkey Linux - Software 0 01-11-2005 02:01 PM
gcc option -E use. niverson Programming 2 10-11-2004 04:06 PM
"ld unrecognized option '--as-needed'" aoe2bug Slackware 5 08-17-2004 05:59 PM
Alcatel Speedtouch: pppd[2287]: unrecognized option 'nas0' novazem Linux - Networking 1 03-16-2004 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration