Hi Waldemar, On Tue, Nov 7, 2017 at 9:57 PM, Waldemar Brodkorb <w...@openadk.org> wrote: >> I'm trying to build a canadian cross compiler with build == x86_64-linux, >> host == xtensa-linux and target == xtensa-linux. I need to specify an >> xtensa-specific flag in CFLAGS that will be applied to the host binary. > > I think you are trying to build a cross-native, see > http://crosstool-ng.github.io/docs/toolchain-types/ > > Canadian-Cross is something like building a GCC compiler on Linux/x86_64, > which runs on Cygwin/x86_64 and compiles code for Linux/ppc.
Yes, I just thought that "cross-native" is the local ct-ng name, and in general this configuration is not special. >> I put this flag into CFLAGS and CXXFLAGS. The first question: is that >> the right place for it? > > No, it seems not. > The right thing to do is to set CC/CXX in the configure step and > append your specific CFLAGS/CXXFLAGS to it. Ok, thanks for the confirmation. I did the same thing by making a wrapper that calls cross-compiler with these specific options. Using that I was able to build working cross-native toolchain with ct-ng. -- Thanks. -- Max