Separate assembly source by build flavour.

This commit is contained in:
David Brown 2016-07-19 20:38:41 +01:00
parent 359aa1c43f
commit 0349189479
8 changed files with 20 additions and 12 deletions

View file

@ -4,7 +4,7 @@
echo --- Confidence test $(basename $PWD) --- echo --- Confidence test $(basename $PWD) ---
if which cygpath >/dev/null if which cygpath >/dev/null 2>/dev/null
then export PATH="$(cygpath "$1")/bin":$PATH then export PATH="$(cygpath "$1")/bin":$PATH
else export PATH="$1/bin":$PATH else export PATH="$1/bin":$PATH
fi fi
@ -19,6 +19,8 @@ rm -f *.o *.obj *.exe *.sym *.c *.h result
# corresponding assembly file will overwrite the previous. I # corresponding assembly file will overwrite the previous. I
# cannot see any way to overcome this short of using -S # cannot see any way to overcome this short of using -S
# on the voc command and calling 'as' explicitly. # on the voc command and calling 'as' explicitly.
if [ $COMPILER=gcc ] # NOTE 2: The cygwin 64 bit build has relocation errors with
# these assembly generation options.
if [ $COMPILER=gcc -a $FLAVOUR!=cygwin.LP64.gcc ]
then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm" then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm"
fi fi

View file

@ -6,10 +6,16 @@ else printf "FAILED: $PWD\n\n"; exit 1
fi fi
# Compare generated code # Compare generated code
if [ -f old.s -a -f new.asm ] if [ -f new.asm ]
then then egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.$FLAVOUR.s
egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.s
if ! diff -b old.s new.s if [ -f old.$FLAVOUR.s ]
then echo "--- Generated code changed ---" then
if ! diff -b old.$FLAVOUR.s new.$FLAVOUR.s
then echo "--- Generated code changed ---"
fi
else
cp new.$FLAVOUR.s old.$FLAVOUR.s
fi fi
fi fi

View file

@ -376,11 +376,11 @@ sourcechanges:
confidence: confidence:
@printf "\n\n--- Confidence tests ---\n\n" @printf "\n\n--- Confidence tests ---\n\n"
cd src/test/confidence/hello; sh ./test.sh "$(INSTALLDIR)" cd src/test/confidence/hello; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
cd src/test/confidence/language; sh ./test.sh "$(INSTALLDIR)" cd src/test/confidence/language; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; sh ./test.sh "$(INSTALLDIR)"; fi if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"; fi
cd src/test/confidence/lola; sh ./test.sh "$(INSTALLDIR)" cd src/test/confidence/lola; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
cd src/test/confidence/arrayassignment; sh ./test.sh "$(INSTALLDIR)" cd src/test/confidence/arrayassignment; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
@printf "\n\n--- Confidence tests passed ---\n\n" @printf "\n\n--- Confidence tests passed ---\n\n"