binutils-inst.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 &amp;&amp;
  11. cd ../binutils-build</userinput></screen></para>
  12. <para>Next, prepare Binutils to be compiled:</para>
  13. <para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr --enable-shared</userinput></screen></para>
  14. <para>Continue with compiling the package:</para>
  15. <para><screen><userinput>make tooldir=/usr</userinput></screen></para>
  16. <para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
  17. executables end up) is set to $(exec_prefix)/$(target_alias) which expands
  18. into, for example, /usr/i686-pc-linux-gnu. Since we only build for our
  19. own system, we don't need this target specific directory in /usr. That
  20. setup would be used if the system was used to cross-compile (for example
  21. compiling a package on the Intel machine that generates code that can be
  22. executed on Apple PowerPC machines).</para>
  23. <para>Install the package:</para>
  24. <para><screen><userinput>make tooldir=/usr install</userinput></screen></para>
  25. <para>Install the info pages:</para>
  26. <para><screen><userinput>make tooldir=/usr install-info</userinput></screen></para>
  27. <para>Some packages require the <emphasis>libiberty</emphasis> header
  28. in order to build. To honor those packages, install the file:</para>
  29. <para><screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para>
  30. </sect2>