LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-22-2012, 02:41 AM   #1
k84834
Member
 
Registered: Aug 2012
Posts: 142

Rep: Reputation: Disabled
what is meaning of this instruction in details?


in section 5.9, what is the meaning of below instruction in details ?
what is the value of CFLAGS variable?
Code:
cp -v gcc/Makefile.in{,.tmp}
sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \
  > gcc/Makefile.in
 
Old 09-22-2012, 03:09 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by k84834 View Post
in section 5.9, what is the meaning of below instruction in details ?
Code:
cp -v gcc/Makefile.in{,.tmp}
sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \
  > gcc/Makefile.in
This:
Code:
cp -v gcc/Makefile.in{,.tmp}
makes a copy of Makefile.in named Makefile.in.tmp

This:
Code:
sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp > gcc/Makefile.in
Substitutes T_CFLAGS = to T_CFLAGS = -fomit-frame-pointer. End result will be written to gcc/Makefile.in.

Quote:
Originally Posted by k84834
what is the value of CFLAGS variable?
CFLAGS is not set here, T_CFLAGS is. CFLAGS is for the user to override (have a look at the content of gcc/Makefile.in file).

PS: There's no point in changing/playing with these flags when in chapter 5. Chapter 5 creates a sane temporary(!) environment which is used to build chapter 6. Once you reach chapter 6 you can experiment with these flags if you want/need to. Changing these flags in chapter 5 might even get you into trouble.
 
Old 09-22-2012, 03:26 AM   #3
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
so you say that I follow book's instruction to build temporary system, then if I want to build reduced system I use compiler options in chapter 6 after chrooting?
 
Old 09-22-2012, 03:46 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by k84834 View Post
so you say that I follow book's instruction to build temporary system, then if I want to build reduced system I use compiler options in chapter 6 after chrooting?
What do you mean by reduced?

Using CFLAGS optimizes and might make the compiled program slightly smaller:
- http://linuxreviews.org/howtos/compiling/
- http://en.gentoo-wiki.com/wiki/CFLAGS

If by reduced you mean make smaller then you will probably be disappointed at the end result.

EDIT: Also have a look at this: http://lfs.130th.net/lfs/faq.html#optimizations

Last edited by druuna; 09-22-2012 at 03:49 AM.
 
Old 09-22-2012, 04:02 AM   #5
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
what was the minimum size of LFS that you have built? how you built it ? please share your experiences.
Thank you
 
Old 09-22-2012, 04:07 AM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
How small did you want it? Also what end system did you want i.e gnome or just the basic lfs finished?
 
Old 09-22-2012, 04:20 AM   #7
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
for example I want to build a LFS for Thin client Or a GUI system as an end system.
do I first build a smallest LFS and then install needed package for intended system OR should build end system then do some work to reduce it ?
it is more comfortable to build an reduces LFS system then turn it to GUI , Multimedia , Server and so on, it isn't?
my first base LFS system Size is 398M and is so much big

Last edited by k84834; 09-22-2012 at 04:21 AM.
 
Old 09-22-2012, 04:26 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by k84834 View Post
what was the minimum size of LFS that you have built?
I really don't know. I have experimented with removing stuff, but that was years ago.

To be honest I don't see the point in reducing LFS's size. It is a minimal install already. The same is true for optimizing; The increase in speed is almost negligible and the amount of trouble you get yourself into during the build isn't worth it.

Quote:
Originally Posted by k84834
how you built it?
I removed files after I finished installing LFS (have a look here: http://www.linuxquestions.org/questi...s-book-870662/)

If you are going to build anything from BLFS on top of LFS I would follow the book and don't bother with optimizing/making smaller.

Quote:
Originally Posted by k84834
please share your experiences.
LFS is very minimal as-is, no need to reduce its size. You can remove the installed documents, man pages and debugging (http://www.linuxfromscratch.org/lfs/...pingagain.html). This will leave the base intact and makes it possible to start with BLFS without having any nasty surprises.

I also would think twice before removing the man pages/documents; You need those, especially when you aren't an experienced linux user (which I think you aren't...).

If BLFS isn't of any concern you can remove some of the LFS packages, but this will significantly reduce the LFS functionality.

Ask yourself this: Why do you want to do this in the first place?
 
  


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
About ulimit instruction chenrvmldd Linux - General 1 03-23-2011 06:53 PM
online instruction MonsterMaxx Linux - Newbie 4 12-01-2007 07:19 PM
Which linux instruction is equivalent to windows' instruction "tracert"? backpacker Linux - Software 1 04-04-2006 10:55 PM
what does this instruction mean sibtay Programming 2 08-17-2004 05:38 AM
mmm instruction help... Beppe83 Linux - Software 1 05-31-2004 07:57 AM

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

All times are GMT -5. The time now is 10:23 AM.

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