This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make Stap compatible with Android


On Wed, May 2, 2018 at 2:25 PM, Alexander Lochmann
<info@alexander-lochmann.de> wrote:
>> Have you tried downloading elfutils source from
>> https://sourceware.org/elfutils/ and using the
>> --with-elfutils=ELFUTILS_SRC_DIR systemtap configure option?
>>
> Yes, I tried it. The --host option is not passed to the elfutils
> configure script. The elfutils are build for the host architecture,
> e.g., x86_64 in my case.

OK, here's an (untested) patch that tries to pass along the --host
option to the elfutils configure. Give this a shot and let me know how
it works when you get a chance.

-- 
David Smith
Associate Manager
Red Hat
diff --git a/configure b/configure
index db066fefa..cc50c16b1 100755
--- a/configure
+++ b/configure
@@ -12376,6 +12376,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   else
 	need_maintainer_option="--enable-maintainer-mode"
   fi
+  if test "x$host_alias" != x; then
+	host_option="--host=${host_alias}"
+  else
+	host_option=""
+  fi
   (mkdir -p build-elfutils && cd build-elfutils &&
    bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \
 				--includedir="${here}/include-elfutils" \
@@ -12384,6 +12389,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 				--prefix="$prefix" \
 				--enable-dwz \
 				${need_maintainer_option} \
+				${host_option} \
 				CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag -fexceptions" \
 				LDFLAGS="$LDFLAGS $elfutils_rpath" &&
    if test -f ${elfutils_srcdir}/config/version.h.in; then
diff --git a/configure.ac b/configure.ac
index 9cd64af7f..ca041f14f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -836,6 +836,11 @@ if test $build_elfutils = yes -a $enable_translator = yes; then
   else
 	need_maintainer_option="--enable-maintainer-mode"
   fi
+  if test "x$host_alias" != x; then
+	host_option="--host=${host_alias}"
+  else
+	host_option=""
+  fi
   (mkdir -p build-elfutils && cd build-elfutils &&
    bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \
 				--includedir="${here}/include-elfutils" \
@@ -844,6 +849,7 @@ if test $build_elfutils = yes -a $enable_translator = yes; then
 				--prefix="$prefix" \
 				--enable-dwz \
 				${need_maintainer_option} \
+				${host_option} \
 				CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag -fexceptions" \
 				LDFLAGS="$LDFLAGS $elfutils_rpath" &&
    if test -f ${elfutils_srcdir}/config/version.h.in; then

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]