newlib: build.sh: copy output libraries to /posix and rename for easier linking

This commit is contained in:
Giacomo Tesio 2019-11-19 00:24:34 +01:00
parent 292ecd4f19
commit 3f3f02c9dd
1 changed files with 9 additions and 0 deletions

View File

@ -88,6 +88,15 @@ export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION -std=gnu11"
) >> $NEWLIB/newlib.build.log 2>&1
failOnError $? "building newlib"
# emultate bind for the cross compiler
cp -fr $JEHANNE/pkgs/newlib/x86_64-jehanne/* $JEHANNE/posix
# rename libc to libnewlibc to avoid name clash with Jehanne libc
mv $JEHANNE/posix/lib/libc.a $JEHANNEposix/lib/libnewlibc.a
mv $JEHANNE/posix/lib/libm.a $JEHANNEposix/lib/libnewlibm.a
mv $JEHANNE/posix/lib/libg.a $JEHANNEposix/lib/libnewlibg.a
kill $dotter
wait $dotter 2>/dev/null