summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2011-10-27 15:11:11 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2011-11-25 06:31:07 +0100
commitae14cd49a8da6e62e35636109a6dc74011198437 (patch)
tree95c4f1dd4444ae6f8cbdf279bec7b7dcda22e33c
parentc79f09a9a3cfa50cd56c53bd2d3d1f57fe52d587 (diff)
buildsys: s/CROSS/CROSS_COMPILE/g
Use CROSS_COMPILE instead of CROSS as other projects are doing (i.e. kernel, busybox, buildroot). CROSS is still supported for backward compatibility only Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r--INSTALL2
-rw-r--r--Makefile.help2
-rw-r--r--Makefile.in8
-rw-r--r--Rules.mak26
-rwxr-xr-xextra/scripts/MAKEALL16
-rw-r--r--libc/sysdeps/linux/m68k/README.m68k6
6 files changed, 29 insertions, 31 deletions
diff --git a/INSTALL b/INSTALL
index 79cde848d..78fe3fc01 100644
--- a/INSTALL
+++ b/INSTALL
@@ -54,7 +54,7 @@ COMPILING uClibc:
to compile uClibc. or if you are cross compiling, you would
instead run something like:
- make CROSS=arm-linux-
+ make CROSS_COMPILE=arm-linux-
INSTALLING the uClibc development environment:
diff --git a/Makefile.help b/Makefile.help
index a98d330b8..bd8b0ecde 100644
--- a/Makefile.help
+++ b/Makefile.help
@@ -54,7 +54,7 @@ help:
@echo ' V="" - Quiet build (default)'
@echo ' V=1 - Brief build (show defines, ld flags)'
@echo ' V=2 - Very verbose build'
- @echo ' CROSS= - Override CROSS_COMPILER_PREFIX from .config'
+ @echo ' CROSS_COMPILE= - Override CROSS_COMPILER_PREFIX from .config'
@echo ' ARCH= - Use given arch for config targets'
@echo ' SHELL= - Shell to use for make'
@echo ' CONFIG_SHELL= - Shell to use for menuconfig'
diff --git a/Makefile.in b/Makefile.in
index 0a4347b74..b7b491738 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -405,19 +405,19 @@ ifeq ($(HAVE_SHARED),y)
endif
utils: | pregen
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils $@
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" -C utils $@
# Installs helper applications, such as 'ldd' and 'ldconfig'
install_utils: utils
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" -C utils utils_install
endif # ifeq ($(HAVE_DOT_CONFIG),y)
hostutils: | pregen
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils $@
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils $@
install_hostutils: hostutils
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
$(addprefix $(top_builddir),include include/bits include/sys include/config lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
$(do_mkdir)
diff --git a/Rules.mak b/Rules.mak
index a5b690153..dc5b80b0e 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -30,24 +30,24 @@ endif
#-----------------------------------------------------------
# If you are running a cross compiler, you will want to set
-# 'CROSS' to something more interesting ... Target
+# 'CROSS_COMPILE' to something more interesting ... Target
# architecture is determined by asking the CC compiler what
# arch it compiles things for, so unless your compiler is
# broken, you should not need to specify TARGET_ARCH.
#
# Most people will set this stuff on the command line, i.e.
-# make CROSS=arm-linux-
+# make CROSS_COMPILE=arm-linux-
# will build uClibc for 'arm'.
+# CROSS is still supported for backward compatibily only
-ifndef CROSS
-CROSS=
-endif
-CC = $(CROSS)gcc
-AR = $(CROSS)ar
-LD = $(CROSS)ld
-NM = $(CROSS)nm
-OBJDUMP = $(CROSS)objdump
-STRIPTOOL = $(CROSS)strip
+CROSS_COMPILE ?= $(CROSS)
+
+CC = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
+LD = $(CROSS_COMPILE)ld
+NM = $(CROSS_COMPILE)nm
+OBJDUMP = $(CROSS_COMPILE)objdump
+STRIPTOOL = $(CROSS_COMPILE)strip
INSTALL = install
LN = ln
@@ -159,8 +159,8 @@ endif
comma:=,
space:= #
-ifndef CROSS
-CROSS=$(call qstrip,$(CROSS_COMPILER_PREFIX))
+ifndef CROSS_COMPILE
+CROSS_COMPILE=$(call qstrip,$(CROSS_COMPILER_PREFIX))
endif
# A nifty macro to make testing gcc features easier
diff --git a/extra/scripts/MAKEALL b/extra/scripts/MAKEALL
index 6bacc9a7c..f467741e9 100755
--- a/extra/scripts/MAKEALL
+++ b/extra/scripts/MAKEALL
@@ -77,13 +77,11 @@ pass=""
fail=""
skip=""
for a in "$@" ; do
- if [ -n "${CROSS_COMPILE}" ] ; then
- CROSS=${CROSS_COMPILE}
- else
- CROSS=$(find_compiler ${a})
+ if [ -z "${CROSS_COMPILE}" ] ; then
+ CROSS_COMPILE=$(find_compiler ${a})
fi
- if [ -z "${CROSS}" ] ; then
+ if [ -z "${CROSS_COMPILE}" ] ; then
mark_arch skip $a
echo " ### SKIP: ${a}: could not find compiler"
continue
@@ -93,17 +91,17 @@ for a in "$@" ; do
(
set -e
- echo " ### Building target ${a} (${CROSS})"
+ echo " ### Building target ${a} (${CROSS_COMPILE})"
do_make distclean
do_make ARCH=$a defconfig
do_make oldconfig
- setconfig CROSS_COMPILER_PREFIX ${CROSS}
+ setconfig CROSS_COMPILER_PREFIX ${CROSS_COMPILE}
- header_path=${KERNEL_HEADERS:-$(echo '#include <linux/version.h>' | ${CROSS}cpp 2>/dev/null | grep -o '[^"]*linux/version.h')} || :
+ header_path=${KERNEL_HEADERS:-$(echo '#include <linux/version.h>' | ${CROSS_COMPILE}cpp 2>/dev/null | grep -o '[^"]*linux/version.h')} || :
if [ -z "${header_path}" ] ; then
- for p in /usr/${CROSS%-}/usr/include ; do
+ for p in /usr/${CROSS_COMPILE%-}/usr/include ; do
if [ -e ${p}/linux/version.h ] ; then
header_path=${p}
break
diff --git a/libc/sysdeps/linux/m68k/README.m68k b/libc/sysdeps/linux/m68k/README.m68k
index a6bb17e4c..c1c1b4b5d 100644
--- a/libc/sysdeps/linux/m68k/README.m68k
+++ b/libc/sysdeps/linux/m68k/README.m68k
@@ -16,9 +16,9 @@ Configuration:
Read and edit the Config file, carefully.
TARGET_ARCH=m68k
- CROSS = m68k-pic-coff-
- CC = $(CROSS)gcc
- STRIPTOOL = $(CROSS)strip
+ CROSS_COMPILE = m68k-pic-coff-
+ CC = $(CROSS_COMPILE)gcc
+ STRIPTOOL = $(CROSS_COMPILE)strip
KERNEL_SOURCE=/opt/uClinux/linux
HAS_MMU = false
HAS_FLOATS = false