Permalink
Browse files

Make it rumprun[-MACHINE_ARCH[-PLATFORM]]

That way MACHINE_ARCH (if it exists in the particular name),
is always in the same spot, and the same holds for PLATFORM.
  • Loading branch information...
1 parent de0ef55 commit b91405b714c6e8424cfeec21615f0c5342e0b6e2 @anttikantee anttikantee committed Oct 27, 2015
Showing with 16 additions and 16 deletions.
  1. +3 −3 app-tools/Makefile
  2. +3 −3 app-tools/specs-bake.in
  3. +5 −5 build-rr.sh
  4. +1 −1 global.mk
  5. +2 −2 platform/Makefile.inc
  6. +2 −2 tests/nolibc/Makefile
View
@@ -34,11 +34,11 @@ GENS= ${GENS.bin} ${GENS.files} ${GENS.specs}
app-tools: ${GENS}
include ../global.mk
-LDFLAGS_BAKE:= ${LDFLAGS.${PLATFORM}.${MACHINE_ARCH}}
+LDFLAGS_BAKE:= ${LDFLAGS.${MACHINE_ARCH}.${PLATFORM}}
BRSOURCEDIR:=$(dir ${AR})
-BRLIBEXECINST:= ${INSTALLDIR}/libexec/rumprun-${PLATFORM}-${MACHINE_ARCH}/
-BRLIBEXECDEST:= ${RRDEST}/libexec/rumprun-${PLATFORM}-${MACHINE_ARCH}/
+BRLIBEXECINST:= ${INSTALLDIR}/libexec/rumprun-${MACHINE_ARCH}-${PLATFORM}/
+BRLIBEXECDEST:= ${RRDEST}/libexec/rumprun-${MACHINE_ARCH}-${PLATFORM}/
LIBEXEC_CC:= $(subst ${BRSOURCEDIR},${BRLIBEXECDEST},${CC})
LIBEXEC_CXX:= $(subst ${BRSOURCEDIR},${BRLIBEXECDEST},${CXX})
@@ -1,16 +1,16 @@
*startfile:
-!DESTDIR!/lib/rumprun-!PLATFORM!-!MACHINE_ARCH!/rumprun.o
+!DESTDIR!/lib/rumprun-!MACHINE_ARCH!-!PLATFORM!/rumprun.o
*endfile:
*lib:
-!LDFLAGS_BAKE! -L!DESTDIR!/lib/rumprun-!PLATFORM!-!MACHINE_ARCH! \
+!LDFLAGS_BAKE! -L!DESTDIR!/lib/rumprun-!MACHINE_ARCH!-!PLATFORM! \
--whole-archive -lrump --no-whole-archive \
--start-group -lrumprun_base -lpthread -lc --end-group
*link:
-%{m64:-m elf_x86_64;mx32:-m elf32_x86_64;m32:-m elf_i386} -T !DESTDIR!/lib/rumprun-!PLATFORM!-!MACHINE_ARCH!.ldscript %:replace-outfile(-lstdc++ -lc++) %{rdynamic:}
+%{m64:-m elf_x86_64;mx32:-m elf32_x86_64;m32:-m elf_i386} -T !DESTDIR!/lib/rumprun-!MACHINE_ARCH!-!PLATFORM!.ldscript %:replace-outfile(-lstdc++ -lc++) %{rdynamic:}
%rename link_libgcc old_link_libgcc
View
@@ -239,7 +239,7 @@ setvars ()
MACHINE="${BUILDRUMP_MACHINE}"
if [ -z "${RROBJ}" ]; then
- RROBJ="./obj-${PLATFORM}-${MACHINE}${EXTSRC}"
+ RROBJ="./obj-${MACHINE}-${PLATFORM}${EXTSRC}"
${KERNONLY} && RROBJ="${RROBJ}-kernonly"
fi
STAGING="${RROBJ}/dest.stage"
@@ -406,7 +406,7 @@ dobuild ()
buildrump "$@"
mkdir -p ${STAGING}/lib/rumprun-${MACHINE_ARCH} \
|| die cannot create libdir
- mkdir -p ${STAGING}/lib/rumprun-${PLATFORM}-${MACHINE_ARCH} \
+ mkdir -p ${STAGING}/lib/rumprun-${MACHINE_ARCH}-${PLATFORM} \
|| die cannot create libdir
${MAKE} -C ${PLATFORMDIR} links
@@ -444,15 +444,15 @@ doinstall ()
cd ${STAGING}
rm -rf lib/pkgconfig
find lib -maxdepth 1 -name librump\*.a \
- -exec mv -f '{}' lib/rumprun-${PLATFORM}-${MACHINE_ARCH}/ \;
+ -exec mv -f '{}' lib/rumprun-${MACHINE_ARCH}-${PLATFORM}/ \;
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
+ rm -f lib/rumprun-${MACHINE_ARCH}-${PLATFORM}/lib${x}.a
ln -s ../rumprun-${MACHINE_ARCH}/lib${x}.a \
- lib/rumprun-${PLATFORM}-${MACHINE_ARCH}/lib${x}.a
+ lib/rumprun-${MACHINE_ARCH}-${PLATFORM}/lib${x}.a
done
find . -maxdepth 1 \! -path . \! -path ./include\* \
| xargs tar -cf -
View
@@ -16,7 +16,7 @@ ifndef NOGCCERROR
CFLAGS+= -Werror
endif
-LDFLAGS.hw.x86_64= -z max-page-size=0x1000
+LDFLAGS.x86_64.hw= -z max-page-size=0x1000
ifeq (${BUILDRR},true)
INSTALLDIR= ${RROBJ}/dest.stage
@@ -28,7 +28,7 @@ LIBDIR:= $(abspath ../../lib)
COMMONDIR:= $(abspath ../)
INSTALLDIR_LIBARCH:= ${INSTALLDIR}/lib/rumprun-${MACHINE_ARCH}
-INSTALLDIR_LIBPLAT:= ${INSTALLDIR}/lib/rumprun-${PLATFORM}-${MACHINE_ARCH}
+INSTALLDIR_LIBPLAT:= ${INSTALLDIR}/lib/rumprun-${MACHINE_ARCH}-${PLATFORM}
define BUILDLIB_target
.PHONY: $${RROBJLIB}/${1}/${1}.a
@@ -101,7 +101,7 @@ tests: ${MAINOBJ} commonlibs
.PHONY: installkern
installkern:
install -m 0444 ${MAINOBJ} ${INSTALLDIR_LIBPLAT}
- install -m 0444 ${LDSCRIPT} ${INSTALLDIR}/lib/rumprun-${PLATFORM}-${MACHINE_ARCH}.ldscript
+ install -m 0444 ${LDSCRIPT} ${INSTALLDIR}/lib/rumprun-${MACHINE_ARCH}-${PLATFORM}.ldscript
.PHONY: installuser
installuser:
@@ -3,15 +3,15 @@ include ${BUILDRUMP_TOOLFLAGS}
CFLAGS+= ${BUILDRUMP_TOOL_CFLAGS}
-LDFLAGS:= -L$(abspath ../../rumprun/lib/rumprun-${PLATFORM}-${MACHINE_ARCH})
+LDFLAGS:= -L$(abspath ../../rumprun/lib/rumprun-${MACHINE_ARCH}-${PLATFORM})
LDFLAGS+= -L${RROBJ}/lib/libcompiler_rt
CPPFLAGS+= -I../../include -I../../rumprun/include/rumprun
CPPFLAGS+= -I../../platform/${PLATFORM}/include
LDSCRIPT= ${RROBJ}/bmk.ldscript
-LDFLAGS+= ${LDFLAGS.${PLATFORM}.${MACHINE_ARCH}}
+LDFLAGS+= ${LDFLAGS.${MACHINE_ARCH}.${PLATFORM}}
OBJS= main.o ${RROBJ}/rumprun.o

0 comments on commit b91405b

Please sign in to comment.