send2vinnie / mclinker

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

Cross-configure cannot work on MCLinker #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
* What steps will reproduce the problem?
CC=ndk-standalone-x86-4.7/bin/i686-linux-android-gcc 
CXX=ndk-standalone-x86-4.7/bin/i686-linux-android-g++ $mclinker/configure 
--with-llvm-config=$llvm/bin/llvm-config --enable-targets=x86 
--host=i686-linux-android

* What is the expected output? What do you see instead?
LLVM works in cross configuration, but MCLinker cannot.

configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... Invalid configuration `i686-linux-android': system 
`android' not recognized
configure: error: /bin/sh ../mclinker/scripts/config.sub i686-linux-android 
failed

Note: Here's the LLVM configure command:
CC=ndk-standalone-x86-4.8/bin/i686-linux-android-gcc 
CXX=ndk-standalone-x86-4.8/bin/i686-linux-android-g++ $llvm/configure 
--enable-targets=x86 --host=i686-linux-android

* What version of the product are you using? On what operating system?
Linux 2.6.32-45-generic #104-Ubuntu SMP Tue Feb 19 21:20:09 UTC 2013 x86_64 
GNU/Linux

* Please provide any additional information below.

Hi guys, I have two question.
First, MCLinker cannot use cross-configure to build on-device binary?
Second, if we can, how to use --with-llvm-config, since the llvm-config is a 
cross-tool, cannot run on our build machine.

Could MCLinker provides cross-configure approach?
Thanks!

Original issue reported on code.google.com by wenhan...@gmail.com on 7 May 2013 at 2:19

GoogleCodeExporter commented 9 years ago
BTW, I'm using trunk.

(The label at left side is wrong)

Original comment by wenhan...@gmail.com on 7 May 2013 at 2:21

GoogleCodeExporter commented 9 years ago
Hi, Wen-Han,

Do you seriously want to build MCLinker and LLVM on Android host?
--host means the machine you build MCLinker and LLVM on. I guess you prefer 
linux rather than android. If I'm wrong, please kindly correct me.

With best regards, Luba.

Original comment by LubaTang on 7 May 2013 at 2:31

GoogleCodeExporter commented 9 years ago
This issue is out-of-date, and we have met this requirement already.

Original comment by wenhan...@gmail.com on 24 Dec 2013 at 4:46

GoogleCodeExporter commented 9 years ago
Sorry, my fault. We haven't met this requirement yet.

Original comment by wenhan...@gmail.com on 24 Dec 2013 at 4:50

GoogleCodeExporter commented 9 years ago
The root cause of this is because config.sub on BUILD computer is too old. 
(2009)

This is updated frequently by GNU project. LLVM uses it directly.
I suggest we can follow this.
http://savannah.gnu.org/projects/config (2013)

We can make it as part of our project (take away from .gitignore).
Note that this has already implemented within Android repo, and it is feasible.
I think it is the time to upstream it since now I'm working on building system 
part.
https://android-review.googlesource.com/#/c/59011/

Also, I want to upstream some patches which are general but only exists in 
external repo.
For example: 
https://android-review.googlesource.com/#/c/59381/1/m4/mcld-target.m4

Any idea? If not, I will do this right now.
Thanks!

Original comment by wenhan...@gmail.com on 25 Dec 2013 at 11:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 546c140d5ab3.

Original comment by wenhan...@gmail.com on 26 Dec 2013 at 1:24