From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Cc: j-core@j-core.org
Subject: Re: updated cross-compiler build system
Date: Sun, 1 May 2016 17:38:04 +0200 [thread overview]
Message-ID: <20160501153804.GP22574@port70.net> (raw)
In-Reply-To: <20160501054502.GA4059@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
* Rich Felker <dalias@libc.org> [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)
[-- Attachment #2: a.diff --]
[-- Type: text/x-diff, Size: 1756 bytes --]
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
next prev parent reply other threads:[~2016-05-01 15:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 5:45 Rich Felker
2016-05-01 15:38 ` Szabolcs Nagy [this message]
2016-05-01 17:15 ` [J-core] [musl] " Rich Felker
2016-05-01 21:55 ` Szabolcs Nagy
[not found] ` <5726965F.1060406@landley.net>
2016-05-02 2:58 ` Rich Felker
2016-05-02 4:31 ` Rob Landley
2016-05-02 15:52 ` question: use of musl-libc anonymous
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160501153804.GP22574@port70.net \
--to=nsz@port70.net \
--cc=j-core@j-core.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).