From f2d260d9885264e1da8dbcd5609d0d082d7fcfe8 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Fri, 17 May 2024 06:02:08 +0000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/82479 Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- payloads/libpayload/bin/lpgcc | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'payloads/libpayload/bin/lpgcc') 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 -- cgit v1.2.3