From 5fd82aa26484b8f3d584bcec8a33616a719cd24c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 25 Nov 2021 22:31:59 -0500 Subject: [PATCH] ld: fix POSIX shell test usage POSIX test uses = for compares, not == which is a bashism. --- ld/scripttempl/elfarc.sc | 2 +- ld/scripttempl/elfarcv2.sc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/scripttempl/elfarc.sc b/ld/scripttempl/elfarc.sc index 3bb0c2f9c7c..1d3c043a4d7 100644 --- a/ld/scripttempl/elfarc.sc +++ b/ld/scripttempl/elfarc.sc @@ -69,7 +69,7 @@ test -z "$ENTRY" && ENTRY=start test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} # If we request a big endian toolchain, give a big endian linker -test "${ARC_ENDIAN}" == "big" && OUTPUT_FORMAT=${BIG_OUTPUT_FORMAT} +test "${ARC_ENDIAN}" = "big" && OUTPUT_FORMAT=${BIG_OUTPUT_FORMAT} if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi test -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" diff --git a/ld/scripttempl/elfarcv2.sc b/ld/scripttempl/elfarcv2.sc index a0c4f7ef761..bf84c7648db 100644 --- a/ld/scripttempl/elfarcv2.sc +++ b/ld/scripttempl/elfarcv2.sc @@ -13,7 +13,7 @@ test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} # If we request a big endian toolchain, give a big endian linker test -z "$GOT" && GOT=".got ${RELOCATING-0} : {${RELOCATING+ *(.got.plt)} *(.got) } ${RELOCATING+ > ${DATA_MEMORY}}" -test "${ARC_ENDIAN}" == "big" && OUTPUT_FORMAT=${BIG_OUTPUT_FORMAT} +test "${ARC_ENDIAN}" = "big" && OUTPUT_FORMAT=${BIG_OUTPUT_FORMAT} if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi test -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" -- 2.30.2