Skip to content

Conversation

Matthew-Beliveau
Copy link

Hello,

I've added documentation on Building GCC from source, as well as a page for useful aliases and scripts that would be used frequently during development. Let me know if anything should be changed or added!

Thank you,
Matthew Beliveau

@@ -0,0 +1,255 @@
Aliases and Scripts
===================

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you split out aliases-and-scripts into a separate pull request, please.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW the aliases and scripts material seems less universal to me, more your personal setup. My feeling is that it makes more sense as an appendix compared to the other material.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

GCC has a script called ``configure`` inside the source directory at
``~/gcc/configure``. Calling by itself will enable every option by default.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really "enable every option by default" ? IIRC it picks defaults for every option, which is somewhat different.

--disable-libcc1 --disable-libstdcxx-pch --disable-libssp --disable-isl \
--disable-libmpx --disable-libsanitizer --disable-libquadmath \
--disable-libatomic

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to configure with "--enable-valgrind-annotations", but that may be just me

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I also like to set a --prefix for where the built gcc should be installed to, setting it to a sibling directory of the build directory, so that it can be installed without needing sudo.

messages to console when compiling. The ``-Iinclude`` option lets you
compile code that contains ``#include``'s when using
either ``cc1`` or ``cc1plus``.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than invoke cc1plus directly, I tend to use "./xgcc" and "./xg++"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants