Commit 67388c24 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

build system: make CC/LD derive from HOSTCC/HOSTLD

1. Move HOSTCC/HOSTLD to nmk (note there are rules in nmk
   that make use of these variables already)

2. Make CC/LD derive from HOSTCC/HOSTLD

Note that one can still change anything from the command line.

travis-ci: success for build system: make CC/LD derive from HOSTCC/HOSTLD
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 19f7f130
......@@ -6,12 +6,6 @@ export __nmk_dir
include $(__nmk_dir)include.mk
include $(__nmk_dir)macro.mk
#
# To build host helpers.
HOSTCC ?= gcc
HOSTLD ?= ld
export HOSTCC HOSTLD
CFLAGS += $(USERCFLAGS)
export CFLAGS
......
......@@ -3,8 +3,10 @@ ifndef ____nmk_defined__tools
#
# System tools shorthands
RM := rm -f
LD := $(CROSS_COMPILE)ld
CC := $(CROSS_COMPILE)gcc
HOSTLD ?= ld
LD := $(CROSS_COMPILE)$(HOSTLD)
HOSTCC ?= gcc
CC := $(CROSS_COMPILE)$(HOSTCC)
CPP := $(CC) -E
AS := $(CROSS_COMPILE)as
AR := $(CROSS_COMPILE)ar
......@@ -25,7 +27,7 @@ CSCOPE := cscope
ETAGS := etags
CTAGS := ctags
export RM LD CC CPP AS AR STRIP OBJCOPY OBJDUMP
export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment