This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
[PATCH] libelf to use host compiler
- From: Kalle Kankare <kalle dot kankare at vincit dot fi>
- To: yann dot morin dot 1998 at anciens dot enib dot fr
- Cc: crossgcc at sourceware dot org
- Date: Fri, 03 Dec 2010 13:36:44 +0200
- Subject: [PATCH] libelf to use host compiler
Hi,
It appears, that the configure scripts of libelf versions 0.8.13 and
0.8.12 do not honour the --host option. The compiler must be given as an
environment variable or the process will use the command "gcc" as the
compiler.
It seems that this is already done in the function do_libelf_target in
scripts/build/companion_libs/libelf.sh, but not in function do_libelf.
Here is a patch for using the CT_HOST compiler when compiling libelf:
diff -Naur crosstool-ng-1.9.0/scripts/build/companion_libs/libelf.sh
crosstool-ng-1.9.0-modified/scripts/build/companion_libs/libelf.sh
--- crosstool-ng-1.9.0/scripts/build/companion_libs/libelf.sh 2010-11-03
20:11:24.000000000 +0200
+++ crosstool-ng-1.9.0-modified/scripts/build/companion_libs/libelf.sh
2010-12-03 11:10:51.000000000 +0200
@@ -36,6 +36,7 @@
libelf_opts+=( --disable-shared --enable-static )
fi
+ CC="${CT_HOST}-gcc" \
CT_DoExecLog CFG \
"${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
--build=${CT_BUILD} \
--
For unsubscribe information see http://sourceware.org/lists.html#faq