public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Canadian build for AVR
@ 2013-05-08 22:32 jonsmirl
  2013-05-09 10:49 ` Martin Guy
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-05-08 22:32 UTC (permalink / raw)
  To: crossgcc

I've been trying to do a Canadian build for the Avr32 without much
success. I get lots of different compile failures depending on which
releases of the various components I pick.

I used this approach..

apt-get install avc-gcc, etc...
This is for building the libraries. Haven't gotten that far yet.

Download OpenWrt git, select a target of MIPS Ralink 3050. That will
build the MIPS cross compiler with uclibc support for the target.
Many gcc verisions to pick from including the linaro builds. This step
works fine.

Use crosstool-ng to try and do the Canadian build.
build = x86
host = mipsel + uclibc
target = avr bare metal.
point it at the OpenWrt compiler.

I tried a dozen different versions of the various tools and couldn't
get anything to finish a compile.
I also don't see how to set the host for a uclibc build.

My crazy idea is to repurpose routers as a cheap IDE for Arduinos. I
need the avr compiler on the router to do that. The routers only have
32-64MB of memory and slow flash for disk. So native compilation of
something large (like gcc) is painful.

--
Jon Smirl
jonsmirl@gmail.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-08 22:32 Canadian build for AVR jonsmirl
@ 2013-05-09 10:49 ` Martin Guy
  2013-05-09 12:15   ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Guy @ 2013-05-09 10:49 UTC (permalink / raw)
  To: jonsmirl; +Cc: crossgcc

Hi Jon

On 9 May 2013 00:32, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
> I've been trying to do a Canadian build for the Avr32 without much
> success. I get lots of different compile failures depending on which
> releases of the various components I pick.
>
> I used this approach..
>
> apt-get install avc-gcc, etc...

Sorry, are you working for the AVR or AVR32? They are two totally
different processors, AVR has GCC support in mainline but not in
crosstool-ng. AVR32 does not have support in mainline GCC but does in
crosstool, thanks to several megabytes of patches for gcc-4.2.2,
binutils-2.18 and newlib-1.17

Mind you, I can't see GCC running on the 8-bit AVR processors, so I
assume you mean AVR32, in which case you might start from here:
http://spaces.atmel.com/gf/project/ct-ng/
which has patches for AVR32 for more versions, up to gcc-4.4.7.

That said, the current AVR32 stuff in crosstool-ng only supports
newlib on bare-metal targets if I understand correctly. What operating
system environment platform are you wanting the ct-ng-generated
compiler to run on?
  I think the AVR32 patches have support for uclinux (or had... I fear
I may have diked that part out while pruning the patches for my
project).  Do you maybe have linux/uclibc running on AVR32?

   M

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-09 10:49 ` Martin Guy
@ 2013-05-09 12:15   ` jonsmirl
  2013-05-09 22:26     ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-05-09 12:15 UTC (permalink / raw)
  To: Martin Guy; +Cc: crossgcc

On Thu, May 9, 2013 at 6:49 AM, Martin Guy <martinwguy@gmail.com> wrote:
> Hi Jon
>
> On 9 May 2013 00:32, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
>> I've been trying to do a Canadian build for the Avr32 without much
>> success. I get lots of different compile failures depending on which
>> releases of the various components I pick.
>>
>> I used this approach..
>>
>> apt-get install avc-gcc, etc...
>
> Sorry, are you working for the AVR or AVR32? They are two totally
> different processors, AVR has GCC support in mainline but not in
> crosstool-ng. AVR32 does not have support in mainline GCC but does in
> crosstool, thanks to several megabytes of patches for gcc-4.2.2,
> binutils-2.18 and newlib-1.17

Target is the 8-bit AVR. I was confused and thought that the AVR32
compilers worked for both CPUs. I need the AVR8 gcc.

So crosstool-ng is missing AVR8 support which is my final target. That
probably rules it out.

> Mind you, I can't see GCC running on the 8-bit AVR processors, so I
> assume you mean AVR32, in which case you might start from here:
> http://spaces.atmel.com/gf/project/ct-ng/
> which has patches for AVR32 for more versions, up to gcc-4.4.7.

Compiler needs to run on a mipel with uclibc.

So it is:
x86 --> mipsel (uclibs) --> AVR8 (bare metal)

----------------

I'm trying a couple of other schemes too...
Using the Openwrt cross build environment to make the AVR8 compiler.
I am missing all of the makefile for this and haven't found a combo
yet that builds.

Using Debian on a mipel emulator.
I have the make files for the AVR8 compiler, but I need to figure out
how to modify them to build for mipsel/uclibc instead of normal
Debian.


> That said, the current AVR32 stuff in crosstool-ng only supports
> newlib on bare-metal targets if I understand correctly. What operating
> system environment platform are you wanting the ct-ng-generated
> compiler to run on?
>   I think the AVR32 patches have support for uclinux (or had... I fear
> I may have diked that part out while pruning the patches for my
> project).  Do you maybe have linux/uclibc running on AVR32?
>
>    M



--
Jon Smirl
jonsmirl@gmail.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-09 12:15   ` jonsmirl
@ 2013-05-09 22:26     ` jonsmirl
  2013-05-09 23:12       ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-05-09 22:26 UTC (permalink / raw)
  To: Martin Guy; +Cc: crossgcc

I'm making some progress. I'm currently stuck on this error.

gcc -c -DIN_GCC    -DGENERATOR_FILE -I. -Ibuild -I../.././gcc
-I../.././gcc/build -I../.././gcc/../include -I./../intl
-I../.././gcc/../libcpp/include  -I../.././gcc/../libdecnumber
-I../.././gcc/../libdecnumber/dpd -I../libdecnumber    \
-o build/genflags.o ../.././gcc/genflags.c
In file included from ../.././gcc/rtl.h:28:0,
                 from ../.././gcc/genflags.c:28:
../.././gcc/real.h:77:13: error: size of array 'test_real_width' is negative
make[6]: *** [build/genflags.o] Error 1
make[6]: Leaving directory
`/home/apps/openwrt/build_dir/target-mipsel_uClibc-0.9.33.2/gcc-4.7.2/host-mipsel-openwrt-linux-uclibc/gcc'
make[5]: *** [all-gcc] Error 2

On Thu, May 9, 2013 at 8:15 AM, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
> On Thu, May 9, 2013 at 6:49 AM, Martin Guy <martinwguy@gmail.com> wrote:
>> Hi Jon
>>
>> On 9 May 2013 00:32, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
>>> I've been trying to do a Canadian build for the Avr32 without much
>>> success. I get lots of different compile failures depending on which
>>> releases of the various components I pick.
>>>
>>> I used this approach..
>>>
>>> apt-get install avc-gcc, etc...
>>
>> Sorry, are you working for the AVR or AVR32? They are two totally
>> different processors, AVR has GCC support in mainline but not in
>> crosstool-ng. AVR32 does not have support in mainline GCC but does in
>> crosstool, thanks to several megabytes of patches for gcc-4.2.2,
>> binutils-2.18 and newlib-1.17
>
> Target is the 8-bit AVR. I was confused and thought that the AVR32
> compilers worked for both CPUs. I need the AVR8 gcc.
>
> So crosstool-ng is missing AVR8 support which is my final target. That
> probably rules it out.
>
>> Mind you, I can't see GCC running on the 8-bit AVR processors, so I
>> assume you mean AVR32, in which case you might start from here:
>> http://spaces.atmel.com/gf/project/ct-ng/
>> which has patches for AVR32 for more versions, up to gcc-4.4.7.
>
> Compiler needs to run on a mipel with uclibc.
>
> So it is:
> x86 --> mipsel (uclibs) --> AVR8 (bare metal)
>
> ----------------
>
> I'm trying a couple of other schemes too...
> Using the Openwrt cross build environment to make the AVR8 compiler.
> I am missing all of the makefile for this and haven't found a combo
> yet that builds.
>
> Using Debian on a mipel emulator.
> I have the make files for the AVR8 compiler, but I need to figure out
> how to modify them to build for mipsel/uclibc instead of normal
> Debian.
>
>
>> That said, the current AVR32 stuff in crosstool-ng only supports
>> newlib on bare-metal targets if I understand correctly. What operating
>> system environment platform are you wanting the ct-ng-generated
>> compiler to run on?
>>   I think the AVR32 patches have support for uclinux (or had... I fear
>> I may have diked that part out while pruning the patches for my
>> project).  Do you maybe have linux/uclibc running on AVR32?
>>
>>    M
>
>
>
> --
> Jon Smirl
> jonsmirl@gmail.com



-- 
Jon Smirl
jonsmirl@gmail.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-09 22:26     ` jonsmirl
@ 2013-05-09 23:12       ` jonsmirl
  2013-05-10 13:26         ` Ben Greenfield
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-05-09 23:12 UTC (permalink / raw)
  To: Martin Guy; +Cc: crossgcc

Configured with --enable-long-long
Preprocessor output:

struct real_value {
  unsigned int cl : 2;
  unsigned int decimal : 1;
  unsigned int sign : 1;
  unsigned int signalling : 1;
  unsigned int canonical : 1;
  unsigned int uexp : (32 - 6);
  unsigned long sig[((128 + (8 * 4)) / (8 * 4))];
};
# 77 "../.././gcc/real.h"
extern char test_real_width
  [sizeof(struct real_value) <= (((128 + (8 * 4)) + 32)/(8 * 8) +
(((128 + (8 * 4)) + 32)%(8 * 8) ? 1 : 0))*sizeof(long long) ? 1 : -1];

--
Jon Smirl
jonsmirl@gmail.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-09 23:12       ` jonsmirl
@ 2013-05-10 13:26         ` Ben Greenfield
  2013-05-10 14:33           ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: Ben Greenfield @ 2013-05-10 13:26 UTC (permalink / raw)
  To: jonsmirl; +Cc: crossgcc

Hey Jon, Hey all,

I lurk on this list and don't quite follow your thread. My understanding was without 8bit avr support you would try something else. Then lo and behold you report progress then success.

If you did get it working I would love an overall description of your environment and workflow.

Thanks,

Ben

On May 9, 2013, at 7:12 PM, "jonsmirl@gmail.com" <jonsmirl@gmail.com> wrote:

> Configured with --enable-long-long
> Preprocessor output:
> 
> struct real_value {
>  unsigned int cl : 2;
>  unsigned int decimal : 1;
>  unsigned int sign : 1;
>  unsigned int signalling : 1;
>  unsigned int canonical : 1;
>  unsigned int uexp : (32 - 6);
>  unsigned long sig[((128 + (8 * 4)) / (8 * 4))];
> };
> # 77 "../.././gcc/real.h"
> extern char test_real_width
>  [sizeof(struct real_value) <= (((128 + (8 * 4)) + 32)/(8 * 8) +
> (((128 + (8 * 4)) + 32)%(8 * 8) ? 1 : 0))*sizeof(long long) ? 1 : -1];
> 
> --
> Jon Smirl
> jonsmirl@gmail.com
> 
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
> 

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-10 13:26         ` Ben Greenfield
@ 2013-05-10 14:33           ` jonsmirl
  2013-05-11  3:33             ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-05-10 14:33 UTC (permalink / raw)
  To: Ben Greenfield; +Cc: crossgcc

On Fri, May 10, 2013 at 9:26 AM, Ben Greenfield <ben@cogs.com> wrote:
> Hey Jon, Hey all,
>
> I lurk on this list and don't quite follow your thread. My understanding was without 8bit avr support you would try something else. Then lo and behold you report progress then success.

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 think the test_real_width issues comes from using 64b x86 as my host
and then building using a 32b compiler (mipsel).


>
> If you did get it working I would love an overall description of your environment and workflow.
>
> Thanks,
>
> Ben
>
> On May 9, 2013, at 7:12 PM, "jonsmirl@gmail.com" <jonsmirl@gmail.com> wrote:
>
>> Configured with --enable-long-long
>> Preprocessor output:
>>
>> struct real_value {
>>  unsigned int cl : 2;
>>  unsigned int decimal : 1;
>>  unsigned int sign : 1;
>>  unsigned int signalling : 1;
>>  unsigned int canonical : 1;
>>  unsigned int uexp : (32 - 6);
>>  unsigned long sig[((128 + (8 * 4)) / (8 * 4))];
>> };
>> # 77 "../.././gcc/real.h"
>> extern char test_real_width
>>  [sizeof(struct real_value) <= (((128 + (8 * 4)) + 32)/(8 * 8) +
>> (((128 + (8 * 4)) + 32)%(8 * 8) ? 1 : 0))*sizeof(long long) ? 1 : -1];
>>
>> --
>> Jon Smirl
>> jonsmirl@gmail.com
>>
>> --
>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>



--
Jon Smirl
jonsmirl@gmail.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-10 14:33           ` jonsmirl
@ 2013-05-11  3:33             ` jonsmirl
  2013-07-02 19:15               ` Trevor Woerner
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-05-11  3:33 UTC (permalink / raw)
  To: Ben Greenfield; +Cc: crossgcc

Doing the Canadian build on 32b x86 worked first try. Something is
broken in gcc when doing a 64b -> 32b -> 8b build. 32b->32b->8b works.

On Fri, May 10, 2013 at 10:33 AM, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
> On Fri, May 10, 2013 at 9:26 AM, Ben Greenfield <ben@cogs.com> wrote:
>> Hey Jon, Hey all,
>>
>> I lurk on this list and don't quite follow your thread. My understanding was without 8bit avr support you would try something else. Then lo and behold you report progress then success.
>
> 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 think the test_real_width issues comes from using 64b x86 as my host
> and then building using a 32b compiler (mipsel).
>
>
>>
>> If you did get it working I would love an overall description of your environment and workflow.
>>
>> Thanks,
>>
>> Ben
>>
>> On May 9, 2013, at 7:12 PM, "jonsmirl@gmail.com" <jonsmirl@gmail.com> wrote:
>>
>>> Configured with --enable-long-long
>>> Preprocessor output:
>>>
>>> struct real_value {
>>>  unsigned int cl : 2;
>>>  unsigned int decimal : 1;
>>>  unsigned int sign : 1;
>>>  unsigned int signalling : 1;
>>>  unsigned int canonical : 1;
>>>  unsigned int uexp : (32 - 6);
>>>  unsigned long sig[((128 + (8 * 4)) / (8 * 4))];
>>> };
>>> # 77 "../.././gcc/real.h"
>>> extern char test_real_width
>>>  [sizeof(struct real_value) <= (((128 + (8 * 4)) + 32)/(8 * 8) +
>>> (((128 + (8 * 4)) + 32)%(8 * 8) ? 1 : 0))*sizeof(long long) ? 1 : -1];
>>>
>>> --
>>> Jon Smirl
>>> jonsmirl@gmail.com
>>>
>>> --
>>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>>
>
>
>
> --
> Jon Smirl
> jonsmirl@gmail.com



-- 
Jon Smirl
jonsmirl@gmail.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-05-11  3:33             ` jonsmirl
@ 2013-07-02 19:15               ` Trevor Woerner
  2013-07-02 21:16                 ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: Trevor Woerner @ 2013-07-02 19:15 UTC (permalink / raw)
  To: jonsmirl; +Cc: crossgcc

Hi Jon,

On Fri, May 10, 2013 at 11:32 PM, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
>> On Fri, May 10, 2013 at 9:26 AM, Ben Greenfield <ben@cogs.com> 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.
>>
>>> 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

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-07-02 19:15               ` Trevor Woerner
@ 2013-07-02 21:16                 ` jonsmirl
  2013-07-02 21:19                   ` jonsmirl
  0 siblings, 1 reply; 11+ messages in thread
From: jonsmirl @ 2013-07-02 21:16 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: crossgcc

On Tue, Jul 2, 2013 at 3:15 PM, Trevor Woerner <twoerner@gmail.com> wrote:
> Hi Jon,
>
> On Fri, May 10, 2013 at 11:32 PM, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
>>> On Fri, May 10, 2013 at 9:26 AM, Ben Greenfield <ben@cogs.com> 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

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Canadian build for AVR
  2013-07-02 21:16                 ` jonsmirl
@ 2013-07-02 21:19                   ` jonsmirl
  0 siblings, 0 replies; 11+ messages in thread
From: jonsmirl @ 2013-07-02 21:19 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: crossgcc

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<URL:https://dev.openwrt.org/>\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 <jonsmirl@gmail.com> wrote:
> On Tue, Jul 2, 2013 at 3:15 PM, Trevor Woerner <twoerner@gmail.com> wrote:
>> Hi Jon,
>>
>> On Fri, May 10, 2013 at 11:32 PM, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
>>>> On Fri, May 10, 2013 at 9:26 AM, Ben Greenfield <ben@cogs.com> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-07-02 21:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 22:32 Canadian build for AVR jonsmirl
2013-05-09 10:49 ` Martin Guy
2013-05-09 12:15   ` jonsmirl
2013-05-09 22:26     ` jonsmirl
2013-05-09 23:12       ` jonsmirl
2013-05-10 13:26         ` Ben Greenfield
2013-05-10 14:33           ` jonsmirl
2013-05-11  3:33             ` jonsmirl
2013-07-02 19:15               ` Trevor Woerner
2013-07-02 21:16                 ` jonsmirl
2013-07-02 21:19                   ` jonsmirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).