From 5266a0a75cb98dc2dec0ced894fbff70d36b26ab Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 30 Apr 2014 12:06:29 +0200 Subject: use CLIB instead of LIBC to avoid clashes with uClibc buildsystem --- mk/build.mk | 28 ++++++++++++++-------------- toolchain/Makefile | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/mk/build.mk b/mk/build.mk index 6d4f8a4e1..bc1ce477b 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -361,9 +361,9 @@ endif |sed -e "s#^config \(.*\)#\1=y#" \ >> $(TOPDIR)/.defconfig; \ fi - @if [ ! -z "$(LIBC)" ];then \ + @if [ ! -z "$(CLIB)" ];then \ grep "^config" target/config/Config.in \ - |grep -i "$(LIBC)" \ + |grep -i "$(CLIB)" \ |sed -e "s#^config \(.*\)#\1=y#" \ >> $(TOPDIR)/.defconfig; \ fi @@ -419,9 +419,9 @@ endif |sed -e "s#^config \(.*\)#\1=y#" \ >> $(TOPDIR)/all.config; \ fi - @if [ ! -z "$(LIBC)" ];then \ + @if [ ! -z "$(CLIB)" ];then \ grep "^config" target/config/Config.in \ - |grep -i "$(LIBC)" \ + |grep -i "$(CLIB)" \ |sed -e "s#^config \(.*\)#\1=y#" \ >> $(TOPDIR)/all.config; \ fi @@ -466,10 +466,10 @@ endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) # build all target architecture and libc combinations (toolchain only) bulktoolchain: - @if [ -z "$(LIBC)" ];then \ + @if [ -z "$(CLIB)" ];then \ libc="glibc uclibc musl"; \ else \ - libc="$(LIBC)"; \ + libc="$(CLIB)"; \ fi; \ for libc in $$libc;do \ while read arch; do \ @@ -478,7 +478,7 @@ bulktoolchain: tarch=$$(echo $$arch|sed -e "s#sh4.*#sh#" -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##" -e "s#x86_64.*#x86_64#" ); \ carch=$$(echo $$arch|sed -e "s#hf##" -e "s#mips64n.*#mips64#" -e "s#mips64el.*#mips64el#" -e 's#x86$$#i686#' -e "s#x86_64.*#x86_64#" ); \ echo === building $$tarch $$libc toolchain-$$arch on $$(date); \ - $(GMAKE) ARCH=$$tarch SYSTEM=toolchain-$$arch LIBC=$$libc defconfig; \ + $(GMAKE) ARCH=$$tarch SYSTEM=toolchain-$$arch CLIB=$$libc defconfig; \ tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\ if [ $$arch = "armhf" ];then arch=arm; else arch=$$arch;fi; \ if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \ @@ -494,10 +494,10 @@ bulktoolchain: done test-framework: - @if [ -z "$(LIBC)" ];then \ + @if [ -z "$(CLIB)" ];then \ libc="glibc uclibc musl"; \ else \ - libc="$(LIBC)"; \ + libc="$(CLIB)"; \ fi; \ for libc in $$libc;do \ ( \ @@ -506,7 +506,7 @@ test-framework: tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#i686#x86#" -e "s#sh4#sh#" -e "s#hf##" -e "s#x86_64.*#x86_64#"); \ arch=$$(echo $$arch|sed -e 's#x86$$#i686#'); \ echo === building qemu-$$arch for $$libc with $$tarch on $$(date); \ - $(GMAKE) ARCH=$$tarch SYSTEM=qemu-$$arch LIBC=$$libc FS=initramfsarchive COLLECTION=test defconfig; \ + $(GMAKE) ARCH=$$tarch SYSTEM=qemu-$$arch CLIB=$$libc FS=initramfsarchive COLLECTION=test defconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\ if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \ @@ -529,7 +529,7 @@ release: ( \ echo === building $$libc on $$(date); \ $(GMAKE) prereq && \ - $(GMAKE) ARCH=$(ARCH) SYSTEM=$(SYSTEM) LIBC=$$libc FS=archive allmodconfig; \ + $(GMAKE) ARCH=$(ARCH) SYSTEM=$(SYSTEM) CLIB=$$libc FS=archive allmodconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ rm .config; \ ) 2>&1 | tee $(TOPDIR)/firmware/release-build.log; \ @@ -547,7 +547,7 @@ bulk: ( \ echo === building $$arch $$system $$libc on $$(date); \ $(GMAKE) prereq && \ - $(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive defconfig; \ + $(GMAKE) ARCH=$$arch SYSTEM=$$system CLIB=$$libc FS=archive defconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ rm .config; \ ) 2>&1 | tee $(TOPDIR)/firmware/bulkbuild.log; \ @@ -567,7 +567,7 @@ bulkall: ( \ echo === building $$arch $$system $$libc on $$(date); \ $(GMAKE) prereq && \ - $(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive allconfig; \ + $(GMAKE) ARCH=$$arch SYSTEM=$$system CLIB=$$libc FS=archive allconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ rm .config; \ ) 2>&1 | tee $(TOPDIR)/firmware/bulkallbuild.log; \ @@ -587,7 +587,7 @@ bulkallmod: ( \ echo === building $$arch $$system $$libc on $$(date); \ $(GMAKE) prereq && \ - $(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive allmodconfig; \ + $(GMAKE) ARCH=$$arch SYSTEM=$$system CLIB=$$libc FS=archive allmodconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then echo $$system-$$libc >.exit; exit 1;fi; \ $(GMAKE) clean; \ rm .config; \ diff --git a/toolchain/Makefile b/toolchain/Makefile index d37117272..d0922507f 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -18,15 +18,15 @@ include $(TOPDIR)/rules.mk TARGETS:=binutils gmp mpfr mpc libelf gcc ifeq ($(ADK_TARGET_LIB_GLIBC),y) TARGETS+=glibc -LIBC:=glibc +CLIB:=glibc endif ifeq ($(ADK_TARGET_LIB_UCLIBC),y) TARGETS+=uclibc -LIBC:=uclibc +CLIB:=uclibc endif ifeq ($(ADK_TARGET_LIB_MUSL),y) TARGETS+=musl -LIBC:=musl +CLIB:=musl endif ifeq ($(ADK_TOOLCHAIN_GDB),y) TARGETS+=gdb @@ -34,7 +34,7 @@ endif DOWNLOAD:=kernel-headers-download $(patsubst %,%-download,$(TARGETS)) TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS)) -FIXUP:=$(patsubst %,%-fixup,$(LIBC)) +FIXUP:=$(patsubst %,%-fixup,$(CLIB)) TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) install: $(TARGETS_INSTALL) @@ -43,14 +43,14 @@ download: $(DOWNLOAD) fixup: $(FIXUP) gcc-prepare: binutils-install gmp-install mpfr-install mpc-install libelf-install -$(LIBC)-prepare: gcc-prepare kernel-headers-prepare -gcc-configure: $(LIBC)-prepare -$(LIBC)-compile: gcc-configure -gcc-compile: $(LIBC)-install +$(CLIB)-prepare: gcc-prepare kernel-headers-prepare +gcc-configure: $(CLIB)-prepare +$(CLIB)-compile: gcc-configure +gcc-compile: $(CLIB)-install ifeq ($(ADK_TOOLCHAIN_GDB),y) -$(LIBC)-fixup: gcc-install gdb-install +$(CLIB)-fixup: gcc-install gdb-install else -$(LIBC)-fixup: gcc-install +$(CLIB)-fixup: gcc-install endif %-download: @@ -59,7 +59,7 @@ endif %-prepare: $(TRACE) toolchain/$(patsubst %-prepare,%,$@)/prepare - @if test x"$(patsubst %-prepare,%,$@)" = x"$(LIBC)"; then \ + @if test x"$(patsubst %-prepare,%,$@)" = x"$(CLIB)"; then \ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare \ $(MAKE_TRACE); \ else \ @@ -70,7 +70,7 @@ endif %-configure: %-prepare $(TRACE) toolchain/$(patsubst %-configure,%,$@)/configure - @if test x"$(patsubst %-configure,%,$@)" = x"$(LIBC)"; then \ + @if test x"$(patsubst %-configure,%,$@)" = x"$(CLIB)"; then \ $(MAKE) -C $(patsubst %-configure,%,$@) configure \ $(MAKE_TRACE); \ else \ @@ -81,7 +81,7 @@ endif %-compile: %-configure $(TRACE) toolchain/$(patsubst %-compile,%,$@)/compile - @if test x"$(patsubst %-compile,%,$@)" = x"$(LIBC)"; then \ + @if test x"$(patsubst %-compile,%,$@)" = x"$(CLIB)"; then \ $(MAKE) -C $(patsubst %-compile,%,$@) compile \ $(MAKE_TRACE); \ else \ @@ -92,7 +92,7 @@ endif %-install: %-compile $(TRACE) toolchain/$(patsubst %-install,%,$@)/install - @if test x"$(patsubst %-install,%,$@)" = x"$(LIBC)"; then \ + @if test x"$(patsubst %-install,%,$@)" = x"$(CLIB)"; then \ $(MAKE) -C $(patsubst %-install,%,$@) install \ $(MAKE_TRACE); \ else \ -- cgit v1.2.3