Build process ignores BUILD_CC?

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

Meador posted a (quite old) patch yesterday that does this. I'll
follow up in that thread.

-eric

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

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