What does the "compiler option" -auxbase-strip do? - gcc

I just compiled code using the compiler option "-frecord-gcc-switches" to see which options the compiler selects automatically. Now I can see the options in section .GCC.command.line. There are several plausible compiler options but also one I cannot find any documentation about. What does -auxbase-strip png.o mean. Obviously it does something with png.o, but what does it do exactly?

Google search shows:
Hei Chan:
I am trying to find the document for auxbase and auxbase-strip,
but I can't find any.
Ian Lance Taylor:
They are internal options used to support the -fcompare-debug options.
They are not intended to be used by end users.
So, if you really want to know what this option does, you'll need to read GCC source (but you shouldn't care).

Related

Cannot find document for some gcc options. Is there any more complete gcc options index webpage?

I bookmarked a gcc options index webpage where I can search for options I encountered in various Makefiles. This is the link. But recently I noticed that more and more gcc options cannot be found in that webpage, for example, -fno-pie, -fno-strict-aliasing, -fno-omit-frame-pointer. If I really missed them by accident, please let me know. If not, are these gcc options deprecated? For example, is -fno-pie replaced with -no-pie? Is there any more complete gcc options index webpage? Thanks.
They are listed as fpie, fstrict-aliasing, and fomit-frame-pointer; the no- prefix just turns the flags off. As the page says at the top:
Where an option has both positive and negative forms (such as -foption and -fno-option), relevant entries in the manual are indexed under the most appropriate form; it may sometimes be useful to look up both forms.
None of the flags you mention are deprecated.

What do all of the "extra flags" variables stand for?

When compiling, and specifically at the ./configure stage, remembering that --extra-cflags stands for extra compiler allows me to remember that option helps me pass extra options to the compiler I'm using. I understand that options like these reference variables that are set in the MAKE file?, but I don't understand what the rest of them stand for.
For example, I know that --extra-ldflags passes extra flags to the linker, but I'm not sure what that extra d is doing there. The help for the configure that I am looking at also lists --extra-ldexeflags and --extra-ldsoflags. Searching provides information on what some of the above options do, but nothing on what they actually stand for, which is a crucial step for me in being able to recall what they do.

Documentation about compiler options for Swift

Hello, i want to start running some microbenchmarks on Apples Swift-language.
However i feel it is hard to find proper documentation for the different options in regards of compiler optimization.
I have read a lot of questions and articles about other peoples microbenchmarks of the language, however it would be nice to have some firm documentation on the subject.
In the latest beta, the ones to use seems to be:
-Onone
No optimizations
-O
Safe optimizations?
-Ounchecked (Replaced -Ofast)
Unsafe optimizations, (No checks for integer overflow, array out of bounds etc)
My question is, are these all my possible options? And does anybody have some resource that documents this?
EDIT:
I have found similar documention to the one i need about objective-c with gcc here:
https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_2.html section 2.8. This is what i need for Swift..

Turning off error message caret in GCC 4.8

GCC 4.8 seems to have added Clang-like error message display, e.g. like this:
player.c:725:9: warning: variable ‘delta’ set but not used [-Wunused-but-set-variable]
int delta, rdelta;
^
I guess some people find this useful, but I find it superfluous, and it makes every error message use three lines of screen-space instead of one, where more error messages could be displayed instead.
Is there any way to turn it off? I've been reading through the GCC documentation, but haven't found it yet, at least. In particular, is there a way to turn it off "by default", so that I don't have to specify some -fno-error-caret or similar option to everything I compile?
It seems I still had the GCC 4.7 documentation installed, so that's why I didn't find the -fno-diagnostics-show-caret option to turn it off.
However, that still doesn't answer the question of how to turn it off by default, so I'll keep this question unanswered for quite a while in case anyone has information on that.

Boost pretty print for GCC error messages

I'm using GCC 4.7.2. My code is rather heavy on template, STL and boost usage. When I compile and there is an error in some class or function that is derived from or uses some boost/STL functionality, I get error messages showing spectacularly hideous return types and/or function arguments for my classes/function.
My question:
Is there a prettyprint type of thing for GCC warnings/errors containing boost/STL types, so that the return types shown in error messages correspond to what I've typed in the code, or at least, become more intelligible?
I have briefly skimmed through this question, however, that is about GDB rather than GCC...
I've also come across this pretty printer in Haskell, but that just seems to add structure, not take away (mostly) unneeded detail...
Any other suggestions?
I asked a similar question, where someone suggested I try gccfilter. It's a Perl script that re-formats the output of g++ and colorizes it, shortens it, hides full pathnames, and lots more.
Actually, that suggestion answers this question really well too: it's capable of hiding unneeded detail and pretty-printing both STL and boost types. So: I'll leave this here as an answer too.
The only drawback I could see is that g++ needs to be called from within the script (i.e., piping to it is not possible at the time). I suspect that's easily fixed, and in any case, it's a relatively minor issue.
You could try STLfilt as mentioned in 'C++ Template Metaprogramming' by David Abrahms & Alesky Gurtovoy.
The book contains a chapter on template message diagnostics. It suggests using the STLFilt /showback:N to eliminate compiler backtrace material in order to get simplified output.

Resources