binutils-inst.xml 1.8 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).
  5. Therefore, if you have defined any environment variables that override
  6. default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
  7. or modifying them when building Binutils.</para>
  8. <para>It is recommended by the Binutils installation documentation to build
  9. Binutils outside of the source directory:</para>
  10. <para><screen><userinput>mkdir ../binutils-build
  11. cd ../binutils-build</userinput></screen></para>
  12. <para>Now prepare Binutils for compilation:</para>
  13. <para><screen><userinput>../binutils-&binutils-version;/configure \
  14. &nbsp;&nbsp;&nbsp;&nbsp;--prefix=/usr --enable-shared</userinput></screen></para>
  15. <para>Compile 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, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only
  20. build for our own system, we don't need this target specific directory in
  21. <filename>/usr</filename>. That setup would be used if the system was used to
  22. cross-compile (for example compiling a package on an Intel machine that
  23. generates code that can be executed on PowerPC machines).</para>
  24. <para>Test the results:</para>
  25. <para><screen><userinput>make check</userinput></screen></para>
  26. <para>Install the package:</para>
  27. <para><screen><userinput>make tooldir=/usr install</userinput></screen></para>
  28. <para>And remove a library that normally is not meant to be installed on its
  29. own:</para>
  30. <para><screen><userinput>rm /usr/lib/libiberty.a</userinput></screen></para>
  31. </sect2>