<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi John,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thank you for feedback!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I emailed with the other objects’ vendor, they confirmed they are using ‘PRES8’ within their objects.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Do you have other suggestion?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">BR,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Michelle<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> John Brawn [mailto:John.Brawn@arm.com]
<br>
<b>Sent:</b> 2017</span><span style="font-size:11.0pt;font-family:宋体">年</span><span lang="EN-US" style="font-size:11.0pt">2</span><span style="font-size:11.0pt;font-family:宋体">月</span><span lang="EN-US" style="font-size:11.0pt">7</span><span style="font-size:11.0pt;font-family:宋体">日</span><span lang="EN-US" style="font-size:11.0pt">
 20:35<br>
<b>To:</b> Michelle Gu (micgu) <mgu@nds.com><br>
<b>Cc:</b> Alon Shaltiel (ashaltie) <ashaltie@cisco.com>; cfe-dev@lists.llvm.org; nd <nd@arm.com><br>
<b>Subject:</b> RE: Clang compiling needs help<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">That error looks like an armlink error, and there’s some documentation for it here:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0807g/dom1365073159742.html">http://infocenter.arm.com/help/topic/com.arm.doc.dui0807g/dom1365073159742.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Clang always emits objects with the PRES8 (preserves 8-byte stack alignment) and REQ8 (requires<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">8-byte stack alignment) attributes, so it looks like the error is coming from objects that haven’t<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">been built with clang (I’m guessing that’s the “other source code in ARM” you mention).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Probably you need to look these other objects and how they’re built  in order to resolve this.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">John<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> cfe-dev [<a href="mailto:cfe-dev-bounces@lists.llvm.org">mailto:cfe-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>Michelle Gu (micgu) via cfe-dev<br>
<b>Sent:</b> 07 February 2017 08:25<br>
<b>To:</b> <a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<b>Cc:</b> Alon Shaltiel (ashaltie)<br>
<b>Subject:</b> [cfe-dev] Clang compiling needs help<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Dear Clang Experts,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m a Clang user. I met some problem during using Clang. Would you please help to give any suggestion?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m using Clang to compile a lib. The generated lib file will be linked to other source code in other compile environment.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">One target of the final image is ARM and the other is MIPS.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When compile the lib for ARM, we use the options as below:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">ARCH_OPTS=-target arm-none-eabi -mcpu=arm926ej-s<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">LLC_ARCH_OPTS="-mtriple armv5-none-none-eabi -mattr=+v5te"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">AR=/usr/bin/ar<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">ARFLAGS=-rv<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We got the lib successfully. But when linked to other source code in ARM, we got the error as below:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><img border="0" width="1178" height="106" id="Picture_x0020_1" src="cid:image001.png@01D28383.3342DCA0"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Do you have any idea of the error “invalid call from ‘~PRE8’”? Should I make some change when compile the lib with CLANG?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When compile the lib for MIPS, we use the options as below:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">ARCH_OPTS=-target mipsel
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">CFLAGS=-c -fno-pic -mabicalls -integrated-as  <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We got the lib successfully. But when linked to other source code in MIPS, we got the error as below:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_clzsi2.o): warning: linking abicalls files with non-abicalls files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_fixunsdfsi.o): warning: linking abicalls files with non-abicalls files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_pack_df.o): warning: linking abicalls files with non-abicalls files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_unpack_df.o): warning: linking abicalls files with non-abicalls files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_fpcmp_parts_df.o): warning: linking abicalls files with non-abicalls file<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">s<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_ge_df.o): warning: linking abicalls files with non-abicalls files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">gcc.a(_df_to_si.o): warning: linking abicalls files with non-abicalls files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">make[2]: *** [/cygdrive/d/RDA/Projects/QW300/soft/build/8851m_dbs_rdamodem_qj/_d<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">efault_/8809/8851m_dbs_rdamodem_qj_debug.elf] Error 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">make[1]: *** [/cygdrive/d/RDA/Projects/QW300/soft/build/8851m_dbs_rdamodem_qj/_d<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">efault_/8809/8851m_dbs_rdamodem_qj_debug.srec] Error 2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">make: *** [lod] Error 2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black">Do you have any idea about the warnings? How about the errors?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black">I’m not familiar with Clang, but if not use Clang, the linking is successful. So we hope we can get some help from you, the experts of CLANG.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black">Thank you in advance!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black">BR,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black">Michelle<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>