Hello Rick,

Your patch is working. I found this out for some minutes too.
And changed it to

static __inline__

like in parport.c and gdb_server.c

But I had problems to commit from my Mac here. I have send 
Oyvind a message and asked if he commit it in the next patch 
from him.

I think you can commit it. Many thanks for the explanation
with the -O0 mistake here.

Best regards,

Michael

-----Ursprungliche Nachricht-----
Von: Rick Altherr [mailto:[email protected]]
Gesendet: Freitag, 8. Mai 2009 20:47
An: Michael Fischer
Cc: Zach Welch; Openocd-Dev
Betreff: Re: AW: [Openocd-development] Mac OS X: Broken build 1621 and
above (part 2)


It looks like flash_address() is missing a prototype in cfi.c which is  
causing link problems, but only if you are building -O0.  You do that  
accidentally by overriding CFLAGS.  The default CFLAGS is '-g -O2',  
but by setting it to '-I/opt/local/libusb-0.1.12/include' gcc defaults  
back to -O0.

Specifically, flash_address is defined in cfi.c and has the __inline__  
attribute but there is no prototype.  For -O0, inlining is ignored, so  
the callsites expect a function named flash_address to be generated,  
but gcc seems to not do so.  For -O2, the callsites are inlined, so it  
builds.

Please try the attached patch.


_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to