Merge remote-tracking branch 'private/port-gcc-restart' into port-gcc-restart

This commit is contained in:
Giacomo Tesio 2019-12-27 19:52:01 +01:00
commit 611044fcc8
5 changed files with 11 additions and 6 deletions

View File

@ -153,12 +153,13 @@ echo done.
cp -pfr $JEHANNE/pkgs/binutils/2.33.1/posix/* $JEHANNE/posix cp -pfr $JEHANNE/pkgs/binutils/2.33.1/posix/* $JEHANNE/posix
rm $JEHANNE/posix/lib/*.la rm $JEHANNE/posix/lib/*.la
echo -n Building gcc (and libgcc)... | tee -a $LOG echo -n "Building gcc (and libgcc)..." | tee -a $LOG
( (
export GCC_BUILD_DIR=$JEHANNE_TOOLCHAIN/build/gcc-native && export GCC_BUILD_DIR=$JEHANNE_TOOLCHAIN/build/gcc-native &&
mkdir -p $GCC_BUILD_DIR && mkdir -p $GCC_BUILD_DIR &&
cd $GCC_BUILD_DIR && cd $GCC_BUILD_DIR &&
$JEHANNE_TOOLCHAIN/src/gcc/configure --host=x86_64-jehanne \ $JEHANNE_TOOLCHAIN/src/gcc/configure \
--build=x86_64-pc-linux-gnu --host=x86_64-jehanne --target=x86_64-jehanne \
--enable-languages=c,c++ \ --enable-languages=c,c++ \
--prefix=/posix --with-sysroot=/ --with-build-sysroot=$JEHANNE \ --prefix=/posix --with-sysroot=/ --with-build-sysroot=$JEHANNE \
--without-isl --with-gmp=$JEHANNE/posix --with-mpfr=$JEHANNE/posix --with-mpc=$JEHANNE/posix \ --without-isl --with-gmp=$JEHANNE/posix --with-mpfr=$JEHANNE/posix --with-mpc=$JEHANNE/posix \

View File

@ -11,6 +11,7 @@ index ddd3b8f..702aa59 100644
+ gnu_ld=yes + gnu_ld=yes
+ tmake_file=t-jehanne + tmake_file=t-jehanne
+ extra_objs="${extra_objs} jehanne.o" + extra_objs="${extra_objs} jehanne.o"
+ extra_gcc_objs="${extra_gcc_objs} jehanne.o"
+ default_use_cxa_atexit=yes + default_use_cxa_atexit=yes
+ case $target in + case $target in
+ x86_64-*) + x86_64-*)

View File

@ -21,9 +21,11 @@ extern "C" {
#include <libc.h> #include <libc.h>
#include <posix.h> #include <posix.h>
void __application_newlib_init(int argc, char *argv[]);
} }
void __attribute__((__used__)) void
__application_newlib_init(int argc, char *argv[]) __application_newlib_init(int argc, char *argv[])
{ {
sys_rfork(RFFDG | RFREND | RFNOTEG); sys_rfork(RFFDG | RFREND | RFNOTEG);

View File

@ -27,9 +27,10 @@ export MKSH=$CROSS_DIR/pkgs/mksh/
export MKSH_SRC=$MKSH/src/ export MKSH_SRC=$MKSH/src/
export MKSH_BUILD=$MKSH/out/ export MKSH_BUILD=$MKSH/out/
export MKSHRC_PATH='~/lib/mkshrc' export MKSHRC_PATH='~/lib/mkshrc'
export LIBS="-L$JEHANNE/posix/lib -lnewlibc -lnewlibm -lnewlibg -lposix" export LIBS=" -lm -lg"
export CPPFLAGS="-I$JEHANNE/posix/include '-DMKSHRC_PATH=\"$MKSHRC_PATH\"' '-DARCH=\"$ARCH\"'" export CPPFLAGS="'-DMKSHRC_PATH=\"$MKSHRC_PATH\"' '-DARCH=\"$ARCH\"'"
export PATH="$JEHANNE/hacking/cross/wrappers:$PATH"
export LD_PRELOAD= export LD_PRELOAD=
echo -n Building mksh. echo -n Building mksh.

View File

@ -64,7 +64,7 @@ if [ "$NEWLIB_OPTIMIZATION" = "" ]; then
fi fi
export CC=gcc export CC=gcc
export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION -std=gnu11 -I$JEHANNE_TOOLCHAIN/cross/posix/lib/gcc/x86_64-jehanne/9.2.0/include -Lposix" export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION -std=gnu11 -isystem$JEHANNE_TOOLCHAIN/cross/posix/lib/gcc/x86_64-jehanne/9.2.0/include -lposix"
( (
rm -fr $NEWLIB_BUILD && rm -fr $NEWLIB_BUILD &&