* [ltt-dev] [UST PATCH 1/2] add mips support
@ 2011-04-26 21:55 Jason Wessel
2011-04-26 21:55 ` [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes Jason Wessel
2011-04-28 13:33 ` [ltt-dev] [UST PATCH 1/2] add mips support Nils Carlson
0 siblings, 2 replies; 5+ messages in thread
From: Jason Wessel @ 2011-04-26 21:55 UTC (permalink / raw)
The recent changes to UST make it trivial to add MIPS support.
The trick for MIPS is that there are many different library formats
and the gcc 4.x compiler will correctly choose the default one so long
as the libust.ldscript.in does not not make a reference to the library
format.
Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
---
Makefile.am | 2 +-
configure.ac | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 6957f07..9e16546 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,7 +16,7 @@ ldscripts_DATA = libust.so libust-initializer.o
CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po
libust.so: libust.ldscript.in
- $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@
+ $(SED) -e $(if $(LIBFORMAT),"s@\@FORMAT\@@$(LIBFORMAT)@","s at .*\@FORMAT\@.*@@") < $< > $@
# It is very important to compile the initializer with PIC otherwise we
# may get obscure errors when linking to shared libraries.
diff --git a/configure.ac b/configure.ac
index bebc1ab..8ca32ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,6 +109,7 @@ changequote([,])dnl
s390) LIBFORMAT="elf32-s390" ;;
s390x) LIBFORMAT="elf64-s390" ;;
arm) LIBFORMAT="elf32-littlearm" ;;
+ mips*) LIBFORMAT="" ;;
*) AC_MSG_ERROR([unable to detect library format (unsupported architecture ($host_cpu)?)]) ;;
esac
AC_SUBST(LIBFORMAT)
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes
2011-04-26 21:55 [ltt-dev] [UST PATCH 1/2] add mips support Jason Wessel
@ 2011-04-26 21:55 ` Jason Wessel
2011-04-27 14:23 ` Yannick Brosseau
2011-04-28 13:33 ` Nils Carlson
2011-04-28 13:33 ` [ltt-dev] [UST PATCH 1/2] add mips support Nils Carlson
1 sibling, 2 replies; 5+ messages in thread
From: Jason Wessel @ 2011-04-26 21:55 UTC (permalink / raw)
When cross building the fork and malloc tests, the programs do not end
up in .libs because the cross libtool does not put non-librarys in the
.libs directory.
Example error:
Output of './fork/../../usttrace -L -f ./fork/../fork/.libs/fork ./fork/../fork/.libs/fork2':
./fork/../../usttrace: line 199: ./fork/../fork/.libs/fork: No such file or directory
This patch allows the binaries to be found in an alternate location so
the tests can start correctly.
Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
---
tests/fork/fork.sh | 6 +++++-
.../test-libustinstr-malloc.sh | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/tests/fork/fork.sh b/tests/fork/fork.sh
index 631c9d5..e9be3b7 100755
--- a/tests/fork/fork.sh
+++ b/tests/fork/fork.sh
@@ -27,7 +27,11 @@ starttest "fork()/exec() test"
plan_tests 8
USTTRACE="$TESTDIR/../usttrace"
-okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
+if [ -f $TESTDIR/fork/fork ] ; then
+ okx $USTTRACE -L -f $TESTDIR/fork/fork $TESTDIR/fork/fork2
+else
+ okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
+fi
trace_loc=$($USTTRACE -W)
trace_matches -N "before_fork" "^ust.before_fork:" $trace_loc
trace_matches -N "after_fork_parent" "^ust.after_fork_parent:" $trace_loc
diff --git a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
index 04ed64d..0dcb523 100755
--- a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
+++ b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
@@ -27,7 +27,11 @@ starttest "libustinstr-malloc"
plan_tests 3
USTTRACE="$TESTDIR/../usttrace"
-okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
+if [ -f $TESTDIR/test-libustinstr-malloc/prog ] ; then
+ okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/prog
+else
+ okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
+fi
trace_loc=$($USTTRACE -W)
trace_matches -N "libustinstr-malloc - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
check_trace_logs "$trace_loc"
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes
2011-04-26 21:55 ` [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes Jason Wessel
@ 2011-04-27 14:23 ` Yannick Brosseau
2011-04-28 13:33 ` Nils Carlson
1 sibling, 0 replies; 5+ messages in thread
From: Yannick Brosseau @ 2011-04-27 14:23 UTC (permalink / raw)
It might be possible to detect the right path in the configure script.
I'll have a look into that.
Yannick
On 2011-04-26 17:55, Jason Wessel wrote:
> When cross building the fork and malloc tests, the programs do not end
> up in .libs because the cross libtool does not put non-librarys in the
> .libs directory.
>
> Example error:
>
> Output of './fork/../../usttrace -L -f ./fork/../fork/.libs/fork ./fork/../fork/.libs/fork2':
> ./fork/../../usttrace: line 199: ./fork/../fork/.libs/fork: No such file or directory
>
> This patch allows the binaries to be found in an alternate location so
> the tests can start correctly.
>
> Signed-off-by: Jason Wessel<jason.wessel at windriver.com>
> ---
> tests/fork/fork.sh | 6 +++++-
> .../test-libustinstr-malloc.sh | 6 +++++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fork/fork.sh b/tests/fork/fork.sh
> index 631c9d5..e9be3b7 100755
> --- a/tests/fork/fork.sh
> +++ b/tests/fork/fork.sh
> @@ -27,7 +27,11 @@ starttest "fork()/exec() test"
> plan_tests 8
> USTTRACE="$TESTDIR/../usttrace"
>
> -okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
> +if [ -f $TESTDIR/fork/fork ] ; then
> + okx $USTTRACE -L -f $TESTDIR/fork/fork $TESTDIR/fork/fork2
> +else
> + okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
> +fi
> trace_loc=$($USTTRACE -W)
> trace_matches -N "before_fork" "^ust.before_fork:" $trace_loc
> trace_matches -N "after_fork_parent" "^ust.after_fork_parent:" $trace_loc
> diff --git a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> index 04ed64d..0dcb523 100755
> --- a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> +++ b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> @@ -27,7 +27,11 @@ starttest "libustinstr-malloc"
> plan_tests 3
> USTTRACE="$TESTDIR/../usttrace"
>
> -okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
> +if [ -f $TESTDIR/test-libustinstr-malloc/prog ] ; then
> + okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/prog
> +else
> + okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
> +fi
> trace_loc=$($USTTRACE -W)
> trace_matches -N "libustinstr-malloc - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
> check_trace_logs "$trace_loc"
>
^ permalink raw reply [flat|nested] 5+ messages in thread* [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes
2011-04-26 21:55 ` [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes Jason Wessel
2011-04-27 14:23 ` Yannick Brosseau
@ 2011-04-28 13:33 ` Nils Carlson
1 sibling, 0 replies; 5+ messages in thread
From: Nils Carlson @ 2011-04-28 13:33 UTC (permalink / raw)
Yannick, any luck?
/Nils
On Tue, 26 Apr 2011, Jason Wessel wrote:
> When cross building the fork and malloc tests, the programs do not end
> up in .libs because the cross libtool does not put non-librarys in the
> .libs directory.
>
> Example error:
>
> Output of './fork/../../usttrace -L -f ./fork/../fork/.libs/fork ./fork/../fork/.libs/fork2':
> ./fork/../../usttrace: line 199: ./fork/../fork/.libs/fork: No such file or directory
>
> This patch allows the binaries to be found in an alternate location so
> the tests can start correctly.
>
> Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
> ---
> tests/fork/fork.sh | 6 +++++-
> .../test-libustinstr-malloc.sh | 6 +++++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fork/fork.sh b/tests/fork/fork.sh
> index 631c9d5..e9be3b7 100755
> --- a/tests/fork/fork.sh
> +++ b/tests/fork/fork.sh
> @@ -27,7 +27,11 @@ starttest "fork()/exec() test"
> plan_tests 8
> USTTRACE="$TESTDIR/../usttrace"
>
> -okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
> +if [ -f $TESTDIR/fork/fork ] ; then
> + okx $USTTRACE -L -f $TESTDIR/fork/fork $TESTDIR/fork/fork2
> +else
> + okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
> +fi
> trace_loc=$($USTTRACE -W)
> trace_matches -N "before_fork" "^ust.before_fork:" $trace_loc
> trace_matches -N "after_fork_parent" "^ust.after_fork_parent:" $trace_loc
> diff --git a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> index 04ed64d..0dcb523 100755
> --- a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> +++ b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> @@ -27,7 +27,11 @@ starttest "libustinstr-malloc"
> plan_tests 3
> USTTRACE="$TESTDIR/../usttrace"
>
> -okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
> +if [ -f $TESTDIR/test-libustinstr-malloc/prog ] ; then
> + okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/prog
> +else
> + okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
> +fi
> trace_loc=$($USTTRACE -W)
> trace_matches -N "libustinstr-malloc - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
> check_trace_logs "$trace_loc"
> --
> 1.7.1
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ltt-dev] [UST PATCH 1/2] add mips support
2011-04-26 21:55 [ltt-dev] [UST PATCH 1/2] add mips support Jason Wessel
2011-04-26 21:55 ` [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes Jason Wessel
@ 2011-04-28 13:33 ` Nils Carlson
1 sibling, 0 replies; 5+ messages in thread
From: Nils Carlson @ 2011-04-28 13:33 UTC (permalink / raw)
merged, but not tested by me in the least... :-/ Maybe time to order some
mips hardware.
/Nils
On Tue, 26 Apr 2011, Jason Wessel wrote:
> The recent changes to UST make it trivial to add MIPS support.
>
> The trick for MIPS is that there are many different library formats
> and the gcc 4.x compiler will correctly choose the default one so long
> as the libust.ldscript.in does not not make a reference to the library
> format.
>
> Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
> ---
> Makefile.am | 2 +-
> configure.ac | 1 +
> 2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 6957f07..9e16546 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -16,7 +16,7 @@ ldscripts_DATA = libust.so libust-initializer.o
> CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po
>
> libust.so: libust.ldscript.in
> - $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@
> + $(SED) -e $(if $(LIBFORMAT),"s@\@FORMAT\@@$(LIBFORMAT)@","s at .*\@FORMAT\@.*@@") < $< > $@
>
> # It is very important to compile the initializer with PIC otherwise we
> # may get obscure errors when linking to shared libraries.
> diff --git a/configure.ac b/configure.ac
> index bebc1ab..8ca32ff 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -109,6 +109,7 @@ changequote([,])dnl
> s390) LIBFORMAT="elf32-s390" ;;
> s390x) LIBFORMAT="elf64-s390" ;;
> arm) LIBFORMAT="elf32-littlearm" ;;
> + mips*) LIBFORMAT="" ;;
> *) AC_MSG_ERROR([unable to detect library format (unsupported architecture ($host_cpu)?)]) ;;
> esac
> AC_SUBST(LIBFORMAT)
> --
> 1.7.1
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-28 13:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 21:55 [ltt-dev] [UST PATCH 1/2] add mips support Jason Wessel
2011-04-26 21:55 ` [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes Jason Wessel
2011-04-27 14:23 ` Yannick Brosseau
2011-04-28 13:33 ` Nils Carlson
2011-04-28 13:33 ` [ltt-dev] [UST PATCH 1/2] add mips support Nils Carlson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox