From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1499) id C1BAC3858CDB; Tue, 9 Apr 2024 10:03:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1BAC3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712656980; bh=2TtpxlkmMO7Bni6H+QK7kac3nxVrBq/wTaL+w3JXTlY=; h=From:To:Subject:Date:From; b=cXk7cRGhzqZYzpXFIoaxFMhm1ulDPOT/9kVcyQEzJFY4o8KhygCgQH+2YvHUXMucs FBJ3cj7+j6GTAL+kRIJa2W/gX03rk819bd8Z/ifnY1e+lxKn00y0FG6xkj5iyRRr4l wNVpwHHf2fTu+YLQLY9QKl5bSO0LwHmW4MKDXvog= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Gaius Mulley To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-9867] modula2: tidyup makeSystem X-Act-Checkin: gcc X-Git-Author: Gaius Mulley X-Git-Refname: refs/heads/master X-Git-Oldrev: 8657d76d583f0f87000e9003ba75922f2bbe4455 X-Git-Newrev: 46120d7d12318f98cbeeef1bae886222ecc92d52 Message-Id: <20240409100300.C1BAC3858CDB@sourceware.org> Date: Tue, 9 Apr 2024 10:03:00 +0000 (GMT) List-Id: https://gcc.gnu.org/g:46120d7d12318f98cbeeef1bae886222ecc92d52 commit r14-9867-g46120d7d12318f98cbeeef1bae886222ecc92d52 Author: Gaius Mulley Date: Tue Apr 9 11:02:17 2024 +0100 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 Diff: --- gcc/m2/tools-src/makeSystem | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/m2/tools-src/makeSystem b/gcc/m2/tools-src/makeSystem index 824aeb76676..393713eb873 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