bool "Advanced configuration options (for developers)"
default n
select BUILDOPTS
- select TOOLCHAINOPTS
+ select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN
config BROKEN
bool "Show broken platforms / packages" if DEVEL
SECTION:=libs
CATEGORY:=Libraries
DEFAULT:=y
+ DEPENDS:=@!NATIVE_TOOLCHAIN
TITLE:=GCC support library
VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
DESCRIPTION:=$(TITLE)
define Package/libpthread
$(call Package/base-files$(TARGET))
DEFAULT:=n
+ DEPENDS:=@!NATIVE_TOOLCHAIN
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
TITLE:=POSIX thread library
DESCRIPTION:=POSIX thread library
define Package/uclibc
$(call Package/base-files$(TARGET))
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
+ DEPENDS:=@!NATIVE_TOOLCHAIN
TITLE:=C library
DESCRIPTION:=C library for embedded systems
endef
TARGET_DIR:=$(BUILD_DIR)/root
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg
-REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
-GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
-TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc-
+ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
+ REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
+ GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
+ TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc-
+endif
+
IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH)
TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH)
#
+config NATIVE_TOOLCHAIN
+ bool
+ prompt "Use host's toolchain" if DEVEL && BROKEN
+ default n
+ help
+ If enabled, OpenWrt will compile using your existing toolchain instead of compiling one
menuconfig TOOLCHAINOPTS
bool "Toolchain Options" if DEVEL
+ depends !NATIVE_TOOLCHAIN
source "toolchain/binutils/Config.in"
source "toolchain/gcc/Config.in"
# Main makefile for the toolchain
#
include $(TOPDIR)/rules.mk
-TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma
+TARGETS-y:=sed kernel-headers sstrip
+ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
+ TARGETS-y+=binutils gcc uClibc
+endif
+TARGETS-y+=ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma
+
TARGETS-$(CONFIG_GDB) += gdb
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
kernel-headers-prepare: sed-install
uClibc-prepare: kernel-headers-prepare sstrip-install
-binutils-prepare: uClibc-prepare
-gcc-prepare: binutils-install
-uClibc-compile: gcc-compile
+ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
+ binutils-prepare: uClibc-prepare
+ gcc-prepare: binutils-install
+ uClibc-compile: gcc-compile
+endif
gcc-install: uClibc-install
squashfs-compile: lzma-install