From 7adb228fd47dcde5f518c9c67afcdef15f575c03 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Tue, 26 Apr 2011 23:55:55 +0200 Subject: [PATCH] add mips support 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 Signed-off-by: Nils Carlson --- Makefile.am | 2 +- configure.ac | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6957f07d..9e165467 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@.*\@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 bebc1ab5..8ca32ff5 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) -- 2.34.1