This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See crosstool-NG for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Yann, all. Someone recently spotted that the crosstool-NG based Linaro builds took twice as long to compile code than the Ubuntu cross compiler. The thread starts here: http://lists.linaro.org/pipermail/linaro-toolchain/2012-October/002907.html and continues at: http://lists.linaro.org/pipermail/linaro-toolchain/2012-November/002922.html http://lists.linaro.org/pipermail/linaro-toolchain/2012-November/002932.html It turns out that GCC and the libraries are being built without optimisation. scripts/crosstool-NG.sh.in has: CT_CFLAGS_FOR_HOST= [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_FLAGS_FOR_HOST}" Setting USE_PIPES or EXTRA_FLAGS turns into passing CFLAGS to configure turns into overriding the package default of -O2 -g. This is my hack around: scripts: set default CFLAGS to optimise. Our extra CFLAGS override the product defaults, meaning that we build without optimisation or debug. Be explicit and add these in. diff: === modified file 'scripts/crosstool-NG.sh.in' --- scripts/crosstool-NG.sh.in 2012-03-23 05:22:58 +0000 +++ scripts/crosstool-NG.sh.in 2012-11-13 23:50:41 +0000 @@ -488,7 +488,7 @@ fi # Help gcc - CT_CFLAGS_FOR_HOST= + CT_CFLAGS_FOR_HOST="-O2 -g" [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_FLAGS_FOR_HOST}" -- Michael -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |