Attempting to build CHDK under OS X - some success, some problems. - page 2 - General Discussion and Assistance - CHDK Forum  

Attempting to build CHDK under OS X - some success, some problems.

  • 15 Replies
  • 9761 Views
*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Attempting to build CHDK under OS X - some success, some problems.
« Reply #10 on: 29 / November / 2008, 12:30:58 »
Advertisements
Hi !

Quote
GCC_VERSION=$(shell $(CC) -dumpversion)
GCC_VERSION_MAJOR=$(firstword $(subst ., ,$(GCC_VERSION)))

# -msoft-float is used per default but object files are marked as hard-float
CFLAGS=-fno-inline -Os -fno-strict-aliasing
# flags for gcc v4
# CFLAGS+=-mcpu=arm946e-s
# for gcc v3, we use to allow use of strd etc
ifeq ($(GCC_VERSION_MAJOR),3)
    CFLAGS+=-march=armv5te
else
    ifeq ($(GCC_VERSION_MAJOR),4)
        # TODO should be -mcpu, but breaks things ATM
        CFLAGS+=-mtune=arm946e-s
    endif
endif

I suppose it is in the above (quoted from makefile.inc); since a couple of versions
the settings are auto-adapted to the compiler version. My guess would be that
your early version 4 has problems with this flag on our current code ?

wim

PS also read this thread gcc. windows dev kit, binary size & the whole ordeal (discussion here) about the
GCC 3 / 4 troubles ...


*

Offline reyalp

  • ******
  • 14082
Re: Attempting to build CHDK under OS X - some success, some problems.
« Reply #11 on: 29 / November / 2008, 18:23:20 »
It depends on how your GCC 4 was built, per the thread whim linked. If you configure with:
../configure --target=arm-elf --prefix=~/arm-tools --enable-languages=c --disable-sanity-checks --disable-shared --disable-newlib --disable-libssp

(note, no CPU specified) it should (?) work.
Don't forget what the H stands for.

*

Offline zeno

  • *****
  • 891
Re: Attempting to build CHDK under OS X - some success, some problems.
« Reply #12 on: 29 / November / 2008, 18:26:49 »
Thanks to both of you. I'll investigate and report back.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline zeno

  • *****
  • 891
Re: Attempting to build CHDK under OS X - some success, some problems.
« Reply #13 on: 30 / November / 2008, 09:58:06 »
When I checked my gcc it says
Code: [Select]
dave-mitchells-imac:trunk509 dave$ arm-elf-gcc -v
Using built-in specs.
Target: arm-elf
Configured with: ./configure --target=arm-elf --prefix=/usr/local/arm --enable-interwork --enable-multilib
    --enable-languages=c,c++ --with-newlib --with-headers=../../src/newlib-1.14.0/newlib/libc/include
Thread model: single
gcc version 4.1.0
So it seems no cpu was specified anyway.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


*

Offline reyalp

  • ******
  • 14082
Re: Attempting to build CHDK under OS X - some success, some problems.
« Reply #14 on: 30 / November / 2008, 16:49:25 »
Interesting. One other difference is that you are using  GCC 4.1.0, while the rest of us using gcc4 are on 4.3.x

You also don't need c++ or newlib support.

Another option would be to build GCC3 using the patch provided in the CHDK source.
Don't forget what the H stands for.

*

Offline zeno

  • *****
  • 891
Re: Attempting to build CHDK under OS X - some success, some problems.
« Reply #15 on: 01 / December / 2008, 07:02:30 »
Many thanks reyalp. I just upgraded to 4.3.2 and everything now compiles!

My total lack of unix experience (after 25 years of PC DOS, OS/2 and Windows) meant it took me quite a time to upgrade. It turns out I needed to selfupgrade my macports first (it was downloading 4.1.0),  deactivate the old arm-elf-gcc, install the latest version and then completely reset my PATH (which had lots of junk in it).
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

 

Related Topics