Revision [5947]
Last edited on 2010-03-04 01:36:43 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. Suggested environment variables to use are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS="-mtune=generic -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"]]** (only use //-pipe// if sufficient R.A.M. is available). The standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
Deletions:
Revision [5942]
Edited on 2010-03-03 13:48:39 by coolpupAdditions:
make CFLAGS="-mtune=generic -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
./configure CFLAGS="-mtune=generic -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
./configure CFLAGS="-mtune=generic -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Deletions:
./configure CFLAGS="-mtune=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Revision [5940]
Edited on 2010-03-03 09:36:39 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. Suggested environment variables to use are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS="-mtune=generic -march=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"]]** (only use //-pipe// if sufficient R.A.M. is available). The standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
./configure CFLAGS="-mtune=generic -march=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
./configure CFLAGS="-mtune=generic -march=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Deletions:
./configure CFLAGS="-mtune=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Revision [5939]
Edited on 2010-03-03 09:30:22 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. Suggested environment variables to use are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS="-mtune=generic -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"]]** (only use //-pipe// if sufficient R.A.M. is available). The standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
Deletions:
Revision [5938]
Edited on 2010-03-03 08:25:13 by coolpupAdditions:
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Revision [5932]
Edited on 2010-03-03 07:14:02 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. Recommended environment variables to use are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS="-mtune=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"]]** (only use //-pipe// if sufficient R.A.M. is available). The standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
./configure CFLAGS="-mtune=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
./configure CFLAGS="-mtune=prescott -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Deletions:
Revision [5913]
Edited on 2010-02-28 12:39:45 by coolpupAdditions:
- A lot of Makefiles will leave the "add debug symbol" option of GCC enabled (it is "-g"). This means that a lot of "text" information is added to your program to facilitate debugging, making the program file significantly larger. When compiling open the Makefile and look for a line that sets the C flags (usually CFLAGS = ...). If the line includes -g remove it and see how much space is gained.
-mtune, or -mcpu in older versions of GCC, is similar to -march and accepts the same options. Unlike -march it doesn't break compatibility with older arches. -march and -mtune options can be mixed to get the desired effect. If you aren't going to share your binaries with other computers you don't need this flag and should only set an appropriate -march instead. The exception is arches like PPC where -march isn't available. If you use -mtune instead without any -march option, your binaries are backward compatible down to i386, but the scheduling is optimized for your chosen architecture. CPUs are also backward compatible so if you update your system with a new CPU you can still use your old packages.
The next and most common flag is the '-pipe' option. The pipe option tells GCC not to create temporary files when compiling, and instead pipes data directly to the next function, which saves some compile time. Be aware that using -pipe will cause GCC to use more RAM so don't use it if you have very little.
-mtune, or -mcpu in older versions of GCC, is similar to -march and accepts the same options. Unlike -march it doesn't break compatibility with older arches. -march and -mtune options can be mixed to get the desired effect. If you aren't going to share your binaries with other computers you don't need this flag and should only set an appropriate -march instead. The exception is arches like PPC where -march isn't available. If you use -mtune instead without any -march option, your binaries are backward compatible down to i386, but the scheduling is optimized for your chosen architecture. CPUs are also backward compatible so if you update your system with a new CPU you can still use your old packages.
The next and most common flag is the '-pipe' option. The pipe option tells GCC not to create temporary files when compiling, and instead pipes data directly to the next function, which saves some compile time. Be aware that using -pipe will cause GCC to use more RAM so don't use it if you have very little.
Deletions:
Why Compile programs?
Sometimes you will find that a program or driver that you need or want is not available for Puppy. The good news is: If that application or driver is open source, you will have access to the source code to compile, but don't get put off by the long words. These days most open source applications have a very simple way to compile and install from source code.
Puppy 2
If you're running a liveCD or frugal/poor-man's/option-1/coexist install, stick the devx file in /mnt/home, in the same directory as pup_save.3fs.
-march=
-march tells gcc to optimize for a certain architechture. Basically, you just need to know what your CPU is, and the GCC name for it. Remember that this breaks compatibility with older arches!
This flag takes the following form:
-march=pentium4
Of course you want to replace pentium4 with whatever CPU you're actually using.
Here's an incomplete list of valid x86 architectures you may use with the -march flag:
i386, i486, i586, i686, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium-m, pentium4, prescott, k6, k6-2, k6-3, k8, athlon, athlon-tbird, athlon-4, athlon-xp, athlon-mp, athlon64, opteron, winchip-c6, winchip2, c3
Check the gcc manual page for a complete list (under Hardware Models and Configurations).
Note: "-march" implies "-mtune" (see gcc manpage).
If you are using gcc-4.2.2 or newer you can also use
-march=native or -mtune=native.
See gcc doc. This comes especially handy if you have an Intel Core* CPU and are planning swiching between gcc-4.2 and gcc-4.3.
-mtune=/-mcpu=
-mtune, or -mcpu in older versions of GCC, is similar to -march and accepts the same options. Unlike -march it doesn't break compatibility with older arches. -march and -mtune/-mcpu options can be mixed to get the desired effect. If you aren't going to share your binaries with other computers you don't need this flag and should only set an appropriate -march instead. The exception is arches like PPC where -march isn't available. If you use -mtune instead without any -march option, your binaries are backward compatible down to i386, but the scheduling is optimized for your chosen architecture. CPUs are also backward compatible so if you update your system with a new CPU you can still use your old packages.
-pipe
The final and most common flag is the '-pipe' option. The pipe option tells GCC not to create temporary files when compiling, and instead pipes data directly to the next function, which saves some compile time. Be aware that using -pipe will cause GCC to use more RAM so don't use it if you have very little.
Some general pointers
If you're a Newbie to Linux, it is recommended to run -O2, you can always experiment later.
A lot of Makefiles will leave the "add debug symbol" option of gcc enabled (it is "-g"). This means that a lot of "text" information is added to your program to facilitate debugging, making the program file significantly larger. When compiling you should open Makefile and look for a line that sets the C flags (usually CFLAGS = ...). If the line includes -g remove it and see how much space is gained.
Revision [5912]
Edited on 2010-02-28 11:59:30 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. The standard environment variables used are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS="-mtune=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"]]** (only use //-pipe// if sufficient R.A.M. is available) and the standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
and install your program (if you wish to create a .pet software package simultaneously read the next section)
and install your program (if you wish to create a .pet software package simultaneously read the next section)
Deletions:
and install your program (if you wish to create a .pet package simultaneously read the next section)
Revision [5911]
Edited on 2010-02-28 11:57:23 by coolpupAdditions:
then install compiled files and simultaneously create new directory for software package creation
then change to parent directory for .pet software package creation
then change to parent directory for .pet software package creation
Deletions:
then change to parent directory for .pet package creation
Revision [5909]
Edited on 2010-02-28 09:46:22 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. The standard environment variables used are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS="-mtune=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"]]** (only use //-pipe// if there is sufficient R.A.M.) and the standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
Deletions:
Revision [5908]
Edited on 2010-02-28 09:45:10 by coolpupAdditions:
Compiling refers to when the source code, written by a human, for a particular piece of software is converted into a binary package which a computer can interpret or make use of. This is achieved by using the //make// command. Prior to issuing this command, some configure options (arguments) are passed to it by running the configure script (if it exists, which it normally does). If there is no configure script this means that there are no configure options available and one may proceed directly to issuing the //make// command.
Deletions:
Revision [5907]
Edited on 2010-02-28 09:41:19 by coolpupAdditions:
Normally, for software applications one would create additional files to place inside the parent directory before executing //dir2pet// so that menu entries, and icons for the menu and desktop, are made available: SoftwarePackageCreation
Revision [5906]
Edited on 2010-02-28 09:29:27 by coolpupAdditions:
- If the configure script is not available (rare) then this should mean that the Makefile script file already exists. So edit it accordingly (for advanced users only) or execute the following:
- Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
- To un-install (only possible if the source directory was not deleted) execute the command [**Warning**: this will un-install any pre-existing installations as well, from the same locations]:
%%
- Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
- To un-install (only possible if the source directory was not deleted) execute the command [**Warning**: this will un-install any pre-existing installations as well, from the same locations]:
%%
Deletions:
- Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
- To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
Revision [5905]
Edited on 2010-02-28 09:27:05 by coolpupAdditions:
- If the configure script is not available (rare) then this should mean that the Makefile script file already exists. So edit it accordingly (for advanced users only) or execute the following:
- Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
- To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
- Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
- To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
Deletions:
-Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
-To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
Revision [5904]
Edited on 2010-02-28 09:18:49 by coolpupAdditions:
The process is now complete. The program has been installed and it may be used if you know where the executable file is located.
Some extra notes:
-If the configure script is not available (rare) then this should mean that the Makefile script file already exists. So edit it accordingly (for advanced users only) or execute the following:
-Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
-To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
Some extra notes:
-If the configure script is not available (rare) then this should mean that the Makefile script file already exists. So edit it accordingly (for advanced users only) or execute the following:
-Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
-To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
Deletions:
Use //prefix=/usr// and not //prefix=/usr/local// (for the sake of standardization)
To uninstall (only possible if the source directory was not deleted) execute the command [Warning: this will uninstall any pre-existing installations as well, from the same locations]:
Revision [5903]
Edited on 2010-02-28 09:13:29 by coolpupAdditions:
Executing the configure script will generate a valid Makefile script file within the source directory. The standard environment variables used are **[[http://www.gentoo.org/doc/en/gcc-optimization.xml CFLAGS]]="-mtune=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"** (only use //-pipe// if there is sufficient R.A.M.) and the standard configure options used are **--prefix=/usr --sysconfdir=/etc --localstatedir=/var**:
Deletions:
Revision [5900]
Edited on 2010-02-28 05:57:08 by coolpupAdditions:
If the configure script is not available (rare) then this should mean that the Makefile script file already exists. So edit it accordingly (for advanced users only) or execute the following:
Deletions:
Revision [5899]
Edited on 2010-02-28 05:55:10 by coolpupAdditions:
For Quirky the corresponding file would be [[http://distro.ibiblio.org/pub/linux/distributions/quirky/ quirky_devx_XXX.sfs]]
Deletions:
Revision [5898]
Edited on 2010-02-28 05:47:35 by coolpupAdditions:
If the configure script is not available (rare) then this should mean that the Makefile script file already exists. So edit it accordingly or execute the following: