From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9973 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: updated cross-compiler build system Date: Sun, 1 May 2016 17:38:04 +0200 Message-ID: <20160501153804.GP22574@port70.net> References: <20160501054502.GA4059@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qcHopEYAB45HaUaB" X-Trace: ger.gmane.org 1462117102 9040 80.91.229.3 (1 May 2016 15:38:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 May 2016 15:38:22 +0000 (UTC) Cc: j-core@j-core.org To: musl@lists.openwall.com Original-X-From: musl-return-9986-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 01 17:38:21 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1awtRt-0006ql-1N for gllmg-musl@m.gmane.org; Sun, 01 May 2016 17:38:21 +0200 Original-Received: (qmail 13930 invoked by uid 550); 1 May 2016 15:38:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13909 invoked from network); 1 May 2016 15:38:16 -0000 Mail-Followup-To: musl@lists.openwall.com, j-core@j-core.org Content-Disposition: inline In-Reply-To: <20160501054502.GA4059@brightrain.aerifal.cx> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9973 Archived-At: --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Rich Felker [2016-05-01 01:45:02 -0400]: > I've just pushed the new overhaul of musl-cross-make, my cross > compiler build system: > > https://github.com/richfelker/musl-cross-make > > This should make it faster (single-stage), safer (https and hash > checking), simpler (built-in fetching of gmp & friends), and cleaner > to build and install cross compilers that can be used to target J-core > Linux. The sh2eb-linux-muslfdpic target profile in the sample > config.mak(.dist) file is all you need to select and use. As usual it > also should work for all other (non J-core) musl targets too. > > I've tested it pretty extensively on two systems I use for builds, but > as this is a big change/overhaul there might be things that break. Let > me know how using it goes. nice i made some mods: changed $$(LC_ROOT) to $${LC_ROOT} because it seems to be passed to bash in config.status (as $$(, \$( and $( and the last one executes LC_ROOT as a command, this might be an autoconf bug: it does not escape the args correctly) for me make fails in bfd/doc despite MAKINFO=false, but the export AM_MAKEFLAGS=INFO_DEPS= hack fixed it. src_mpfr dep was wrong. i like saving the build log, but 2>&1 might not be what everybody wants. and linux headers are often needed to build things so there could be an install target for it: install-linuxheaders: install-toolchain case $(TARGET) in \ i*86* | x86_64* | x32*) A=x86 ;; \ arm*) A=arm ;; \ aarch64*) A=arm64 ;; \ mips*) A=mips ;; \ or1k*) A=openrisc ;; \ sh* | j[24]*) A=sh ;; \ powerpc* | ppc*) A=powerpc ;; \ microblaze*) A=microblaze ;; \ esac; \ $(MAKE) -C ../src_linux headers_install ARCH=$$A \ CROSS_COMPILE=$(DESTDIR)$(OUTPUT)/$(TARGET)- \ INSTALL_HDR_PATH=$(DESTDIR)$(OUTPUT)/$(TARGET) --qcHopEYAB45HaUaB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="a.diff" diff --git a/Makefile b/Makefile index e85ccba..adac3c1 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ $(BUILD_DIR)/config.mak: | $(BUILD_DIR) "-include ../config.mak" all: | $(SRC_DIRS) $(BUILD_DIR) $(BUILD_DIR)/Makefile $(BUILD_DIR)/config.mak - cd $(BUILD_DIR) && $(MAKE) $@ + cd $(BUILD_DIR) && $(MAKE) $@ 2>&1 |tee -a build.log install: | $(SRC_DIRS) $(BUILD_DIR) $(BUILD_DIR)/Makefile $(BUILD_DIR)/config.mak cd $(BUILD_DIR) && $(MAKE) OUTPUT=$(OUTPUT) $@ diff --git a/config.mak.dist b/config.mak.dist index a152743..bde1641 100644 --- a/config.mak.dist +++ b/config.mak.dist @@ -35,6 +35,7 @@ # COMMON_CONFIG += --disable-nls # COMMON_CONFIG += MAKEINFO=/bin/false +# export AM_MAKEFLAGS = INFO_DEPS= # GCC_CONFIG += --enable-languages=c,c++ # GCC_CONFIG += --disable-libquadmath --disable-decimal-float # GCC_CONFIG += --disable-multilib diff --git a/litecross/Makefile b/litecross/Makefile index 8657c56..16fc395 100644 --- a/litecross/Makefile +++ b/litecross/Makefile @@ -19,7 +19,7 @@ FULL_TOOLCHAIN_CONFIG = $(TOOLCHAIN_CONFIG) \ --disable-werror \ --target=$(TARGET) --prefix= \ --with-sysroot=/$(TARGET) \ - --with-build-sysroot='$$(LC_ROOT)/obj_sysroot' \ + --with-build-sysroot='$${LC_ROOT}/obj_sysroot' \ --enable-tls \ --disable-libmudflap --disable-libsanitizer @@ -55,13 +55,13 @@ src_musl: | $(MUSL_SRCDIR) ln -sf $(MUSL_SRCDIR) $@ src_gmp: | $(GMP_SRCDIR) - ln -sf "$(GMP_SRCDIR)" $@ + ln -sf $(GMP_SRCDIR) $@ src_mpc: | $(MPC_SRCDIR) - ln -sf "$(MPC_SRCDIR)" $@ + ln -sf $(MPC_SRCDIR) $@ -src_mpfr: | $(GMP_SRCDIR) - ln -sf "$(MPFR_SRCDIR)" $@ +src_mpfr: | $(MPFR_SRCDIR) + ln -sf $(MPFR_SRCDIR) $@ src_toolchain: src_binutils src_gcc src_gmp src_mpc src_mpfr rm -rf $@ $@.tmp --qcHopEYAB45HaUaB--