From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27465 invoked by alias); 2 Jul 2013 21:19:43 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 27455 invoked by uid 89); 2 Jul 2013 21:19:43 -0000 X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-lb0-f172.google.com (HELO mail-lb0-f172.google.com) (209.85.217.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 02 Jul 2013 21:19:41 +0000 Received: by mail-lb0-f172.google.com with SMTP id v20so3783470lbc.3 for ; Tue, 02 Jul 2013 14:19:38 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.21.131 with SMTP id v3mr15424447lae.50.1372799978517; Tue, 02 Jul 2013 14:19:38 -0700 (PDT) Received: by 10.112.234.229 with HTTP; Tue, 2 Jul 2013 14:19:38 -0700 (PDT) In-Reply-To: References: <7D80292E-5B9B-4398-88EA-F3113805A673@cogs.com> Date: Tue, 02 Jul 2013 21:19:00 -0000 Message-ID: Subject: Re: Canadian build for AVR From: "jonsmirl@gmail.com" To: Trevor Woerner Cc: "crossgcc@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-07/txt/msg00003.txt.bz2 I believe this is the Makefile for building the compiler.... # # Copyright (C) 2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=gcc PKG_VERSION:=4.7.2 PKG_RELEASE:=1 PATCH_DIR=$(TOPDIR)/toolchain/gcc/patches/4.7.2 PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_MD5SUM:= PKG_BUILD_DEPENDS:=+gmp +mpc +mpfr include $(INCLUDE_DIR)/package.mk SEP:=, TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)" EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc) define Package/gcc SECTION:=devel CATEGORY:=Development TITLE:=gcc DEPENDS:=@NO_STRIP endef define Package/gcc/description build a native toolchain for compiling on target endef define Build/Prepare $(call Build/Prepare/Default) $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1\2,' $(PKG_BUILD_DIR)/gcc/version.c (cd $(PKG_BUILD_DIR); autoreconf;); (cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;); $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure endef define Build/Configure (cd $(PKG_BUILD_DIR); rm -f config.cache; \ SHELL="$(BASH)" \ $(TARGET_CONFIGURE_OPTS) \ $(PKG_BUILD_DIR)/configure \ $(TARGET_CONFIGURE_ARGS) \ --build=$(GNU_HOST_NAME) \ --host=mipsel \ --target=avr \ --enable-languages=$(TARGET_LANGUAGES) \ --enable-shared \ --with-system-zlib \ --enable-long-long \ --enable-nls \ --disable-shared \ --without-included-gettext \ --disable-libssp \ $(EXTRA_TARGET) \ $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ ); endef define Build/Compile export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE_ARGS) all-gcc install # Set up the symlinks to enable lying about target name. set -e; \ (cd $(TOOLCHAIN_DIR); \ ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ cd bin; \ for app in $(REAL_GNU_TARGET_NAME)-* ; do \ ln -sf $$$${app} \ $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); endef define Package/gcc/install $(INSTALL_DIR) $(1)/usr/lib/ cp -r $(PKG_INSTALL_DIR)/* $(1) cp -r $(TOOLCHAIN_DIR)/include $(1)/usr/ cp $(TOOLCHAIN_DIR)/lib/crt* $(1)/usr/lib/ cp $(TOOLCHAIN_DIR)/lib/libc.so $(1)/usr/lib/ endef $(eval $(call BuildPackage,gcc)) On Tue, Jul 2, 2013 at 5:16 PM, jonsmirl@gmail.com wrote: > On Tue, Jul 2, 2013 at 3:15 PM, Trevor Woerner wrote: >> Hi Jon, >> >> On Fri, May 10, 2013 at 11:32 PM, jonsmirl@gmail.com wrote: >>>> On Fri, May 10, 2013 at 9:26 AM, Ben Greenfield wrote: >>>> There isn't AVR8 support in crosstool-ng. But gcc supports it. I am >>>> trying to put together my own makefiles to build it without >>>> crosstool-ng support. > > I did get this working. But we started working on something else and > I've seem to have lost the Makefiles. The idea was to make a dev > environment for the new Arduino Yun. I did get the compiler and > libraries built and they did work on a MIPS CPU with only 32MB RAM. > > In general everything works if you do it from a 32b host. Something is > messed up in gcc when doing cross 64b-32b-8b. The messed up bit is in > the 64b-32b part. 32b-32b-8b works. I seem to recall moving to a very > recent gcc and this problem went away. > > There is also a path that is wrong is wrong in the gcc Makefile when > building one of the libraries. It builds the library in gcc instead of > gcc/target. Then later steps can't find the library. The Makefile is > missing something like $(TARGET) in the path construction. > > So in general you don't need to do anything special except to fix that > path in the Makefile. Fixing it is fairly obvious, the build will stop > saying it can't find the library. > > I was building these inside of OpenWRT so the Makefile were specific > to that environment. > > > >>>> >>>>> If you did get it working I would love an overall description of your environment and workflow. >> >> I was just wondering if you were interested in making your >> procedure/makefiles available? Is there any reason your method >> couldn't be added to ct-ng? >> >> Best regards, >> Trevor > > > > -- > Jon Smirl > jonsmirl@gmail.com -- Jon Smirl jonsmirl@gmail.com -- For unsubscribe information see http://sourceware.org/lists.html#faq