diff options
-rw-r--r-- | CHANGES | 8 | ||||
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | configs/kb9202_defconfig | 1 | ||||
-rw-r--r-- | configs/v100sc2_defconfig | 1 | ||||
-rw-r--r-- | package/Makefile.in | 4 | ||||
-rw-r--r-- | package/netsnmp/Config.in | 5 | ||||
-rw-r--r-- | package/netsnmp/netsnmp.mk | 172 | ||||
-rw-r--r-- | package/samba/samba.mk | 2 | ||||
-rw-r--r-- | package/x11r7/Config.in | 7 | ||||
-rw-r--r-- | toolchain/Config.in | 16 | ||||
-rw-r--r-- | toolchain/helpers.mk (renamed from toolchain/external-toolchain/ext-tool.mk) | 118 | ||||
-rw-r--r-- | toolchain/toolchain-buildroot.mk | 12 | ||||
-rw-r--r-- | toolchain/toolchain-buildroot/Config.in (renamed from toolchain/Config.in.1) | 2 | ||||
-rw-r--r-- | toolchain/toolchain-buildroot/Config.in.2 | 37 | ||||
-rw-r--r-- | toolchain/toolchain-common.in (renamed from toolchain/Config.in.2) | 46 | ||||
-rw-r--r-- | toolchain/toolchain-external.mk | 14 | ||||
-rw-r--r-- | toolchain/toolchain-external/Config.in (renamed from toolchain/external-toolchain/Config.in) | 0 | ||||
-rw-r--r-- | toolchain/toolchain-external/Config.in.2 (renamed from toolchain/external-toolchain/Config.in.2) | 0 | ||||
-rw-r--r-- | toolchain/toolchain-external/ext-tool.mk | 115 |
19 files changed, 241 insertions, 334 deletions
@@ -32,10 +32,10 @@ libidn, liblockfile, libpng, libsoup, lighttpd, links, linux-fusion, lmbench, lrzsz, ltrace, make, midori, module-init-tools, mplayer, mysql_client, nbd, ncurses, neon, - netcat, netperf, ntfsprogs, openssl, pango, php, qt, quagga, - setserial, sdl, sdl_mixer, sdl_sound, sdl_ttf, sqlite, - squashfs, swfdec, tftpd, thttpd, tn5250, tremor, usbutils, - webif, webkit, wireless_tools, xkeyboard-config, + netcat, netperf, netsnmp, ntfsprogs, openssl, pango, php, qt, + quagga, samba, setserial, sdl, sdl_mixer, sdl_sound, sdl_ttf, + sqlite, squashfs, swfdec, tftpd, thttpd, tn5250, tremor, + usbutils, webif, webkit, wireless_tools, xkeyboard-config, xserver_xorg-server, xvkbd, zlib Removed packages: libgail, modutils, portage, rxvt @@ -294,20 +294,9 @@ all: world # each selected package to TARGETS if that package was selected # in the .config file. ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -# avoid pulling in external toolchain which is broken for toplvl parallel builds -# Explicit ordering: -include toolchain/dependencies/dependencies.mk -include toolchain/binutils/binutils.mk -include toolchain/ccache/ccache.mk -include toolchain/elf2flt/elf2flt.mk -include toolchain/gcc/gcc-uclibc-4.x.mk -include toolchain/gdb/gdb.mk -include toolchain/kernel-headers/kernel-headers.mk -include toolchain/mklibs/mklibs.mk -include toolchain/sstrip/sstrip.mk -include toolchain/uClibc/uclibc.mk +include toolchain/toolchain-buildroot.mk else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) -include toolchain/*/*.mk +include toolchain/toolchain-external.mk endif include package/*/*.mk diff --git a/configs/kb9202_defconfig b/configs/kb9202_defconfig index 2895d8a94..40c6d1820 100644 --- a/configs/kb9202_defconfig +++ b/configs/kb9202_defconfig @@ -551,7 +551,6 @@ BR2_PACKAGE_XSERVER_none=y # BR2_PACKAGE_XSERVER_x11r7 is not set # BR2_PACKAGE_XSERVER_xorg is not set # BR2_PACKAGE_XSERVER_tinyx is not set -BR2_X11_PREFIX="/usr" # # X libraries and helper libraries diff --git a/configs/v100sc2_defconfig b/configs/v100sc2_defconfig index 80f194a56..ca261ee42 100644 --- a/configs/v100sc2_defconfig +++ b/configs/v100sc2_defconfig @@ -568,7 +568,6 @@ BR2_PACKAGE_QT_OPENSSL=y # BR2_PACKAGE_XSERVER_none is not set # BR2_PACKAGE_XSERVER_xorg is not set # BR2_PACKAGE_XSERVER_tinyx is not set -BR2_X11_PREFIX="/usr" # BR2_PACKAGE_XORG7 is not set # diff --git a/package/Makefile.in b/package/Makefile.in index fc53a1b1e..36f2f2419 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -292,9 +292,5 @@ else ENABLE_DEBUG:= endif -# X Windowing system - -X11_PREFIX:=$(call qstrip,$(BR2_X11_PREFIX)) - include package/Makefile.autotools.in include package/Makefile.package.in diff --git a/package/netsnmp/Config.in b/package/netsnmp/Config.in index 810b654bf..5a3e9aabc 100644 --- a/package/netsnmp/Config.in +++ b/package/netsnmp/Config.in @@ -1,13 +1,8 @@ config BR2_PACKAGE_NETSNMP bool "netsnmp" - # Build with external toolchains is broken, libtool strips - # --sysroot at link time - depends on !BR2_TOOLCHAIN_EXTERNAL help Suite of applications used to implement SNMP v1, SNMP v2c, and SNMP v3 using both IPv4 and IPv6. http://net-snmp.sourceforge.net/ -comment "lmbench is broken with external toolchains" - depends on BR2_TOOLCHAIN_EXTERNAL diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk index c5232c7a0..8f8bc7669 100644 --- a/package/netsnmp/netsnmp.mk +++ b/package/netsnmp/netsnmp.mk @@ -3,150 +3,54 @@ # netsnmp # ############################################################# -NETSNMP_VERSION:=5.5 -NETSNMP_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp/ -NETSNMP_DIR:=$(BUILD_DIR)/net-snmp-$(NETSNMP_VERSION) -NETSNMP_SOURCE:=net-snmp-$(NETSNMP_VERSION).tar.gz -NETSNMP_WO_TRANSPORT:= -ifneq ($(BR2_INET_IPX),y) -NETSNMP_WO_TRANSPORT+= IPX -endif -ifneq ($(BR2_INET_IPV6),y) -NETSNMP_WO_TRANSPORT+= UDPIPv6 TCPIPv6 -endif - -$(DL_DIR)/$(NETSNMP_SOURCE): - $(call DOWNLOAD,$(NETSNMP_SITE),$(NETSNMP_SOURCE)) - -$(NETSNMP_DIR)/.unpacked: $(DL_DIR)/$(NETSNMP_SOURCE) - $(ZCAT) $(DL_DIR)/$(NETSNMP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(NETSNMP_DIR) package/netsnmp/ \*$(NETSNMP_VERSION)\*.patch - $(CONFIG_UPDATE) $(@D) - touch $@ +NETSNMP_VERSION = 5.5 +NETSNMP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp +NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz +NETSNMP_INSTALL_STAGING = YES +NETSNMP_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install +NETSNMP_LIBTOOL_PATCH = NO +NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes +NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp --disable-static \ + --with-defaults --enable-mini-agent --without-rpm \ + --with-logfile=none --without-kmem-usage $(DISABLE_IPV6) \ + --enable-as-needed --disable-debugging --without-perl-modules \ + --disable-embedded-perl --disable-perl-cc-checks \ + --with-sys-contact="root@unknown" \ + --with-sys-location="Unknown" \ + --with-mib-modules="host smux ucd-snmp/dlmod" ifeq ($(BR2_ENDIAN),"BIG") -NETSNMP_ENDIAN=big + NETSNMP_CONF_OPT += --with-endianness=big else -NETSNMP_ENDIAN=little -endif - -ifeq ($(BR2_HAVE_PERL),y) -NETSNMP_CONFIGURE_PERL_ENV:=\ - PERLCC="$(TARGET_CC)" -NETSNMP_CONFIGURE_PERL:=\ - --disable-embedded-perl \ - --disable-perl-cc-checks \ - --enable-as-needed -else -NETSNMP_CONFIGURE_PERL_ENV:= -NETSNMP_CONFIGURE_PERL:=\ - --disable-embedded-perl \ - --disable-perl-cc-checks \ - --without-perl-modules + NETSNMP_CONF_OPT += --with-endianness=little endif +# OpenSSL ifeq ($(BR2_PACKAGE_OPENSSL),y) -NETSNMP_CONFIGURE_OPENSSL:=--with-openssl=$(STAGING_DIR)/usr/include/openssl + NETSNMP_CONF_OPT += \ + --with-openssl=$(STAGING_DIR)/usr/include/openssl else -NETSNMP_CONFIGURE_OPENSSL:=--without-openssl + NETSNMP_CONF_OPT += --without-openssl endif +# Docs ifneq ($(BR2_HAVE_DOCUMENTATION),y) -NETSNMP_DOCS:=--disable-manuals + NETSNMP_CONF_OPT += --disable-manuals endif -$(NETSNMP_DIR)/.configured: $(NETSNMP_DIR)/.unpacked - (cd $(NETSNMP_DIR); rm -f config.cache; \ - $(AUTOCONF) && \ - ac_cv_NETSNMP_CAN_USE_SYSCTL=yes \ - $(NETSNMP_CONFIGURE_PERL_ENV) \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --with-cc=$(TARGET_CROSS)gcc \ - --with-linkcc=$(TARGET_CROSS)gcc \ - --with-ar=$(TARGET_CROSS)ar \ - --with-cflags="$(TARGET_CFLAGS)" \ - --with-ldflags="$(TARGET_LDFLAGS)" \ - --with-endianness=$(NETSNMP_ENDIAN) \ - --with-persistent-directory=/var/lib/snmp \ - --enable-ucd-snmp-compatibility \ - --enable-shared \ - --disable-static \ - --with-logfile=none \ - --without-rpm \ - $(NETSNMP_CONFIGURE_OPENSSL) \ - $(NETSNMP_DOCS) \ - $(NETSNMP_CONFIGURE_PERL) \ - --without-dmalloc \ - --without-efence \ - --without-rsaref \ - --with-sys-contact="root" \ - --with-sys-location="Unknown" \ - --with-mib-modules="host smux ucd-snmp/dlmod" \ - --with-out-transports="$(NETSNMP_WO_TRANSPORT)" \ - --with-defaults \ - --disable-debugging \ - --prefix=/usr \ - --sysconfdir=/etc \ - --enable-mini-agent \ - --without-kmem-usage \ - $(DISABLE_IPV6) \ - ) - touch $@ - -$(NETSNMP_DIR)/agent/snmpd: $(NETSNMP_DIR)/.configured - $(MAKE1) -C $(NETSNMP_DIR) - touch -c $@ - -$(TARGET_DIR)/usr/sbin/snmpd: $(NETSNMP_DIR)/agent/snmpd - $(MAKE) PREFIX=$(TARGET_DIR)/usr \ - prefix=$(TARGET_DIR)/usr \ - exec_prefix=$(TARGET_DIR)/usr \ - persistentdir=$(TARGET_DIR)/var/lib/snmp \ - includedir=$(STAGING_DIR)/usr/include/net-snmp \ - ucdincludedir=$(STAGING_DIR)/usr/include/ucd-snmp \ - -C $(NETSNMP_DIR) install - # Copy the .conf files. - $(INSTALL) -D -m 0644 $(NETSNMP_DIR)/EXAMPLE.conf $(TARGET_DIR)/etc/snmp/snmpd.conf - -mv $(TARGET_DIR)/usr/share/snmp/mib2c*.conf $(TARGET_DIR)/etc/snmp - # Remove the unsupported snmpcheck program - rm -f $(TARGET_DIR)/usr/bin/snmpcheck - # Install the "broken" headers - $(INSTALL) -D -m 0644 $(NETSNMP_DIR)/agent/mibgroup/struct.h $(STAGING_DIR)/usr/include/net-snmp/agent/struct.h - $(INSTALL) -D -m 0644 $(NETSNMP_DIR)/agent/mibgroup/util_funcs.h $(STAGING_DIR)/usr/include/net-snmp/util_funcs.h - $(INSTALL) -D -m 0644 $(NETSNMP_DIR)/agent/mibgroup/mibincl.h $(STAGING_DIR)/usr/include/net-snmp/library/mibincl.h - $(INSTALL) -D -m 0644 $(NETSNMP_DIR)/agent/mibgroup/header_complex.h $(STAGING_DIR)/usr/include/net-snmp/agent/header_complex.h - $(INSTALL) -D -m 0755 package/netsnmp/S59snmpd $(TARGET_DIR)/etc/init.d/S59snmpd - -netsnmp: host-autoconf $(if $(BR2_PACKAGE_OPENSSL),openssl) $(TARGET_DIR)/usr/sbin/snmpd - -netsnmp-headers: $(TARGET_DIR)/usr/include/net-snmp/net-snmp-config.h - $(INSTALL) -d $(TARGET_DIR)/usr/include/net-snmp - cp -a $(STAGING_DIR)/usr/include/net-snmp $(TARGET_DIR)/usr/include/net-snmp - cp -a $(STAGING_DIR)/usr/include/ucd-snmp $(TARGET_DIR)/usr/include/net-snmp - -netsnmp-source: $(DL_DIR)/$(NETSNMP_SOURCE) - -netsnmp-clean: - -$(MAKE) PREFIX=$(TARGET_DIR) INSTALL_PREFIX=$(TARGET_DIR) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETSNMP_DIR) uninstall - -$(MAKE) -C $(NETSNMP_DIR) clean - -rm -rf $(TARGET_DIR)/etc/snmp/{snmpd{,trapd},mib2c*}.conf \ - $(TARGET_DIR)/etc/default/snmpd \ - $(TARGET_DIR)/usr/include/net-snmp - -netsnmp-dirclean: - rm -rf $(NETSNMP_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_NETSNMP),y) -TARGETS+=netsnmp -endif +define NETSNMP_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install + $(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \ + $(TARGET_DIR)/etc/init.d/S59snmpd +endef + +define NETSNMP_UNINSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) uninstall + rm -f $(TARGET_DIR)/etc/init.d/S59snmpd + rm -f $(TARGET_DIR)/usr/lib/libnetsnmp* +endef + +$(eval $(call AUTOTARGETS,package,netsnmp)) diff --git a/package/samba/samba.mk b/package/samba/samba.mk index 39968a9cb..1c59070d4 100644 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -3,7 +3,7 @@ # samba # ############################################################# -SAMBA_VERSION:=3.3.12 +SAMBA_VERSION:=3.3.13 SAMBA_SOURCE:=samba-$(SAMBA_VERSION).tar.gz SAMBA_SITE:=http://samba.org/samba/ftp/stable/ diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in index b93cc90dd..c0c0043ba 100644 --- a/package/x11r7/Config.in +++ b/package/x11r7/Config.in @@ -29,13 +29,6 @@ config BR2_PACKAGE_XSERVER_tinyx endchoice -config BR2_X11_PREFIX - string - default "/usr/X11R6" if BR2_PACKAGE_XSERVER_xorg - default "/usr" if BR2_PACKAGE_XSERVER_tinyx - help - X11 apps root location - menu "X11R7 Servers" source package/x11r7/xserver_xorg-server/Config.in endmenu diff --git a/toolchain/Config.in b/toolchain/Config.in index ee94143a2..fc9a0487a 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -16,16 +16,10 @@ config BR2_TOOLCHAIN_EXTERNAL endchoice -source "toolchain/Config.in.1" -source "toolchain/external-toolchain/Config.in" - -# we want gdb config in the middle of both source and external -# toolchains, but mconf won't let us source the same file twice, -# so put it here instead -source "toolchain/gdb/Config.in" -comment "Common Toolchain Options" - -source "toolchain/Config.in.2" -source "toolchain/external-toolchain/Config.in.2" +source "toolchain/toolchain-buildroot/Config.in" +source "toolchain/toolchain-external/Config.in" +source "toolchain/toolchain-common.in" +source "toolchain/toolchain-buildroot/Config.in.2" +source "toolchain/toolchain-external/Config.in.2" endmenu diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/helpers.mk index 8be86f53a..5c87d2bfa 100644 --- a/toolchain/external-toolchain/ext-tool.mk +++ b/toolchain/helpers.mk @@ -1,41 +1,6 @@ - -# -# This file implements the support for external toolchains, i.e -# toolchains that have not been produced by Buildroot itself and that -# are already available on the system on which Buildroot runs. So far, -# we have tested this with: -# -# * Toolchains generated by Crosstool-NG -# * Toolchains generated by Buildroot -# * ARM, MIPS and PowerPC toolchains made available by -# Codesourcery. For the MIPS toolchain, the -muclibc variant isn't -# supported yet, only the default glibc-based variant is. -# -# The basic principle is the following -# -# 1. Perform some checks on the conformity between the toolchain -# configuration described in the Buildroot menuconfig system, and the -# real configuration of the external toolchain. This is for example -# important to make sure that the Buildroot configuration system -# knows whether the toolchain supports RPC, IPv6, locales, large -# files, etc. Unfortunately, these things cannot be detected -# automatically, since the value of these options (such as -# BR2_INET_RPC) are needed at configuration time because these -# options are used as dependencies for other options. And at -# configuration time, we are not able to retrieve the external -# toolchain configuration. -# -# 2. Copy the libraries needed at runtime to the target directory, -# $(TARGET_DIR). Obviously, things such as the C library, the dynamic -# loader and a few other utility libraries are needed if dynamic -# applications are to be executed on the target system. -# -# 3. Copy the libraries and headers to the staging directory. This -# will allow all further calls to gcc to be made using --sysroot -# $(STAGING_DIR), which greatly simplifies the compilation of the -# packages when using external toolchains. So in the end, only the -# cross-compiler binaries remains external, all libraries and headers -# are imported into the Buildroot tree. +# This Makefile fragment declares helper functions, usefull to handle +# non- buildroot-built toolchains, eg. purely external toolchains or +# toolchains (internally) built using crosstool-NG. # # Copy a toolchain library and its symbolic links from the sysroot @@ -277,80 +242,3 @@ check_cross_compiler_exists = \ echo "Cannot execute cross-compiler '$(TARGET_CC)'" ; \ exit 1 ; \ fi ; \ - -uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed - -LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) -LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so -endif - -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -USR_LIB_EXTERNAL_LIBS+=libstdc++.so -endif - -ifneq ($(BR2_PTHREADS_NONE),y) -LIB_EXTERNAL_LIBS+=libpthread.so -ifeq ($(BR2_PACKAGE_GDB_SERVER),y) -LIB_EXTERNAL_LIBS+=libthread_db.so -endif # gdbserver -endif # ! no threads - -# SYSROOT_DIR selection. We first try the -print-sysroot option, -# available in gcc 4.4.x and in some Codesourcery toolchains. If this -# option is not available, we fallback to the value of --with-sysroot -# as visible in CROSS-gcc -v. We don't pass any option to gcc that -# could select a multilib variant as we want the "main" sysroot, which -# contains all variants of the C library in the case of multilib -# toolchains. -TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC)) -SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null) -ifeq ($(SYSROOT_DIR),) -SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;') -endif - -# Now, find if the toolchain specifies a sub-directory for the -# specific architecture variant we're interested in. This is the case -# with multilib toolchain, when the selected architecture variant is -# not the default one. To do so, we ask the compiler by passing all -# flags, except the --sysroot flag since we want to the compiler to -# tell us where its original sysroot is. ARCH_SUBDIR will contain the -# subdirectory, in the main SYSROOT_DIR, that corresponds to the -# selected architecture variant. ARCH_SYSROOT_DIR will contain the -# full path to this location. -ARCH_SUBDIR=$(shell $(TARGET_CC_NO_SYSROOT) $(TARGET_CFLAGS) -print-multi-directory) -ARCH_SYSROOT_DIR=$(SYSROOT_DIR)/$(ARCH_SUBDIR) - -$(STAMP_DIR)/ext-toolchain-installed: - @echo "Checking external toolchain settings" - $(Q)$(call check_cross_compiler_exists) -ifeq ($(strip $(SYSROOT_DIR)),) - @echo "External toolchain doesn't support --sysroot. Cannot use." - exit 1 -endif -ifeq ($(BR2_arm),y) - $(Q)$(call check_arm_abi) -endif -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) - $(Q)$(call check_cplusplus) -endif -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) - $(Q)$(call check_uclibc,$(SYSROOT_DIR)) -else - $(Q)$(call check_glibc,$(SYSROOT_DIR)) -endif - mkdir -p $(TARGET_DIR)/lib - @echo "Copy external toolchain libraries to target..." - $(Q)for libs in $(LIB_EXTERNAL_LIBS); do \ - $(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \ - done - $(Q)for libs in $(USR_LIB_EXTERNAL_LIBS); do \ - $(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \ - done - @echo "Copy external toolchain sysroot to staging..." - $(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR)) - # Create lib64 symbolic links if needed - $(Q)if [ -L $(ARCH_SYSROOT_DIR)/lib64 ] ; then \ - $(call create_lib64_symlinks) ; \ - fi - @touch $@ diff --git a/toolchain/toolchain-buildroot.mk b/toolchain/toolchain-buildroot.mk new file mode 100644 index 000000000..d879697e9 --- /dev/null +++ b/toolchain/toolchain-buildroot.mk @@ -0,0 +1,12 @@ +# Include files required for the internal toolchain backend + +include toolchain/dependencies/dependencies.mk +include toolchain/binutils/binutils.mk +include toolchain/ccache/ccache.mk +include toolchain/elf2flt/elf2flt.mk +include toolchain/gcc/gcc-uclibc-4.x.mk +include toolchain/gdb/gdb.mk +include toolchain/kernel-headers/kernel-headers.mk +include toolchain/mklibs/mklibs.mk +include toolchain/sstrip/sstrip.mk +include toolchain/uClibc/uclibc.mk diff --git a/toolchain/Config.in.1 b/toolchain/toolchain-buildroot/Config.in index 5c26858d0..a9dd19240 100644 --- a/toolchain/Config.in.1 +++ b/toolchain/toolchain-buildroot/Config.in @@ -1,4 +1,4 @@ -# +# Config entries for internal toolchain backend if BR2_TOOLCHAIN_BUILDROOT source "toolchain/kernel-headers/Config.in" diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2 new file mode 100644 index 000000000..512a60844 --- /dev/null +++ b/toolchain/toolchain-buildroot/Config.in.2 @@ -0,0 +1,37 @@ +# Buildroot backend specific options + +if BR2_TOOLCHAIN_BUILDROOT +source "toolchain/elf2flt/Config.in" +source "toolchain/mklibs/Config.in" +source "toolchain/sstrip/Config.in" + +config BR2_ENABLE_MULTILIB + bool "Enable multilib support?" + help + Build libraries to support different ABIs. + +config BR2_VFP_FLOAT + bool "Use ARM Vector Floating Point unit" + depends on !BR2_SOFT_FLOAT + depends on BR2_arm || BR2_armeb + help + Setting this option will enable the "-mfpu=vfp" option. + If your ARM CPU has a Vector Floating Point Unit (VFP) + and the toolchain supports the option, then the + code can be optimized. + + Most people will answer N. + +config BR2_CROSS_TOOLCHAIN_TARGET_UTILS + bool "Include target utils in cross toolchain" + default y + help + When using buildroot to build a deployable cross toolchain, + it is handy to include certain target apps with that toolchain + as a convenience. + Examples include ldd, gdbserver, and strace. + + Answer Y if you want these apps (if built) copied into the + cross toolchain dir under <arch>-linux-uclibc/target_utils/. + +endif diff --git a/toolchain/Config.in.2 b/toolchain/toolchain-common.in index 35263ce81..bea0c7c43 100644 --- a/toolchain/Config.in.2 +++ b/toolchain/toolchain-common.in @@ -1,4 +1,12 @@ -# +# Generic toolchain options + +# we want gdb config in the middle of both source and external +# toolchains, but mconf won't let us source the same file twice, +# so put it here instead +source "toolchain/gdb/Config.in" + +comment "Common Toolchain Options" + config BR2_LARGEFILE bool "Enable large file (files > 2 GB) support?" depends on !BR2_cris @@ -162,39 +170,3 @@ config BR2_TARGET_OPTIMIZATION help Optimizations to use when building for the target host. NOTE: gcc optimization level is defined in build options. - -if BR2_TOOLCHAIN_BUILDROOT -source "toolchain/elf2flt/Config.in" -source "toolchain/mklibs/Config.in" -source "toolchain/sstrip/Config.in" - -config BR2_ENABLE_MULTILIB - bool "Enable multilib support?" - help - Build libraries to support different ABIs. - -config BR2_VFP_FLOAT - bool "Use ARM Vector Floating Point unit" - depends on !BR2_SOFT_FLOAT - depends on BR2_arm || BR2_armeb - help - Setting this option will enable the "-mfpu=vfp" option. - If your ARM CPU has a Vector Floating Point Unit (VFP) - and the toolchain supports the option, then the - code can be optimized. - - Most people will answer N. - -config BR2_CROSS_TOOLCHAIN_TARGET_UTILS - bool "Include target utils in cross toolchain" - default y - help - When using buildroot to build a deployable cross toolchain, - it is handy to include certain target apps with that toolchain - as a convenience. - Examples include ldd, gdbserver, and strace. - - Answer Y if you want these apps (if built) copied into the - cross toolchain dir under <arch>-linux-uclibc/target_utils/. - -endif diff --git a/toolchain/toolchain-external.mk b/toolchain/toolchain-external.mk new file mode 100644 index 000000000..6f1f641ac --- /dev/null +++ b/toolchain/toolchain-external.mk @@ -0,0 +1,14 @@ +# Required includes for the external toolchain backend + +include toolchain/helpers.mk +include toolchain/binutils/binutils.mk +include toolchain/ccache/ccache.mk +include toolchain/dependencies/dependencies.mk +include toolchain/elf2flt/elf2flt.mk +include toolchain/gcc/gcc-uclibc-4.x.mk +include toolchain/gdb/gdb.mk +include toolchain/kernel-headers/kernel-headers.mk +include toolchain/mklibs/mklibs.mk +include toolchain/sstrip/sstrip.mk +include toolchain/toolchain-external/ext-tool.mk +include toolchain/uClibc/uclibc.mk diff --git a/toolchain/external-toolchain/Config.in b/toolchain/toolchain-external/Config.in index efc8378c0..efc8378c0 100644 --- a/toolchain/external-toolchain/Config.in +++ b/toolchain/toolchain-external/Config.in diff --git a/toolchain/external-toolchain/Config.in.2 b/toolchain/toolchain-external/Config.in.2 index 489558c0f..489558c0f 100644 --- a/toolchain/external-toolchain/Config.in.2 +++ b/toolchain/toolchain-external/Config.in.2 diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk new file mode 100644 index 000000000..7e4645ddb --- /dev/null +++ b/toolchain/toolchain-external/ext-tool.mk @@ -0,0 +1,115 @@ + +# +# This file implements the support for external toolchains, i.e +# toolchains that have not been produced by Buildroot itself and that +# are already available on the system on which Buildroot runs. So far, +# we have tested this with: +# +# * Toolchains generated by Crosstool-NG +# * Toolchains generated by Buildroot +# * ARM, MIPS and PowerPC toolchains made available by +# Codesourcery. For the MIPS toolchain, the -muclibc variant isn't +# supported yet, only the default glibc-based variant is. +# +# The basic principle is the following +# +# 1. Perform some checks on the conformity between the toolchain +# configuration described in the Buildroot menuconfig system, and the +# real configuration of the external toolchain. This is for example +# important to make sure that the Buildroot configuration system +# knows whether the toolchain supports RPC, IPv6, locales, large +# files, etc. Unfortunately, these things cannot be detected +# automatically, since the value of these options (such as +# BR2_INET_RPC) are needed at configuration time because these +# options are used as dependencies for other options. And at +# configuration time, we are not able to retrieve the external +# toolchain configuration. +# +# 2. Copy the libraries needed at runtime to the target directory, +# $(TARGET_DIR). Obviously, things such as the C library, the dynamic +# loader and a few other utility libraries are needed if dynamic +# applications are to be executed on the target system. +# +# 3. Copy the libraries and headers to the staging directory. This +# will allow all further calls to gcc to be made using --sysroot +# $(STAGING_DIR), which greatly simplifies the compilation of the +# packages when using external toolchains. So in the end, only the +# cross-compiler binaries remains external, all libraries and headers +# are imported into the Buildroot tree. + +uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed + +LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) +LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +USR_LIB_EXTERNAL_LIBS+=libstdc++.so +endif + +ifneq ($(BR2_PTHREADS_NONE),y) +LIB_EXTERNAL_LIBS+=libpthread.so +ifeq ($(BR2_PACKAGE_GDB_SERVER),y) +LIB_EXTERNAL_LIBS+=libthread_db.so +endif # gdbserver +endif # ! no threads + +# SYSROOT_DIR selection. We first try the -print-sysroot option, +# available in gcc 4.4.x and in some Codesourcery toolchains. If this +# option is not available, we fallback to the value of --with-sysroot +# as visible in CROSS-gcc -v. We don't pass any option to gcc that +# could select a multilib variant as we want the "main" sysroot, which +# contains all variants of the C library in the case of multilib +# toolchains. +TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC)) +SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null) +ifeq ($(SYSROOT_DIR),) +SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;') +endif + +# Now, find if the toolchain specifies a sub-directory for the +# specific architecture variant we're interested in. This is the case +# with multilib toolchain, when the selected architecture variant is +# not the default one. To do so, we ask the compiler by passing all +# flags, except the --sysroot flag since we want to the compiler to +# tell us where its original sysroot is. ARCH_SUBDIR will contain the +# subdirectory, in the main SYSROOT_DIR, that corresponds to the +# selected architecture variant. ARCH_SYSROOT_DIR will contain the +# full path to this location. +ARCH_SUBDIR=$(shell $(TARGET_CC_NO_SYSROOT) $(TARGET_CFLAGS) -print-multi-directory) +ARCH_SYSROOT_DIR=$(SYSROOT_DIR)/$(ARCH_SUBDIR) + +$(STAMP_DIR)/ext-toolchain-installed: + @echo "Checking external toolchain settings" + $(Q)$(call check_cross_compiler_exists) +ifeq ($(strip $(SYSROOT_DIR)),) + @echo "External toolchain doesn't support --sysroot. Cannot use." + exit 1 +endif +ifeq ($(BR2_arm),y) + $(Q)$(call check_arm_abi) +endif +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) + $(Q)$(call check_cplusplus) +endif +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) + $(Q)$(call check_uclibc,$(SYSROOT_DIR)) +else + $(Q)$(call check_glibc,$(SYSROOT_DIR)) +endif + mkdir -p $(TARGET_DIR)/lib + @echo "Copy external toolchain libraries to target..." + $(Q)for libs in $(LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \ + done + $(Q)for libs in $(USR_LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \ + done + @echo "Copy external toolchain sysroot to staging..." + $(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR)) + # Create lib64 symbolic links if needed + $(Q)if [ -L $(ARCH_SYSROOT_DIR)/lib64 ] ; then \ + $(call create_lib64_symlinks) ; \ + fi + @touch $@ |