summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2024-05-17 06:02:08 +0000
committerSubrata Banik <subratabanik@google.com>2024-05-18 18:27:53 +0000
commitf2d260d9885264e1da8dbcd5609d0d082d7fcfe8 (patch)
tree551986df8f56743672d39e5db61dcbbccf4c62e2
parent67a96902d5a2f416ced55aa6bc7b751dbfa93092 (diff)
Libpayload: Rename arch variable _ARCH to _ARCHDIR for consistency
This commit renames the variable _ARCH to _ARCHDIR in the libpayload build script (lpgcc) to align with the naming convention of other variables used in this file. This change improves code readability and maintainability. Change-Id: Iea4af68e49ab1cd7ec8156a14f8215244e9c0622 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82479 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rwxr-xr-xpayloads/libpayload/bin/lpgcc24
1 files changed, 10 insertions, 14 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index bdc1518ed3..724f5eca64 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -74,34 +74,30 @@ else
fi
if [ "$CONFIG_LP_ARCH_ARM" = "y" ]; then
- _ARCHINCDIR=$_INCDIR/arm
- _ARCHLIBDIR=$_LIBDIR/arm
+ _ARCHDIR=arm
_ARCHEXTRA=""
- _ARCH=arm
+
fi
if [ "$CONFIG_LP_ARCH_ARM64" = "y" ]; then
- _ARCHINCDIR=$_INCDIR/arm64
- _ARCHLIBDIR=$_LIBDIR/arm64
+ _ARCHDIR=arm64
_ARCHEXTRA=""
- _ARCH=arm64
fi
if [ "$CONFIG_LP_ARCH_X86" = "y" ]; then
- _ARCHINCDIR=$_INCDIR/x86
- _ARCHLIBDIR=$_LIBDIR/x86
+ _ARCHDIR=x86
_ARCHEXTRA="-m32 "
- _ARCH=x86
fi
if [ "$CONFIG_LP_ARCH_MOCK" = "y" ]; then
- _ARCHINCDIR=$_INCDIR/mock
- _ARCHLIBDIR=$_LIBDIR/mock
+ _ARCHDIR=mock
_ARCHEXTRA=""
- _ARCH=mock
fi
+_ARCHINCDIR=$_INCDIR/$_ARCHDIR
+_ARCHLIBDIR=$_LIBDIR/$_ARCHDIR
+
if [ -f $_LIBDIR/libpayload.ldscript ]; then
_LDDIR=$_LIBDIR
-elif [ -f $BASE/../arch/$_ARCH/libpayload.ldscript ]; then
- _LDDIR=$BASE/../arch/$_ARCH
+elif [ -f $BASE/../arch/$_ARCHDIR/libpayload.ldscript ]; then
+ _LDDIR=$BASE/../arch/$_ARCHDIR
fi
# Host arch should youse default linker script
if [ "$CONFIG_LP_ARCH_MOCK" = "y" ]; then