]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
Install libs to non-conflicting subdirs.
authorAntti Kantee <pooka@iki.fi>
Mon, 26 Oct 2015 02:55:16 +0000 (02:55 +0000)
committerAntti Kantee <pooka@iki.fi>
Mon, 26 Oct 2015 15:34:26 +0000 (15:34 +0000)
Platform-dependent libs go into lib/rumprun-platform-machine_arch
and platform-independent libs go into lib/rumprun-machine_arch.
(all libs are arch-dependent, naturally)

Allows xen and hw and various machine_arch installations
to coexist.

app-tools/specs-bake.in
app-tools/specs-compile_or_ferment.in
app-tools/specs-stub.in
build-rr.sh
platform/Makefile.inc

index 4f3586db781fa2f0df5ce5041e0516a1e84b088d..80484c6cc74668e04c8d7f817549ac1d5e41df4e 100644 (file)
@@ -5,7 +5,7 @@
 
 
 *lib:
-!LDFLAGS_BAKE! -L!DESTDIR!/lib                                         \
+!LDFLAGS_BAKE! -L!DESTDIR!/lib/rumprun-!PLATFORM!-!MACHINE_ARCH!       \
     --whole-archive -lrump --no-whole-archive                          \
     --start-group -lrumprun_base -lpthread -lc --end-group
 
index 36bfdbde6a113aaefaef98f4f4f7d8c07ebd7cbf..8dfdf3c57da4b1b56bf4f53634dda897bca9da1e 100644 (file)
@@ -18,7 +18,7 @@
 
 
 *lib:
--L!DESTDIR!/lib
+-L!DESTDIR!/lib/rumprun-!MACHINE_ARCH!
 
 *link:
 %{m64:-m elf_x86_64;mx32:-m elf32_x86_64;m32:-m elf_i386} %:remove-outfile(-lstdc++) %{rdynamic:}
index 1cf044140d9e4f0b261452df5632016887e5d0a5..62dddf988938af34d206e89f78c9956d4200ae6f 100644 (file)
@@ -5,7 +5,8 @@
 
 
 *lib:
--L!DESTDIR!/lib --start-group -lpthread -lc --end-group        \
+-L!DESTDIR!/lib/rumprun-!MACHINE_ARCH!         \
+    --start-group -lpthread -lc --end-group    \
     !DESTDIR!/lib/rumprun-pseudolinkstubs.o
 
 *link:
index cf178fe4ea0e203b13d96f96654817170cca4297..074cb9d48908db80d8c31321cccd8c07c2602082 100755 (executable)
@@ -308,6 +308,9 @@ buildrump ()
        MACHINE_ARCH=$(${RUMPMAKE} -f /dev/null -V '${MACHINE_ARCH}')
        [ -n "${MACHINE_ARCH}" ] || die could not figure out target machine arch
 
+       # this is slightly ridiculous
+       echo ${MACHINE_ARCH} > ${RROBJ}/.machine_arch
+
        TOOLTUPLE=$(${RUMPMAKE} -f bsd.own.mk \
            -V '${MACHINE_GNU_PLATFORM:S/--netbsd/-rumprun-netbsd/}')
 
@@ -425,6 +428,10 @@ dobuild ()
        . ${PLATFORMDIR}/platform.conf
 
        buildrump "$@"
+       mkdir -p ${STAGING}/lib/rumprun-${MACHINE_ARCH} \
+           || die cannot create libdir
+       mkdir -p ${STAGING}/lib/rumprun-${PLATFORM}-${MACHINE_ARCH} \
+           || die cannot create libdir
 
        ${MAKE} -C ${PLATFORMDIR} links
 
@@ -452,9 +459,29 @@ doinstall ()
 
        checkprevinst
 
+       MACHINE_ARCH=$(cat ${RROBJ}/.machine_arch)
+
        mkdir -p ${RRDEST} || die cannot create ${RRDEST}
        cp ${RROBJ}/.rumprun-installation ${RRDEST}/
-       ( cd ${STAGING} ; tar -cf - .) | (cd ${RRDEST} ; tar -xf -)
+       (
+               # first, move things to where we want them to be
+               cd ${STAGING}
+               rm -rf lib/pkgconfig
+               find lib -maxdepth 1 -name librump\*.a \
+                   -exec mv -f '{}' lib/rumprun-${PLATFORM}-${MACHINE_ARCH}/ \;
+               find lib -maxdepth 1 -name \*.a \
+                   -exec mv -f '{}' lib/rumprun-${MACHINE_ARCH}/ \;
+
+               # make sure special cases are visible everywhere
+               for x in c pthread ; do
+                       rm -f lib/rumprun-${PLATFORM}-${MACHINE_ARCH}/lib${x}.a
+                       set -x
+                       ln -s ../rumprun-${MACHINE_ARCH}/lib${x}.a \
+                           lib/rumprun-${PLATFORM}-${MACHINE_ARCH}/lib${x}.a
+               done
+
+               tar -cf - .
+       ) | (cd ${RRDEST} ; tar -xf -)
 }
 
 #
index 940ca345a9f547a0b5a44a0a021c60869fb2e7ff..4fe7c5e24c11050a2c27291a5a0c9b6c7cb52255 100644 (file)
@@ -10,8 +10,8 @@ INSTALLTGTS=  librumpkern_bmktc_install
 
 ifneq (${KERNONLY},true)
 TARGETS+=      userlibs
-INSTALLTGTS+=  librumprun_base_install librumprun_tester_install
-INSTALLTGTS+=  libunwind_install
+INSTALLTGTS+=  librumprun_base_install librumprun_tester_install2
+INSTALLTGTS+=  libunwind_install2
 endif
 
 ifeq (${BUILDRR},true)
@@ -37,7 +37,14 @@ $${RROBJLIB}/${1}/${1}.a:
 .PHONY: ${1}_install
 ${1}_install:
        ( cd $${RROBJLIB}/${1} && \
-           install -m 0444 ${1}.a $${INSTALLDIR}/lib )
+           install -m 0444 ${1}.a \
+             $${INSTALLDIR}/lib/rumprun-${PLATFORM}-${MACHINE_ARCH} )
+
+.PHONY: ${1}_install2
+${1}_install2:
+       ( cd $${RROBJLIB}/${1} && \
+           install -m 0444 ${1}.a \
+             $${INSTALLDIR}/lib/rumprun-${MACHINE_ARCH} )
 
 .PHONY: ${1}_clean
 ${1}_clean: