gcc native: created cross/native.sh (and wrappers) to build libstdc++, binutils and gcc (still broken)

This commit is contained in:
2019-12-13 01:12:08 +01:00
parent f3c2a947f7
commit f706eca22b
4 changed files with 264 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/bin/sh
ARGS="$@"
REPONAME=`basename $JEHANNE`
WORKING_DIR=`dirname $JEHANNE`
WORKING_DIR="$WORKING_DIR/$REPONAME.TOOLCHAIN"
if [ -z "$WRAPPER_LOG" ]; then
WRAPPER_LOG="$JEHANNE/hacking/cross/pkgs/gcc/wrappers.log"
fi
echo >> $WRAPPER_LOG
echo >> $WRAPPER_LOG
if echo $ARGS|grep -e '\.cpp\b' -e '\b\-o\b' -e ' -o ' > /dev/null; then
TOINCLUDE="-I$JEHANNE/posix/x86_64-jehanne/include/c++/9.2.0/ -I$JEHANNE/posix/x86_64-jehanne/include/c++/9.2.0/x86_64-jehanne -I$JEHANNE/posix/include -I$JEHANNE/sys/include/apw -I$JEHANNE/sys/include -I$JEHANNE/arch/amd64/include"
TOLINK="-L$JEHANNE/posix/lib -L$JEHANNE/arch/amd64/lib -lnewlibc -lposix -lc"
date --rfc-3339="ns" |tee -a $WRAPPER_LOG
export >> $WRAPPER_LOG
echo $WORKING_DIR/cross/posix/bin/x86_64-jehanne-g++ "$@" $TOINCLUDE $TOLINK >> $WRAPPER_LOG
exec $WORKING_DIR/cross/posix/bin/x86_64-jehanne-g++ "$@" $TOINCLUDE $TOLINK
else
date --rfc-3339="ns" >> $WRAPPER_LOG
export >> $WRAPPER_LOG
echo $WORKING_DIR/cross/posix/bin/x86_64-jehanne-g++ "$@" >> $WRAPPER_LOG
exec $WORKING_DIR/cross/posix/bin/x86_64-jehanne-g++ "$@"
fi

View File

@ -0,0 +1,27 @@
#!/bin/sh
ARGS="$@"
REPONAME=`basename $JEHANNE`
WORKING_DIR=`dirname $JEHANNE`
WORKING_DIR="$WORKING_DIR/$REPONAME.TOOLCHAIN"
if [ -z "$WRAPPER_LOG" ]; then
WRAPPER_LOG="$WORKING_DIR/wrappers.log"
fi
echo >> $WRAPPER_LOG
echo >> $WRAPPER_LOG
if echo $ARGS|grep -e '\.c\b' -e '\b\-o\b' -e ' -o ' > /dev/null; then
TOINCLUDE="-I$JEHANNE/posix/include -I$JEHANNE/sys/include/apw -I$JEHANNE/sys/include -I$JEHANNE/arch/amd64/include"
TOLINK="-L$JEHANNE/posix/lib -L$JEHANNE/arch/amd64/lib -lnewlibc -lposix -lc"
date --rfc-3339="ns" |tee -a $WRAPPER_LOG
export >> $WRAPPER_LOG
echo $WORKING_DIR/cross/posix/bin/x86_64-jehanne-gcc "$@" $TOINCLUDE $TOLINK >> $WRAPPER_LOG
exec $WORKING_DIR/cross/posix/bin/x86_64-jehanne-gcc "$@" $TOINCLUDE $TOLINK
else
date --rfc-3339="ns" >> $WRAPPER_LOG
export >> $WRAPPER_LOG
echo $WORKING_DIR/cross/posix/bin/x86_64-jehanne-gcc "$@" >> $WRAPPER_LOG
exec $WORKING_DIR/cross/posix/bin/x86_64-jehanne-gcc "$@"
fi

View File

@ -0,0 +1,26 @@
#!/bin/sh
ARGS="$@"
REPONAME=`basename $JEHANNE`
WORKING_DIR=`dirname $JEHANNE`
WORKING_DIR="$WORKING_DIR/$REPONAME.TOOLCHAIN"
if [ -z "$WRAPPER_LOG" ]; then
WRAPPER_LOG="$WORKING_DIR/wrappers.log"
fi
echo >> $WRAPPER_LOG
echo >> $WRAPPER_LOG
if echo $ARGS|grep -e '\b\-o\b' -e ' -o ' > /dev/null; then
TOLINK="-L$JEHANNE/posix/lib -L$JEHANNE/arch/amd64/lib -lnewlibc -lposix -lc"
date --rfc-3339="ns" |tee -a $WRAPPER_LOG
export >> $WRAPPER_LOG
echo $WORKING_DIR/cross/posix/bin/x86_64-jehanne-ld "$@" $TOLINK >> $WRAPPER_LOG
exec $WORKING_DIR/cross/posix/bin/x86_64-jehanne-ld "$@" $TOLINK
else
date --rfc-3339="ns" >> $WRAPPER_LOG
export >> $WRAPPER_LOG
echo $WORKING_DIR/cross/posix/bin/x86_64-jehanne-ld "$@" >> $WRAPPER_LOG
exec $WORKING_DIR/cross/posix/bin/x86_64-jehanne-ld "$@"
fi