Skip to content

Commit

Permalink
Makefile.common: obtain HOSTAR via configure.sh just like HOSTCC
Browse files Browse the repository at this point in the history
$(HOSTAR) may be prefixed just as well as $(HOSTCC) which can be made
configurable easily. Currently it is required to pass this value in as
an argument to make explicitly.
  • Loading branch information
sternenseemann authored and dinosaure committed Feb 28, 2024
1 parent cc80d3a commit 92476e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ HOSTCFLAGS := -fstack-protector-strong -Wall -Werror -std=c11 -O2 -g
HOSTCPPFLAGS := -I$(TOPDIR)/include
HOSTLDFLAGS :=
HOSTLDLIBS :=
HOSTAR := ar
HOSTAR := $(CONFIG_HOST_AR)

define HOSTCOMPILE.c
@echo "HOSTCC $@"
Expand Down
7 changes: 6 additions & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Options:
Environment variables affecting the build system configuration:
HOST_CC
C compiler used for host tools and tenders.
HOST_AR
C compiler and ar tool used for host tools and tenders.
TARGET_CC
TARGET_LD
Expand Down Expand Up @@ -247,6 +248,8 @@ done
#
# Configure host tools and tenders based on HOST_CC.
#
HOST_AR=${HOST_AR:-ar}

HOST_CC=${HOST_CC:-cc}
HOST_CC_MACHINE=$(${HOST_CC} -dumpmachine)
[ $? -ne 0 ] &&
Expand Down Expand Up @@ -342,6 +345,7 @@ CONFIG_DISABLE_TOOLCHAIN=1
CONFIG_HOST_ARCH=${CONFIG_HOST_ARCH}
CONFIG_HOST=${CONFIG_HOST}
CONFIG_HOST_CC=${HOST_CC}
CONFIG_HOST_AR=${HOST_AR}
CONFIG_HVT_TENDER_ENABLE_CAPSICUM=${CONFIG_HVT_TENDER_ENABLE_CAPSICUM}
CONFIG_HVT_TENDER=${CONFIG_HVT_TENDER}
CONFIG_SPT_TENDER=${CONFIG_SPT_TENDER}
Expand Down Expand Up @@ -520,6 +524,7 @@ CONFIG_PREFIX=${OPT_PREFIX}
CONFIG_HOST_ARCH=${CONFIG_HOST_ARCH}
CONFIG_HOST=${CONFIG_HOST}
CONFIG_HOST_CC=${HOST_CC}
CONFIG_HOST_AR=${HOST_AR}
CONFIG_HVT=${CONFIG_HVT}
CONFIG_HVT_TENDER_ENABLE_CAPSICUM=${CONFIG_HVT_TENDER_ENABLE_CAPSICUM}
CONFIG_HVT_TENDER=${CONFIG_HVT_TENDER}
Expand Down

0 comments on commit 92476e7

Please sign in to comment.