| From f77482f0618f954de1d080599ada058e9a3c24ff Mon Sep 17 00:00:00 2001 |
| From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
| Date: Tue, 28 Jul 2009 09:59:41 +0000 |
| Subject: Fix compilation of host tools in cross-compilation case |
| |
| At 36e9f0d351afbf7fd2595990b2d39e7c551f6420, a fix was added to use |
| the host gcc instead of the target gcc when cross-compiling |
| libXt. This fix works, but is not solve the whole problem: the CFLAGS |
| and LDFLAGS used with the host compilers are the one defined for the |
| target compiler (and the flags for both compilers might be very |
| different). |
| |
| This new fix let libXt obey to CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD |
| environment variables, and use them to compile the host tools in |
| util/. |
| |
| Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
| --- |
| diff --git a/configure.ac b/configure.ac |
| index 043ab5f..cb00a41 100755 |
| --- a/configure.ac |
| +++ b/configure.ac |
| @@ -48,6 +48,10 @@ if test x"$CC_FOR_BUILD" = x; then |
| fi |
| fi |
| AC_SUBST([CC_FOR_BUILD]) |
| +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} |
| +AC_SUBST(CFLAGS_FOR_BUILD) |
| +LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} |
| +AC_SUBST(LDFLAGS_FOR_BUILD) |
| |
| PKG_CHECK_MODULES(XT, sm x11 xproto kbproto) |
| |
| diff --git a/util/Makefile.am b/util/Makefile.am |
| index 0d3ff01..37b78d2 100644 |
| --- a/util/Makefile.am |
| +++ b/util/Makefile.am |
| @@ -5,6 +5,8 @@ noinst_PROGRAMS = makestrs |
| endif |
| |
| CC = @CC_FOR_BUILD@ |
| +CFLAGS = @CFLAGS_FOR_BUILD@ |
| +LDFLAGS = @LDFLAGS_FOR_BUILD@ |
| |
| EXTRA_DIST = \ |
| Shell.ht \ |
| -- |
| cgit v0.8.2 |