[PATCH] libelf to use host compiler

Kalle Kankare kalle.kankare@vincit.fi
Fri Dec 3 11:38:00 GMT 2010


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



More information about the crossgcc mailing list