public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Lack of libsupc++.a on BSD
@ 2008-11-16 20:47 Jesper Skov
  2008-11-17 12:18 ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: Jesper Skov @ 2008-11-16 20:47 UTC (permalink / raw)
  To: ecos-discuss

Hi

BSD/OS X does not provide a static implementation of libsupc++.a. So
my attempted port of the synthetic target to BSD is limping badly.

I happened to find something here
(http://www.ecoscentric.com/ecospro/doc.cgi/html/ref/memalloc-standard-api.html)
that suggests
that using the option CYGFUN_MEMALLOC_MALLOC_CXX_OPERATORS should
allow me to work around this.

But I cannot find that option anywhere. Is it in the ecospro repo only?

Thanks,
Jesper

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Lack of libsupc++.a on BSD
  2008-11-16 20:47 [ECOS] Lack of libsupc++.a on BSD Jesper Skov
@ 2008-11-17 12:18 ` Andrew Lunn
  2008-11-17 14:17   ` Jonathan Larmour
  2008-11-17 22:03   ` [ECOS] Lack of libsupc++.a on BSD Jesper Skov
  0 siblings, 2 replies; 9+ messages in thread
From: Andrew Lunn @ 2008-11-17 12:18 UTC (permalink / raw)
  To: Jesper Skov; +Cc: ecos-discuss

On Sun, Nov 16, 2008 at 03:40:12PM +0100, Jesper Skov wrote:
> Hi
> 
> BSD/OS X does not provide a static implementation of libsupc++.a. So
> my attempted port of the synthetic target to BSD is limping badly.

I synthetic port to BSD/OS X sounds interesting. How similar are the
system calls? Can you just write a i386bsd, or do you have to modify
the HAL arch as well?

> 
> I happened to find something here
> (http://www.ecoscentric.com/ecospro/doc.cgi/html/ref/memalloc-standard-api.html)
> that suggests
> that using the option CYGFUN_MEMALLOC_MALLOC_CXX_OPERATORS should
> allow me to work around this.
> 
> But I cannot find that option anywhere. Is it in the ecospro repo only?

This is only in ecosCentric's closed source port :-( A shame really,
libsupc++.a regularly causes problems for synth, so being able to get
rid of this dependancy would be good.

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Lack of libsupc++.a on BSD
  2008-11-17 12:18 ` Andrew Lunn
@ 2008-11-17 14:17   ` Jonathan Larmour
  2008-11-17 22:06     ` Jesper Skov
  2008-11-17 22:03   ` [ECOS] Lack of libsupc++.a on BSD Jesper Skov
  1 sibling, 1 reply; 9+ messages in thread
From: Jonathan Larmour @ 2008-11-17 14:17 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Jesper Skov, ecos-discuss

Andrew Lunn wrote:
> On Sun, Nov 16, 2008 at 03:40:12PM +0100, Jesper Skov wrote:
>>I happened to find something here
>>(http://www.ecoscentric.com/ecospro/doc.cgi/html/ref/memalloc-standard-api.html)
>>that suggests
>>that using the option CYGFUN_MEMALLOC_MALLOC_CXX_OPERATORS should
>>allow me to work around this.
>>
>>But I cannot find that option anywhere. Is it in the ecospro repo only?
> 
> This is only in ecosCentric's closed source port :-( 

<ahem> That's not closed source. It's under the usual eCos licence, 
distributed as per 3(a) of the GPL.

> A shame really,
> libsupc++.a regularly causes problems for synth, so being able to get
> rid of this dependancy would be good.

Copy the relevant subset of source files from GCC's libsupc++ into the 
synth HAL (probably in a subdir), build it into its own library (compile 
-library=libsupc++-ecos.a .... ?) and use that instead of libsupc++ in the 
linker script. The synth HAL can use CDL requires on 
CYGBLD_HAL_LINKER_GROUPED_LIBS_DEFAULT to do this (a newly added option, 
part of a contribution by eCosCentric :-)).

It's probably safer in its own library due to its slightly different GPL 
exception wording at the top.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Lack of libsupc++.a on BSD
  2008-11-17 12:18 ` Andrew Lunn
  2008-11-17 14:17   ` Jonathan Larmour
@ 2008-11-17 22:03   ` Jesper Skov
  2008-12-28 10:14     ` Jesper Skov
  1 sibling, 1 reply; 9+ messages in thread
From: Jesper Skov @ 2008-11-17 22:03 UTC (permalink / raw)
  To: Jesper Skov, ecos-discuss

On Sun, Nov 16, 2008 at 9:46 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Sun, Nov 16, 2008 at 03:40:12PM +0100, Jesper Skov wrote:
>> Hi
>>
>> BSD/OS X does not provide a static implementation of libsupc++.a. So
>> my attempted port of the synthetic target to BSD is limping badly.
>
> I synthetic port to BSD/OS X sounds interesting. How similar are the
> system calls? Can you just write a i386bsd, or do you have to modify
> the HAL arch as well?

I only cloned the platform folder. It wasn't too hard to make eCos work.

The biggest problem is with the toolchain, really, as the GNU tools
have not been
ported to OS X (or maybe BSD in general, I don't know).

I'll try to post some source to the patches list this week or next, to get some
feedback on the changes. I'll also get started on a copyright assignment with
gnu.org.

Cheers,
Jesper

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Lack of libsupc++.a on BSD
  2008-11-17 14:17   ` Jonathan Larmour
@ 2008-11-17 22:06     ` Jesper Skov
  2008-11-17 22:18       ` [ECOS] init_priority attribute is not supported on this platform krj
  0 siblings, 1 reply; 9+ messages in thread
From: Jesper Skov @ 2008-11-17 22:06 UTC (permalink / raw)
  To: ecos-discuss

On Sun, Nov 16, 2008 at 10:47 PM, Jonathan Larmour <jifl@ecoscentric.com> wrote:
>> A shame really,
>> libsupc++.a regularly causes problems for synth, so being able to get
>> rid of this dependancy would be good.
>
> Copy the relevant subset of source files from GCC's libsupc++ into the synth
> HAL (probably in a subdir), build it into its own library (compile
> -library=libsupc++-ecos.a .... ?) and use that instead of libsupc++ in the
> linker script. The synth HAL can use CDL requires on
> CYGBLD_HAL_LINKER_GROUPED_LIBS_DEFAULT to do this (a newly added option,
> part of a contribution by eCosCentric :-)).

Hm. I might try that.

Depending on the level of hassle, though, I might just post my code as is.
And thus leave the libsupc++ stuff as an exercise for anyone wanting
to use the BSD
synth port for anything more elaborate than running simple HAL tests.

We'll see how far my current eCos itch will take things.

Thanks,
Jesper

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] init_priority attribute is not supported on this platform
  2008-11-17 22:06     ` Jesper Skov
@ 2008-11-17 22:18       ` krj
  2008-11-18  0:04         ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: krj @ 2008-11-17 22:18 UTC (permalink / raw)
  To: ecos-discuss


I have successfully compiled redboot 100 times or so making few modifications along the way, however, just today I am encountering an error in diag.cxx. This is a file that I have never touched or its include files. Here is the error:

diag.cxx 90: "  'init_priority' attribute is not supported on this platform "

Any comments?


      

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] init_priority attribute is not supported on this  platform
  2008-11-17 22:18       ` [ECOS] init_priority attribute is not supported on this platform krj
@ 2008-11-18  0:04         ` Andrew Lunn
  2008-11-18  1:45           ` krj
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2008-11-18  0:04 UTC (permalink / raw)
  To: krj; +Cc: ecos-discuss

On Mon, Nov 17, 2008 at 02:02:17PM -0800, krj wrote:
> 
> I have successfully compiled redboot 100 times or so making few modifications along the way, however, just today I am encountering an error in diag.cxx. This is a file that I have never touched or its include files. Here is the error:
> 
> diag.cxx 90: "  'init_priority' attribute is not supported on this platform "
> 
> Any comments?

Have you changed your toolchain?

     Andrew 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] init_priority attribute is not supported on this  platform
  2008-11-18  0:04         ` Andrew Lunn
@ 2008-11-18  1:45           ` krj
  0 siblings, 0 replies; 9+ messages in thread
From: krj @ 2008-11-18  1:45 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

You're the man. My toolchain pointer was pointing to the wrong cross-compiler version.. I fixed it to point to the gnutools from ecos.  All is well again.



--- On Mon, 11/17/08, Andrew Lunn <andrew@lunn.ch> wrote:

> From: Andrew Lunn <andrew@lunn.ch>
> Subject: Re: [ECOS] init_priority attribute is not supported on this  platform
> To: "krj" <krjaz@yahoo.com>
> Cc: ecos-discuss@ecos.sourceware.org
> Date: Monday, November 17, 2008, 2:06 PM
> On Mon, Nov 17, 2008 at 02:02:17PM -0800, krj wrote:
> > 
> > I have successfully compiled redboot 100 times or so
> making few modifications along the way, however, just today
> I am encountering an error in diag.cxx. This is a file that
> I have never touched or its include files. Here is the
> error:
> > 
> > diag.cxx 90: "  'init_priority' attribute
> is not supported on this platform "
> > 
> > Any comments?
> 
> Have you changed your toolchain?
> 
>      Andrew 
> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss


      

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Lack of libsupc++.a on BSD
  2008-11-17 22:03   ` [ECOS] Lack of libsupc++.a on BSD Jesper Skov
@ 2008-12-28 10:14     ` Jesper Skov
  0 siblings, 0 replies; 9+ messages in thread
From: Jesper Skov @ 2008-12-28 10:14 UTC (permalink / raw)
  To: Jesper Skov, ecos-discuss

On Mon, Nov 17, 2008 at 7:17 PM, Jesper Skov <jskov@zoftcorp.dk> wrote:
> On Sun, Nov 16, 2008 at 9:46 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> On Sun, Nov 16, 2008 at 03:40:12PM +0100, Jesper Skov wrote:
>>> Hi
>>>
>>> BSD/OS X does not provide a static implementation of libsupc++.a. So
>>> my attempted port of the synthetic target to BSD is limping badly.
>>
>> I synthetic port to BSD/OS X sounds interesting. How similar are the
>> system calls? Can you just write a i386bsd, or do you have to modify
>> the HAL arch as well?
>
> I only cloned the platform folder. It wasn't too hard to make eCos work.
>
> The biggest problem is with the toolchain, really, as the GNU tools
> have not been
> ported to OS X (or maybe BSD in general, I don't know).
>
> I'll try to post some source to the patches list this week or next, to get some
> feedback on the changes. I'll also get started on a copyright assignment with
> gnu.org.

As should be evident, "this week or next" has not come by yet.

I have had the occasional stab at the linker problems I am
experiencing with the Mac tools without getting any further.

Basically, handling of C++ constructors is (as far as I can figure
out) handled by the dynamic linker used with the MachO file format. So
the constructor code is not "loaded". Which makes it rather hard to
call after eCos gets started.

I have tried to let the dynamic linker call the constructors, but
never got it to work. Not sure why. And I am now fresh out of ideas.

So I will try to post patches with the stuff I have made (probably
earlyish in the new year). Anyone wanting to use it on an ELF-based
BSD system will probably be able to use most of it without problems.

I have sent copyright assignment stuff to FSF, but never heard back. I
guess I will have to resend.


Not how I had hoped this would play out. Oh well... :)

Cheers,
Jesper

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2008-12-27 21:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-16 20:47 [ECOS] Lack of libsupc++.a on BSD Jesper Skov
2008-11-17 12:18 ` Andrew Lunn
2008-11-17 14:17   ` Jonathan Larmour
2008-11-17 22:06     ` Jesper Skov
2008-11-17 22:18       ` [ECOS] init_priority attribute is not supported on this platform krj
2008-11-18  0:04         ` Andrew Lunn
2008-11-18  1:45           ` krj
2008-11-17 22:03   ` [ECOS] Lack of libsupc++.a on BSD Jesper Skov
2008-12-28 10:14     ` Jesper Skov

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).