<div dir="ltr">Use the flags "-x assembler-with-cpp" to force clang to think it needs preprocessing.  That should work with gcc.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 10:42 PM, ÂÞÓ¸Õ(Yonggang Luo) <span dir="ltr"><<a href="mailto:luoyonggang@gmail.com" target="_blank">luoyonggang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">2013/10/23 Rafael Esp¨ªndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> Sorry for the  unclear statements, I didn't means the assembler to mangle<br>
> symbols declared in assembly source files, I means directly use assembly<br>
> directive to choice which symbol should be used. The compiler just need to<br>
> follow the directive.<br>
> For example, in assembly files, there is a directive<br>
> <a href="https://sourceware.org/binutils/docs-2.23.1/as/If.html#If" target="_blank">https://sourceware.org/binutils/docs-2.23.1/as/If.html#If</a><br>
> to act like C macro #ifdef #if, so i wanna to know how to use this directive<br>
> to detect if it's target to x86/win32. if that's true, then I can control<br>
> which code to be generate.<br>
>><br>
<br>
<br>
</div>I don't think there is anything in plain .s files. In .S files you can<br>
use any of the C predefined macros, in particular,<br>
__USER_LABEL_PREFIX__ might be what you want.<br></blockquote></div></div><div>Thanks, Rafael, this is acceptable if GCC/binutils also support for this, I want to keep compatible with GCC/binutils,</div><div>besides, is there any command option to force use C predefined macros? because use .S is too tricky.</div>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><div class="im"><br><br clear="all"><div><br></div>-- <br>         ´ËÖÂ<br>Àñ<br>ÂÞÓ¸Õ<br>Yours<br>    sincerely,<br>Yonggang Luo<br>
</div></div></div>
</blockquote></div><br></div>