There are these certain question bothering me and my friend.
Compiling changes to Sage is as simple as
sage -b
See the developer guide, though that is focused more on making patches. Compilation is successful if it says compilation was successful. If the file is just a Python file, it is copied and bytecode-compiled to a different directory (local/lib/python/site-packages/sage/
, I think); otherwise the Cython file is first translated to C, then compiled, then sent where it belongs.
Now, if you are interested in just happening to use the gcc in Sage, you would have to first know if it had actually been built (as opposed to using your system gcc), which only happens if gcc is "too old" or in some cases "too new", and then call that binary (I'm not exactly sure where it installs), and then do whatever you normally do.
If that is all a little vague, it's because your question is likewise vague; I'm sure someone will be happy to answer a followup. For instance, many people create new Cython files and use the notebook to profile them. See the Sage documentation for more about all of these things.