diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-07-06 13:37:38 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-07-06 17:06:50 +0200 |
commit | b75624a495e9163de469597555e9a70406b1f7a6 (patch) | |
tree | 408dca3ea5739d60cc0bdbf6cf82bba4e148b169 /toolchain | |
parent | c2a0e85308760ba02ca8e5b222b5534ca018aa73 (diff) |
allow static building of toolchain
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/Makefile | 4 | ||||
-rw-r--r-- | toolchain/binutils/Makefile | 7 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile index 2c463c4e7..98130c07a 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -81,7 +81,7 @@ $(CLIB)-fixup: gcc-install gdb-install $(MAKE_TRACE); \ else \ $(MAKE) -C $(patsubst %-compile,%,$@) compile \ - CC='$(HOST_CC)' CFLAGS='$(HOST_CFLAGS)' $(MAKE_TRACE); \ + CC='$(HOST_CC)' CFLAGS='$(HOST_CFLAGS)' CXXFLAGS='$(HOST_STATIC_CXXFLAGS)' $(MAKE_TRACE); \ fi %-install: %-compile @@ -91,7 +91,7 @@ $(CLIB)-fixup: gcc-install gdb-install $(MAKE_TRACE); \ else \ $(MAKE) -C $(patsubst %-install,%,$@) install \ - CC='$(HOST_CC)' CFLAGS='$(HOST_CFLAGS)' $(MAKE_TRACE); \ + CC='$(HOST_CC)' CFLAGS='$(HOST_CFLAGS)' CXXFLAGS='$(HOST_STATIC_CXXFLAGS)' $(MAKE_TRACE); \ fi %-fixup: %-install diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index b6d4489f9..9dae9defa 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -38,6 +38,10 @@ ifeq (${ADK_MAKE_PARALLEL},y) BINUTILS_MAKEOPTS+= -j${ADK_MAKE_JOBS} endif +ifeq (${ADK_STATIC_TOOLCHAIN},y) +BINUTILS_STATIC_MAKEOPTS+=LDFLAGS='$(HOST_STATIC_LLDFLAGS)' +endif + $(WRKBUILD)/.headers: $(WRKBUILD)/.configured: ifeq ($(ADK_LINUX_XTENSA),y) @@ -56,10 +60,11 @@ endif --disable-install-libiberty \ ${CONFOPTS} \ ); + $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) configure-host touch $@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured - $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all + $(MAKE) ${BINUTILS_MAKEOPTS} ${BINUTILS_STATIC_MAKEOPTS} -C $(WRKBUILD) all touch $@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 10afc0422..d2cc35d43 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -231,6 +231,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured: --enable-languages=$(LANGUAGES) \ --with-build-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ --with-sysroot='$${prefix}/${STAGING_HOST2TARGET}' + $(MAKE) -C $(GCC_BUILD_DIR_FINAL) configure-host touch $@ $(WRKBUILD)/.compiled: $(GCC_BUILD_DIR_FINAL)/.configured |