ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Greetings fellow Linux users and potential Linux users!
The tweakability aspect of open-source appeals to me alot. I know alot of apps (more so windowS ones) do not even optimise for MMX (Intel Pentium) or 3DNow! (AMD).
Here are my specs, so please generate some instructions based on them:
* Pentium 4 1.8Ghz
* Using VectorLinux 3.2 (Debian-based I think)
... that's all you need to know, isn't it?!?!
Tell me what configuration files to configure, what flags to enable, etc. Include an explanation (if it is not self-explanitory) for each step, and some general instructions aswell. And please don't direct me to other pages on the 'Net, the ones I've tried have been unsatisfactory and unconcice, and/or outdated (e.g. the official GNU GCC documentation).
Looking forward to tweaking (i.e. optimising) my apps, and maybe, one day, building my own Linux From Scratch (LFS) system,
Hehe - you are funny.The flags you use depend on the apps you compile and the compiler you use plus on the risk you are willing to take to end up with a binary that doesn't exactly what it is supposed to do.If you have the definite need to play with compiler flags you might want to consider gentoo.And here's the link to more info: http://forums.gentoo.org/viewtopic.p...light=gcc+flag
Oh - forgot to mention many flags don't get used depending on the processor type because the gcc guys disabled them.Plus many apps override your setting when you compile them.
Last edited by crashmeister; 03-15-2003 at 09:10 AM.
Right so let me clear up a thing or two, I'm not a computer illiterate moran, but I'm new to Linux and I have questions on how do this, that and the other, as things are done differently on the Linux side (as is the case with different OSes) and there are many new things to learn.
I know you comprimise speed for stability when you optimise for your processor, but that depends on to what extent you optimise, i.e. if its just the architecture, the processor or others. I didn't say this in my initial post too clearly, and you didn't interperet it well, so I'll say it now:
give me some general instructions, a primer on optimisations with GCC. Tell me what configuration files where instructs GCC to do what when compiling, and how to do that by default every time.
And no, I don't intend on installing (or as the case may be, developing) a Gentoo system; I don't have the time or the extensive knowledge required (for the latter, yet)
And I won't be compiling each and every application, and when I do they won't always be with optimisations, depending on how convenient it is and if there is a noticable speed/stability effect. It's mostly the big applications I'm thinking about, e.g. Mozilla. I compiled Mozilla without any optimisations (i.e. 486) and boy was it slow! I know it's slow normally, but the default 0.9.x that was installed at the time performed much better. Or KDE. In other words the monolithic, perhaps bloated, but (for me and alot of other desktop users) indispensible projects.
Or the Linux kernel itself. Or resource-intensive video applications and libraries such as XVID (MPEG-4) or Transcode.
You get the drift, I've a fairly good idea of what I'm talking (and asking) about, but I'm a newbie, and this is a newbie forum after all.
Nobody can really tell you what flags will work on your box with a specific program for sur if you want to go to extremes.
With the gcc2.x compiler versions you needed to enable a lot of flags because it only had processor flags for i386 - i686.gcc3 versions got flags for specific CPU's and the instructions that CPU understands are already enabled when you set the CPU flag to your type.You got two options there one is -mcpu=cpu-type;makes code that is optimised for the CPU but also works on any i386.If you put additionally -march=cpu-type it will only work on the specified CPU.
So basically -mcpu=cpu-type -march=cpu-type -O2 -pipe is considered to be on the safe side.You can also use -O3 but some apps don't like it too much and I've seen a comparison of different benchmarks that really work much faster with -O1 and -O2 but -O3 doesn't seem to be worth the trouble.
There are a lot of other options but those are way over my head.I'm happy I got gentoo running the way it is.About this you really need to check with the gcc website.I don't see what is outdated there.There is a manual that covers all the options for gcc3.2.2 and that is pretty much the latest release.