building on osx

  • Follow


Has anyone built lcc on osx ?
0
Reply Naveen 4/29/2010 3:21:12 AM

Naveen a �crit :
> Has anyone built lcc on osx ?
I have built lcc-win in osx

Plain lcc should be very easy.
0
Reply jacob 4/29/2010 8:45:04 AM


I tried copying etc/linux.c to etc/osx.c
export BUILDDIR=3D~/source/lcc/x86/linux
cp -p -R include/x86/linux/* $BUILDDIR/include
ln -s /usr/lib/gcc/i686-apple-darwin10/4.2.1 $BUILDDIR/gcc

then:  make HOSTFILE=3Detc/osx.c lcc
then: make all

I get error:
cc -g -c -Icpp -o /Users/naveen/source/lcc/x86/linux/unix.o cpp/unix.c
cpp/unix.c:96: error: expected declaration specifiers or =91...=92 before
numeric constant

I am running osX snow leopard.
0
Reply Naveen 5/3/2010 11:16:23 PM

Naveen a �crit :
> I tried copying etc/linux.c to etc/osx.c
> export BUILDDIR=~/source/lcc/x86/linux
> cp -p -R include/x86/linux/* $BUILDDIR/include
> ln -s /usr/lib/gcc/i686-apple-darwin10/4.2.1 $BUILDDIR/gcc
> 
> then:  make HOSTFILE=etc/osx.c lcc
> then: make all
> 
> I get error:
> cc -g -c -Icpp -o /Users/naveen/source/lcc/x86/linux/unix.o cpp/unix.c
> cpp/unix.c:96: error: expected declaration specifiers or �...� before
> numeric constant
> 
> I am running osX snow leopard.

It is really an problem to fix.
Just look at the surrounding comments

0
Reply jacob 5/3/2010 11:33:18 PM

> > I get error:
> > cc -g -c -Icpp -o /Users/naveen/source/lcc/x86/linux/unix.o cpp/unix.c
> > cpp/unix.c:96: error: expected declaration specifiers or =91...=92 befo=
re
> > numeric constant
>
> > I am running osX snow leopard.
>
> It is really an problem to fix.
> Just look at the surrounding comments

ok thanks, just commented out the memove function definition in
unix.c.
It builds.

make TARGET=3Dx86/linux test
fails at switch.s with:
In file included from /usr/include/stdio.h:444,
                 from tst/yacc.c:20:
/usr/include/secure/_stdio.h:46: error: syntax error in macro
parameter list
/usr/include/secure/_stdio.h:53: error: syntax error in macro
parameter list


make triple
fails with:
In file included from /usr/include/stdio.h:444,
                 from src/c.h:5,
                 from src/init.c:2:
/usr/include/secure/_stdio.h:46: error: syntax error in macro
parameter list
0
Reply Naveen 5/4/2010 12:57:14 AM

Naveen a �crit :
> In file included from /usr/include/stdio.h:444,
>                  from src/c.h:5,
>                  from src/init.c:2:
> /usr/include/secure/_stdio.h:46: error: syntax error in macro
> parameter list

You can't use the Apple includes since they are specific to Apple's 
version of gcc. You have to rewrite ALL header files in a compatible way 
so that a normal compiler will compile them. I am doing that for 
lcc-win. That is the main difficulty of the Macintosh port.

Sorry about the bad news.
0
Reply jacob 5/4/2010 6:45:01 AM

On May 4, 1:45=A0am, jacob navia <ja...@spamsink.net> wrote:
> You have to rewrite ALL header files in a compatible way
> so that a normal compiler will compile them. I am doing that for
> lcc-win. That is the main difficulty of the Macintosh port.
>
> Sorry about the bad news.

That's too bad.
I will play on linux until I know some more I guess.
Thanks for responding.
0
Reply Naveen 5/4/2010 5:18:19 PM

6 Replies
354 Views

(page loaded in 0.084 seconds)

Similiar Articles:













7/24/2012 6:03:52 PM


Reply: