berkus / mclinker

Automatically exported from code.google.com/p/mclinker
Other
0 stars 0 forks source link

Packaging #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all,

I'm packaging mclinker to Fedora, this is just a try and I failed with some 
errors.

Note I used llvm from our repo, we don't allow llvm from other places.

First "yum install llvm llvm-devel" to install llvm-config.

Then I "./configure --with-llvm-config=%{_bindir}/llvm-config #--disable-static 
&& make -j3"

Error log attached.

llvm version is 3.3.

Original issue reported on code.google.com by Cickumqt on 7 Jul 2013 at 5:19

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for your trying. I found in my Fedora 18, LLVM library is different from 
the upstream. I add some patches in this thread for Fedora 18 environment. You 
can add this patch in %prep section of rpm spec.

However, if you have the authorization to modify LLVM package, the best 
solution may be add this two functions in llvm/Support/Host.h

39a40,43
>   isLittleEndianHost() { return IsLittleEndianHost; }
> 
>   isBigEndianHost()    { return IsLittleBigHost; }
> 

==
In LLVM rpm, llvm/Support/Host:

#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
  static const bool IsBigEndianHost = true;
#else
  static const bool IsBigEndianHost = false;
#endif
----------------------
However, in LLVM repository:
  inline bool isLittleEndianHost() {
    union {
      int i;
      char c;
    };
    i = 1;
    return c;
  }

  inline bool isBigEndianHost() {
    return !isLittleEndianHost();
  }

Original comment by LubaTang on 8 Jul 2013 at 3:40

Attachments:

GoogleCodeExporter commented 9 years ago
Should be fixed in commit a22a53bef00e86f7582484cb514ef93947103e0c.

Original comment by pete.c...@gmail.com on 9 Jul 2013 at 9:10

GoogleCodeExporter commented 9 years ago
Fedora works on version 2.4, not the upstream.

Original comment by LubaTang on 10 Jul 2013 at 8:16

GoogleCodeExporter commented 9 years ago
The appended patches targets:
 * Fedora 18 x86_64
 * LLVM 3.3
 * MCLinker 2.4

Original comment by LubaTang on 10 Jul 2013 at 9:22

Attachments: