diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2024-04-09 11:02:17 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2024-04-09 11:02:17 +0100 |
commit | 46120d7d12318f98cbeeef1bae886222ecc92d52 (patch) | |
tree | 03319f238f1d16b554213971121846699bc0cf1a | |
parent | 8657d76d583f0f87000e9003ba75922f2bbe4455 (diff) | |
download | gcc-46120d7d12318f98cbeeef1bae886222ecc92d52.zip gcc-46120d7d12318f98cbeeef1bae886222ecc92d52.tar.gz gcc-46120d7d12318f98cbeeef1bae886222ecc92d52.tar.bz2 |
modula2: tidyup makeSystem
This patch provides a tidyup for gcc/m2/tools-src/makeSystem.
It only runs the compiler once and will echo a debug command line
should it fail.
gcc/m2/ChangeLog:
* tools-src/makeSystem: Invoke ${COMPILER} once and adjust
the echo string to expand the shell variables with -wrapper
gdb, --args.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r-- | gcc/m2/tools-src/makeSystem | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/m2/tools-src/makeSystem b/gcc/m2/tools-src/makeSystem index 824aeb7..393713e 100644 --- a/gcc/m2/tools-src/makeSystem +++ b/gcc/m2/tools-src/makeSystem @@ -101,8 +101,10 @@ displayEnd () { MINIMAL="-fno-scaffold-main -fno-scaffold-dynamic -fno-scaffold-static -fno-m2-plugin" rm -f ${OUTPUTFILE} -if ${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} \ - -S -fdump-system-exports ${SYSTEMMOD} -o /dev/null 2>&1 > /dev/null ; then +${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} \ + -S -fdump-system-exports ${SYSTEMMOD} -o /dev/null 2>&1 > /dev/null +res=$? +if [ ${res} -eq 0 ] ; then types=`${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} -fno-m2-plugin -S -fdump-system-exports ${SYSTEMMOD} -o /dev/null | cut -f5 -d' '` touch ${OUTPUTFILE} displayStart @@ -111,7 +113,9 @@ if ${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} \ displayBuiltinTypes displayEnd else - ${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} \ - -S -fdump-system-exports ${SYSTEMMOD} -o /dev/null - exit $? + echo "the command below failed:" + echo "${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} -S -fdump-system-exports ${SYSTEMMOD}" + echo "to debug the command use" + echo "${COMPILER} ${DIALECT} ${LIBRARY} ${MINIMAL} -S -fdump-system-exports ${SYSTEMMOD} -wrapper gdb,--args" + exit $res fi |