patches/ltrace/0.5.3/150-allow-configurable-arch.patch
author Kalle Kankare <kalle.kankare@vincit.fi>
Fri Dec 03 12:36:44 2010 +0100 (2010-12-03)
changeset 2216 81b4c0efa46f
permissions -rw-r--r--
complibs/libelf: use host compiler

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.
jocke@1685
     1
This patch is to ensure the proper ARCH is selected when cross compiling.  Make
jocke@1685
     2
sure to call the configure script with, e.g., HOST=arm ./configure to select 
jocke@1685
     3
the arm sysdeps.
jocke@1685
     4
jocke@1685
     5
	Joachim Nilsson <jocke@vmlinux.org>
jocke@1685
     6
jocke@1685
     7
diff -ru ltrace-0.5.3.orig/configure ltrace-0.5.3/configure
jocke@1685
     8
--- ltrace-0.5.3.orig/configure	2010-01-02 11:05:55.000000000 +0100
jocke@1685
     9
+++ ltrace-0.5.3/configure	2010-01-02 20:49:11.000000000 +0100
jocke@1685
    10
@@ -110,7 +110,7 @@
jocke@1685
    11
 #
jocke@1685
    12
 # Makefile.in -> Makefile
jocke@1685
    13
 #
jocke@1685
    14
-x_subst_vars='PACKAGE_VERSION HOST_OS INSTALL CC CPPFLAGS CFLAGS LDFLAGS LIBS iquote iquoteend prefix sysconfdir mandir docdir'
jocke@1685
    15
+x_subst_vars='PACKAGE_VERSION HOST HOST_OS INSTALL CC CPPFLAGS CFLAGS LDFLAGS LIBS iquote iquoteend prefix sysconfdir mandir docdir'
jocke@1685
    16
 
jocke@1685
    17
 for i in $x_subst_vars
jocke@1685
    18
 do
jocke@1685
    19
Only in ltrace-0.5.3: configure~
jocke@1685
    20
diff -ru ltrace-0.5.3.orig/Makefile.in ltrace-0.5.3/Makefile.in
jocke@1685
    21
--- ltrace-0.5.3.orig/Makefile.in	2010-01-02 11:05:55.000000000 +0100
jocke@1685
    22
+++ ltrace-0.5.3/Makefile.in	2010-01-03 01:28:41.000000000 +0100
jocke@1685
    23
@@ -1,10 +1,12 @@
jocke@1685
    24
 #
jocke@1685
    25
 # ltrace's Makefile.in
jocke@1685
    26
 #
jocke@1685
    27
-
jocke@1685
    28
+MY_TARGET       = @HOST@
jocke@1685
    29
+ifdef MY_TARGET
jocke@1685
    30
+ARCH            = $(MY_TARGET)
jocke@1685
    31
+endif
jocke@1685
    32
 #OS		:= $(shell uname -s)
jocke@1685
    33
 OS		:= @HOST_OS@
jocke@1685
    34
-
jocke@1685
    35
 TOPDIR		= $(shell pwd)
jocke@1685
    36
 
jocke@1685
    37
 prefix		= @prefix@
jocke@1685
    38
Only in ltrace-0.5.3: Makefile.in~
jocke@1685
    39
diff -ru ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.3/sysdeps/linux-gnu/Makefile
jocke@1685
    40
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile	2010-01-02 11:05:55.000000000 +0100
jocke@1685
    41
+++ ltrace-0.5.3/sysdeps/linux-gnu/Makefile	2010-01-02 20:49:51.000000000 +0100
jocke@1685
    42
@@ -1,4 +1,4 @@
jocke@1685
    43
-ARCH		:=	$(shell uname -m | sed \
jocke@1685
    44
+ARCH		?=	$(shell uname -m | sed \
jocke@1685
    45
 				-e s/i.86/i386/ \
jocke@1685
    46
 				-e s/sun4u/sparc64/ \
jocke@1685
    47
 				-e s/sparc64/sparc/ \
jocke@1685
    48
Only in ltrace-0.5.3/sysdeps/linux-gnu: Makefile~