From: Mike Frysinger Date: Fri, 26 Nov 2021 03:31:59 +0000 (-0500) Subject: ld: fix POSIX shell test usage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5fd82aa26484b8f3d584bcec8a33616a719cd24c;p=binutils-gdb.git ld: fix POSIX shell test usage POSIX test uses = for compares, not == which is a bashism. --- 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"