mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:30:16 +02:00
add secret option to use host's toolchain when native compiling
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4553 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e77a109d6f
commit
20f30a6346
@ -16,7 +16,7 @@ menuconfig DEVEL
|
|||||||
bool "Advanced configuration options (for developers)"
|
bool "Advanced configuration options (for developers)"
|
||||||
default n
|
default n
|
||||||
select BUILDOPTS
|
select BUILDOPTS
|
||||||
select TOOLCHAINOPTS
|
select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN
|
||||||
|
|
||||||
config BROKEN
|
config BROKEN
|
||||||
bool "Show broken platforms / packages" if DEVEL
|
bool "Show broken platforms / packages" if DEVEL
|
||||||
|
@ -86,6 +86,7 @@ define Package/libgcc
|
|||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
DEFAULT:=y
|
DEFAULT:=y
|
||||||
|
DEPENDS:=@!NATIVE_TOOLCHAIN
|
||||||
TITLE:=GCC support library
|
TITLE:=GCC support library
|
||||||
VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
|
VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
|
||||||
DESCRIPTION:=$(TITLE)
|
DESCRIPTION:=$(TITLE)
|
||||||
@ -94,6 +95,7 @@ endef
|
|||||||
define Package/libpthread
|
define Package/libpthread
|
||||||
$(call Package/base-files$(TARGET))
|
$(call Package/base-files$(TARGET))
|
||||||
DEFAULT:=n
|
DEFAULT:=n
|
||||||
|
DEPENDS:=@!NATIVE_TOOLCHAIN
|
||||||
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
||||||
TITLE:=POSIX thread library
|
TITLE:=POSIX thread library
|
||||||
DESCRIPTION:=POSIX thread library
|
DESCRIPTION:=POSIX thread library
|
||||||
@ -103,6 +105,7 @@ endef
|
|||||||
define Package/uclibc
|
define Package/uclibc
|
||||||
$(call Package/base-files$(TARGET))
|
$(call Package/base-files$(TARGET))
|
||||||
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
||||||
|
DEPENDS:=@!NATIVE_TOOLCHAIN
|
||||||
TITLE:=C library
|
TITLE:=C library
|
||||||
DESCRIPTION:=C library for embedded systems
|
DESCRIPTION:=C library for embedded systems
|
||||||
endef
|
endef
|
||||||
|
9
rules.mk
9
rules.mk
@ -33,9 +33,12 @@ STAMP_DIR:=$(BUILD_DIR)/stamp
|
|||||||
TARGET_DIR:=$(BUILD_DIR)/root
|
TARGET_DIR:=$(BUILD_DIR)/root
|
||||||
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg
|
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg
|
||||||
|
|
||||||
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
|
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
|
||||||
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
|
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
|
||||||
TARGET_CROSS:=$(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)
|
IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH)
|
||||||
|
|
||||||
TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH)
|
TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH)
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
#
|
#
|
||||||
|
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
|
menuconfig TOOLCHAINOPTS
|
||||||
bool "Toolchain Options" if DEVEL
|
bool "Toolchain Options" if DEVEL
|
||||||
|
depends !NATIVE_TOOLCHAIN
|
||||||
|
|
||||||
source "toolchain/binutils/Config.in"
|
source "toolchain/binutils/Config.in"
|
||||||
source "toolchain/gcc/Config.in"
|
source "toolchain/gcc/Config.in"
|
||||||
|
@ -7,7 +7,12 @@
|
|||||||
# Main makefile for the toolchain
|
# Main makefile for the toolchain
|
||||||
#
|
#
|
||||||
include $(TOPDIR)/rules.mk
|
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-$(CONFIG_GDB) += gdb
|
||||||
|
|
||||||
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
|
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
|
||||||
@ -21,9 +26,11 @@ clean: $(TARGETS_CLEAN)
|
|||||||
|
|
||||||
kernel-headers-prepare: sed-install
|
kernel-headers-prepare: sed-install
|
||||||
uClibc-prepare: kernel-headers-prepare sstrip-install
|
uClibc-prepare: kernel-headers-prepare sstrip-install
|
||||||
binutils-prepare: uClibc-prepare
|
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
|
||||||
gcc-prepare: binutils-install
|
binutils-prepare: uClibc-prepare
|
||||||
uClibc-compile: gcc-compile
|
gcc-prepare: binutils-install
|
||||||
|
uClibc-compile: gcc-compile
|
||||||
|
endif
|
||||||
gcc-install: uClibc-install
|
gcc-install: uClibc-install
|
||||||
squashfs-compile: lzma-install
|
squashfs-compile: lzma-install
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user