[LLVMdev] Build process ignores BUILD_CC?
Eric Christopher
echristo at gmail.com
Wed Mar 19 14:50:38 PDT 2014
Odd, it might be worth doing some more looking. At any rate, canadian
crosses are honestly a fairly newish thing for the build system to
handle so hiccups are likely.
-eric
On Wed, Mar 19, 2014 at 2:48 PM, Frank Winter <fwinter at jlab.org> wrote:
> I applied the patch and tried again.. it didn't work.
>
> However, if I modify the patch to pass on the variables to the configure
> script, like
>
> $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
> --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \
> --disable-polly CC=$(CC) CXX=$(CXX) AR=$(AR) AS=$(AS)
> LD=$(LD) $$configure_opts; \
>
> then it works.
>
> Looks like (at least) my system doesn't load the variables automatically.
>
> It should be safe to include these additional changes. But I am not 100%
> sure.
>
> Frank
>
>
>
> On 03/19/2014 05:08 PM, Eric Christopher wrote:
>>
>> Meador posted a (quite old) patch yesterday that does this. I'll
>> follow up in that thread.
>>
>> -eric
>>
>> On Wed, Mar 19, 2014 at 2:01 PM, Frank Winter <fwinter at jlab.org> wrote:
>>>
>>> Hi,
>>>
>>> I am still struggling to cross-compile LLVM (using trunk).
>>>
>>> My cross compiler builds code that cannot be run on the
>>> build host. Thus, I need to make use of BUILD_CC/CXX during
>>> configuration.
>>>
>>> My current setup is (heavily boiled down):
>>>
>>> ../configure CC=cc_cross CXX=cxx_cross BUILD_CC=cc_host
>>> BUILD_CXX=cxx_host (plus other flag stuff)
>>>
>>> The configuration runs fine. However, when calling 'make' it
>>> would construct the BuildTools in a way that doesn't pick
>>> up the host compilers:
>>>
>>> make
>>> llvm[0]: Constructing LLVMBuild project information.
>>>
>>> Looking into BuildTools/config.log I see a mere:
>>>
>>> ../configure --build=.. --host=.. --target=.. --disable-polly
>>>
>>> Configuration fails of course, because it picks up the
>>> host gcc which in my case has no C++11 support. Thus the
>>> whole thing fails.
>>>
>>> Am I right in thinking that in the BuildTools/ project it
>>> would be the right thing to do to copy the BUILD_* variables
>>> from the configuration as
>>>
>>> BUILD_CC -> CC
>>> BUILD_CXX -> CXX
>>> (dito for the flags)?
>>>
>>> If that's the case, then non of this is happening.
>>>
>>> Thanks for your thoughts,
>>> Frank
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
More information about the llvm-dev
mailing list