binutils-inst.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2><title>Installation of Binutils</title>
  3. <para>This package is known to behave badly when you have changed its
  4. default optimization flags (including the -march and -mcpu options). Binutils
  5. is best left alone. Therefore, if you have defined any environment variables
  6. that override default optimizations, such as CFLAGS and CXXFLAGS, we
  7. recommend unsetting or modifying them when building binutils. You have
  8. been warned.</para>
  9. <para>It is recommended by the Binutils installation documentation to build
  10. Binutils outside of the source directory. Create the build directory:</para>
  11. <para><screen><userinput>mkdir ../binutils-build &amp;&amp;
  12. cd ../binutils-build</userinput></screen></para>
  13. <para>Next, prepare Binutils to be compiled:</para>
  14. <para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr --enable-shared</userinput></screen></para>
  15. <para>Continue with compiling the package:</para>
  16. <para><screen><userinput>make tooldir=/usr</userinput></screen></para>
  17. <para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
  18. executables end up) is set to $(exec_prefix)/$(target_alias) which expands
  19. into, for example, /usr/i686-pc-linux-gnu. Since we only build for our
  20. own system, we don't need this target specific directory in /usr. That
  21. setup would be used if the system was used to cross-compile (for example
  22. compiling a package on the Intel machine that generates code that can be
  23. executed on Apple PowerPC machines).</para>
  24. <para>Install the package:</para>
  25. <para><screen><userinput>make tooldir=/usr install</userinput></screen></para>
  26. <para>Install the info pages:</para>
  27. <para><screen><userinput>make tooldir=/usr install-info</userinput></screen></para>
  28. <para>Some packages require the <emphasis>libiberty</emphasis> header
  29. in order to build. To honor those packages, install the file:</para>
  30. <para><screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para>
  31. </sect2>