wiki1183: UsingWhatYouBuilt (Version 3) |
Using What You Built#Where are the Binaries?#Once you have pulled down the source and then built it you will have binaries in two different locations:
So if we use the process manager (procnto) for the x86 CPU architecture as an example, it will be located in both
Both of these binaries are identical and can be used in a system, the difference is that binaries are not moved from the source tree to the stage directory until a make install is performed. The stage directories will also contain additional files for libraries that are symbolic links (or copies if running under Windows) of generic libraries to their versioned names (ie libc.so will link to libc.so.2). Using the Binaries#Depending on how your system is configured, you can make use of any of the built binaries in your system by:
By default the binaries produced by the build system are not stripped, this is a post-processing step performed by the QNX distribution. In order to reduce the binary size, you can use the nto<ARCH>-strip command on the binaries. C:\thomasf\stage\x86\bin>ls -ld %QNX_TARGET%/x86/bin/pidin -rwx------ 1 ThomasF mkpasswd 45100 May 5 2004 C:/QNX630/target/qnx6/x86/bin/pidin C:\thomasf\stage\x86\bin>ls -ld pidin -rwxrwxrwx 1 ThomasF mkpasswd 67533 Jul 16 20:58 pidin C:\thomasf\stage\x86\bin>ntox86-strip ./pidin C:\thomasf\spartan\td-scripts\trunk-stage\x86\bin>ls -ld pidin -rwxrwxrwx 1 ThomasF mkpasswd 52128 Aug 26 15:06 pidin Identifying Custom Built Binaries from QNX Built Binaries#During the build process, binaries are stamped with basic information regarding the environment in which they were built. This information can be displayed by the use command: % use -i $QNX_TARGET/x86/bin/pidin NAME=pidin DESCRIPTION=Display system statistics DATE=2004/04/29-21:46:13-UTC STATE=Stable HOST=osbld USER=osbuild VERSION=6.3.0 TAGID=193 % use -i $BUILD_ROOT/stage/x86/bin/pidin C:\thomasf\spartan\td-scripts\trunk-stage\x86\bin>use -i ./pidin NAME=pidin DESCRIPTION=Display system statistics DATE=2007/07/16-20:58:06-EDT STATE=Experimental HOST=thomasf-laptop USER=ThomasF VERSION=5 |