Bug#850150: freemat ftbfs with LLVM 3.9

Gianfranco Costamagna locutusofborg at debian.org
Tue Jan 10 07:32:46 UTC 2017


control: clone -1 -2
control: block -1 by -2
control: retitle -2 llvm-toolchain-3.9 make some reverse-dependencies FTBFS on i386
control: reassign -2 src:llvm-toolchain-3.9
control: found -2 1:3.9.1-1
control: tags -2 patch

On Wed, 4 Jan 2017 16:14:03 +0200 Graham Inggs <ginggs at debian.org> wrote:
> Hi
> 
> The attached updated fix-llvm-build.patch fixes the build almost 
> everywhere by adding LLVMCoverage to OPTIONAL_LIBS.
> 
> The build now fails on i386 with the following:
> 
> In file included from 
> /usr/lib/llvm-3.9/include/llvm/Target/TargetOptions.h:20:0,
>                   from 
> /usr/lib/llvm-3.9/include/llvm/Target/TargetMachine.h:22,
>                   from 
> /usr/lib/llvm-3.9/include/llvm/ExecutionEngine/ExecutionEngine.h:28,
>                   from 
> /<<BUILDDIR>>/freemat-4.2+dfsg1/libs/libMatC/CJitFuncClang.hpp:8,
>                   from 
> /<<BUILDDIR>>/freemat-4.2+dfsg1/libs/libMatC/JITFactory.cpp:2:
> /usr/lib/llvm-3.9/include/llvm/MC/MCAsmInfo.h:39:6: error: expected 
> identifier before ‘,’ token
>     X86,     /// Windows x86, uses no CFI, just EH tables
>        ^
> /usr/lib/llvm-3.9/include/llvm/MC/MCAsmInfo.h: In member function ‘bool 
> llvm::MCAsmInfo::usesWindowsCFI() const’:
> /usr/lib/llvm-3.9/include/llvm/MC/MCAsmInfo.h:555:58: error: expected 
> unqualified-id before ‘)’ token
>               WinEHEncodingType != WinEH::EncodingType::X86);
>                                                            ^
> 
> Regards
> Graham
> 

as already said, this seems to be a regression in llvm-toolchain-3.9, somewhere that X86 is already defined
and clashing with the definition.
s/X86/x86 works, even if I don't know exactly the implications of that code (seems to be some windows-only define
FWICS)

the patch is here:
-- llvm-toolchain-3.9-3.9.1.orig/include/llvm/MC/MCAsmInfo.h
+++ llvm-toolchain-3.9-3.9.1/include/llvm/MC/MCAsmInfo.h
@@ -36,7 +36,7 @@ enum class EncodingType {
   ARM,     /// Windows NT (Windows on ARM)
   CE,      /// Windows CE ARM, PowerPC, SH3, SH4
   Itanium, /// Windows x64, Windows Itanium (IA-64)
-  X86,     /// Windows x86, uses no CFI, just EH tables
+  x86,     /// Windows x86, uses no CFI, just EH tables
   MIPS = Alpha,
 };
 }
@@ -552,7 +552,7 @@ public:
   bool usesWindowsCFI() const {
     return ExceptionsType == ExceptionHandling::WinEH &&
            (WinEHEncodingType != WinEH::EncodingType::Invalid &&
-            WinEHEncodingType != WinEH::EncodingType::X86);
+            WinEHEncodingType != WinEH::EncodingType::x86);
   }
 
   bool doesDwarfUseRelocationsAcrossSections() const {
--- llvm-toolchain-3.9-3.9.1.orig/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ llvm-toolchain-3.9-3.9.1/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -278,7 +278,7 @@ bool AsmPrinter::doInitialization(Module
     default: llvm_unreachable("unsupported unwinding information encoding");
     case WinEH::EncodingType::Invalid:
       break;
-    case WinEH::EncodingType::X86:
+    case WinEH::EncodingType::x86:
     case WinEH::EncodingType::Itanium:
       ES = new WinException(this);
       break;
--- llvm-toolchain-3.9-3.9.1.orig/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
+++ llvm-toolchain-3.9-3.9.1/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
@@ -136,7 +136,7 @@ X86MCAsmInfoMicrosoft::X86MCAsmInfoMicro
     // 32-bit X86 doesn't use CFI, so this isn't a real encoding type. It's just
     // a place holder that the Windows EHStreamer looks for to suppress CFI
     // output. In particular, usesWindowsCFI() returns false.
-    WinEHEncodingType = WinEH::EncodingType::X86;
+    WinEHEncodingType = WinEH::EncodingType::x86;
   }
 
   ExceptionsType = ExceptionHandling::WinEH;

G.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20170110/4b42e020/attachment-0001.sig>


More information about the debian-science-maintainers mailing list