Hi Kai !

tae hoo liteon777 at hanmail.net
Sun Nov 17 10:03:50 PST 2013


Hi Kai !

LLVM does generates incompatible with MS tool(case jmp table 
lable , seh lable
etc)

the problem is 'set directive'

do patch llvm, HasSetDirective from true to false.

<llvm/lib/MC/MCAsmInfo.cpp>

   GPRel64Directive = 0;
   GPRel32Directive = 0;
   GlobalDirective = "\t.globl\t";
   HasSetDirective = false;//true;      <---- this, line number 74,
   HasAggressiveSymbolFolding = true;
   COMMDirectiveAlignmentIsInBytes = true;
   LCOMMDirectiveAlignmentType = LCOMM::NoAlignment;



I used <git clone http://llvm.org/git/llvm.git llvm> version.

but final link error genarated.

which version is required for avoiding this phobos link problem?





> How do you avoid the link warnings? I opened bug PR17967  
> (http://llvm.org/bugs/show_bug.cgi?id=17967) because the 
> temporary labels are public!
>
>>
>> but at final link time, the following errors generated.
>>
>> D:\LDC\LDC64\lib>ldc2 test.d
>> phobos-ldc.lib(math.obj) : error LNK2019: unresolved external
>> symbol _D3std4math
>> 4exp2FNaNbNeeZe referenced in function 
>> _D3std4math3sinFNaNbNfcZc
>> phobos-ldc.lib(math.obj) : error LNK2019: unresolved external
>> symbol _D3std4math
>> 5expm1FNaNbNeeZe referenced in function 
>> _D3std4math3sinFNaNbNfcZc
>> phobos-ldc.lib(math.obj) : error LNK2019: unresolved external
>> symbol _D3std4math
>> 5atan2FNaNbNeeeZe referenced in function
>> _D3std4math4acosFNaNbNfeZe
>> phobos-ldc.lib(math.obj) : error LNK2019: unresolved external
>> symbol _D3std4math
>> 5truncFNbNeeZe referenced in function 
>> _D3std4math4modfFNbNeeKeZe
>> phobos-ldc.lib(math.obj) : error LNK2019: unresolved external
>> symbol _D3std4math
>> 20FloatingPointControl15setControlStateFNbNetZv referenced in
>> function _D3std4ma
>> th5roundFNbNeeZe
>> phobos-ldc.lib(thread.obj) : error LNK2019: unresolved external
>> symbol _D4core6t
>> hread14getStackBottomFZPv referenced in function 
>> thread_entryPoint
>> phobos-ldc.lib(thread.obj) : error LNK2019: unresolved external
>> symbol fiber_swi
>> tchContext referenced in function fiber_entryPoint
>> phobos-ldc.lib(threadaux.obj) : error LNK2019: unresolved
>> external symbol _D4cor
>> e3sys7windows9threadaux10thread_aux6getTEBFNbZPPv referenced in
>> function _D4core
>> 3sys7windows9threadaux10thread_aux18impersonate_threadFkMDFZvZv
>> test.exe : fatal error LNK1120: 8 unresolved externals
>> Error: C:\Program Files (x86)\Microsoft Visual Studio
>> 11.0\VC\BIN\x86_amd64\link
>> .exe failed with status: 1120
>>
>> it seems to be someting wrong at druntime & phobos library 
>> build
>> CMake file
>> which related with compilation.
>>
>> How to resolve it?
>
> No idea yet. I have to check it.
>
> Regards,
> Kai



More information about the digitalmars-d-ldc mailing list