27 lines
759 B
Bash
Executable File
27 lines
759 B
Bash
Executable File
#!/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 -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
|