Merge branch 'port-gcc-restart' of https://bitbucket.org/tesio/jehanne-utilities into port-gcc-restart

This commit is contained in:
Giacomo Tesio 2019-11-28 23:13:56 +01:00
commit b4b4b24bcd
2 changed files with 5 additions and 6 deletions

View File

@ -27,8 +27,8 @@ export MKSH=$CROSS_DIR/pkgs/mksh/
export MKSH_SRC=$MKSH/src/
export MKSH_BUILD=$MKSH/out/
export MKSHRC_PATH='~/lib/mkshrc'
export LIBS="$JEHANNE/posix/lib/libc.a $JEHANNE/posix/lib/libm.a $JEHANNE/posix/lib/libg.a -lposix -lc"
export CPPFLAGS="'-DMKSHRC_PATH=\"$MKSHRC_PATH\"' '-DARCH=\"$ARCH\"'"
export LIBS="-L$JEHANNE/posix/lib -lnewlibc -lnewlibm -lnewlibg -lposix"
export CPPFLAGS="-I$JEHANNE/posix/include '-DMKSHRC_PATH=\"$MKSHRC_PATH\"' '-DARCH=\"$ARCH\"'"
export LD_PRELOAD=

View File

@ -69,9 +69,7 @@ fi
export CC=gcc
# NOTE: we use -O0 because apparently vsprintf functions do not
# work with -O2.
export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION -std=gnu11"
export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION -std=gnu11 -Lposix"
(
rm -fr $NEWLIB_BUILD &&
@ -89,9 +87,10 @@ export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION -std=gnu11"
failOnError $? "building newlib"
# emultate bind for the cross compiler
mkdir -p $JEHANNE/posix
cp -fr $JEHANNE/pkgs/newlib/x86_64-jehanne/* $JEHANNE/posix
# rename libc to libnewlibc to avoid name clash with Jehanne libc
# rename libc to libnewlibc to avoid name clash with Jehanne's libc
mv $JEHANNE/posix/lib/libc.a $JEHANNE/posix/lib/libnewlibc.a
mv $JEHANNE/posix/lib/libm.a $JEHANNE/posix/lib/libnewlibm.a
mv $JEHANNE/posix/lib/libg.a $JEHANNE/posix/lib/libnewlibg.a