binutils-inst.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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>CFLAGS="-O2 -pipe" \
  14. &nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
  15. &nbsp;&nbsp;&nbsp;&nbsp;--prefix=/usr --mandir=/usr/share/man \
  16. &nbsp;&nbsp;&nbsp;&nbsp;--infodir=/usr/share/info --enable-shared</userinput></screen></para>
  17. <para>Continue with compiling the package:</para>
  18. <para><screen><userinput>make LDFLAGS="-s"</userinput></screen></para>
  19. <para><screen><userinput>make -k check</userinput></screen></para>
  20. <para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
  21. executables end up) is set to $(exec_prefix)/$(target_alias) which expands
  22. into, for example, /usr/i686-pc-linux-gnu. Since we only build for our
  23. own system, we don't need this target specific directory in /usr. That
  24. setup would be used if the system was used to cross-compile (for example
  25. compiling a package on the Intel machine that generates code that can be
  26. executed on Apple PowerPC machines).</para>
  27. <para>Install the package:</para>
  28. <para><screen><userinput>make install</userinput></screen></para>
  29. <para><screen><userinput>rm /usr/lib/libiberty.a</userinput></screen></para>
  30. </sect2>