<div>Hi Pritam,</div><div> </div><div>You can use -frecord-gcc-switches. </div><div>This switch causes the command line that was used to invoke the compiler to be recorded into the object file that is being created.</div><div>
 </div><div>$ gcc -O2 -frecord-gcc-switches -g -o test test.c</div><div><a href="mailto:pravin@pravin-VirtualBox:/tmp$">$</a> readelf -p .GCC.command.line test</div><div>String dump of section &#39;.GCC.command.line&#39;:<br>
  [     0]  test.c<br>  [     7]  -D_FORTIFY_SOURCE=2<br>  [    1b]  -mtune=generic<br>  [    2a]  -march=i686<br>  [    36]  -g<br>  [    39]  -O2<br>  [    3d]  -frecord-gcc-switches<br>  [    53]  <a href="mailto:-fstack-protectorpravin@pravin-VirtualBox:/tmp$">-fstack-protector</a></div>
<a href="mailto:-fstack-protectorpravin@pravin-VirtualBox:/tmp$"><div>$</div><div>$ readelf --debug-dump test</div><div> </div><div></div></a><div>checkout the  <strong>.debug_info</strong> section of readelf output.</div>
<div> </div><div> </div><div>Thanks &amp; Regards,</div><div>        PraviN <br><br></div><div> </div><div class="gmail_quote">On Thu, Aug 23, 2012 at 7:50 PM, Mulyadi Santosa <span dir="ltr">&lt;<a href="mailto:mulyadi.santosa@gmail.com" target="_blank">mulyadi.santosa@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">Hi..<br>
<div class="im"><br>
On Thu, Aug 23, 2012 at 4:37 PM, Pritam Bankar<br>
&lt;<a href="mailto:pritambankar1988@gmail.com">pritambankar1988@gmail.com</a>&gt; wrote:<br>
&gt; How to know default flags used in specific gcc version ? I am looking<br>
&gt; for difference between 3.4.3 and 4.1.1 These two have some difference<br>
&gt; regarding -nosse option but how can I find this ?<br>
<br>
</div>try something like:<br>
echo &quot;&quot; | gcc -E -v - 2&gt;&amp;1 | grep -i cc<br>
<br>
and find the line like below:<br>
<br>
/usr/lib/gcc/i686-linux-gnu/4.6/cc1 -E -quiet -v -imultilib .<br>
-imultiarch i386-linux-gnu - -mtune=generic -march=i686<br>
-fstack-protector<br>
<br>
(that&#39;s mine on Core Duo, Linux Mint 13 32 bit)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
regards,<br>
<br>
Mulyadi Santosa<br>
Freelance Linux trainer and consultant<br>
<br>
blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanks &amp; Regards,<b><br>---------PraviN---------</b><br><br><br>