| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 | <sect1 id="ch-system-binutils" xreflabel="Binutils"><title>Installing Binutils-&binutils-version;</title><?dbhtml filename="binutils.html" dir="chapter06"?><para>The Binutils package contains a linker, an assembler, and other tools forhandling object files.</para><screen>&buildtime; &binutils-time;&diskspace; &binutils-compsize;</screen>&aa-binutils-down;&aa-binutils-dep;<sect2><title> </title><para> </para></sect2><sect2><title>Installation of Binutils</title><para>Now is an appropriate time to verify that your pseudo terminals (PTYs) areworking properly inside the chroot environment. We will again quickly check thateverything is set up correctly by performing a simple test:</para><screen><userinput>expect -c "spawn ls"</userinput></screen><para>If you receive the message:</para><blockquote><screen>The system has no more ptys.  Ask your system administrator to create more.</screen></blockquote><para>Your chroot environment is not set up for proper PTY operation. In thiscase there is no point in running the test suites for Binutils and GCC until youare able to resolve the issue. Please refer back to <xref linkend="ch-system-proc"/>and the <xref linkend="ch-system-MAKEDEV"/> section and perform the recommended stepsto fix the problem.</para><para>This package is known to behave badly when you have changed itsdefault optimization flags (including the -march and -mcpu options).Therefore, if you have defined any environment variables that overridedefault optimizations, such as CFLAGS and CXXFLAGS, we recommend unsettingor modifying them when building Binutils.</para><para>The Binutils documentation recommends building Binutils outside of thesource directory in a dedicated build directory:</para><screen><userinput>mkdir ../binutils-buildcd ../binutils-build</userinput></screen><para>Now prepare Binutils for compilation:</para><screen><userinput>../&binutils-dir;/configure \    --prefix=/usr --enable-shared</userinput></screen><para>Compile the package:</para><screen><userinput>make tooldir=/usr</userinput></screen><para>Normally, the <emphasis>tooldir</emphasis> (the directory where theexecutables end up) is set to $(exec_prefix)/$(target_alias), which expandsinto, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we onlybuild for our own system, we don't need this target specific directory in<filename>/usr</filename>. That setup would be used if the system was used tocross-compile (for example compiling a package on an Intel machine thatgenerates code that can be executed on PowerPC machines).</para><important><para>The test suite for Binutils in this section is considered<emphasis>critical</emphasis>. Our advice is to not skip it under anycircumstances.</para></important><para>Test the results:</para><screen><userinput>make check</userinput></screen><para>The test suite notes from <xref linkend="ch-tools-binutils-pass2"/> are stillvery much appropriate here. Be sure to refer back there should you have anydoubts.</para><para>Install the package:</para><screen><userinput>make tooldir=/usr install</userinput></screen><para>Install the <emphasis>libiberty</emphasis> header file that is needed bysome packages:</para><screen><userinput>cp ../&binutils-dir;/include/libiberty.h /usr/include</userinput></screen></sect2>&aa-binutils-shortdesc;&aa-binutils-desc;</sect1>
 |