mirror of
https://git.busybox.net/uClibc
synced 2025-05-08 14:46:24 +08:00
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>
This commit is contained in:
parent
c79f09a9a3
commit
ae14cd49a8
2
INSTALL
2
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:
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
|
26
Rules.mak
26
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user