[haiku-development] Re: Objective-C

  • From: Grzegorz Dąbrowski <grzegorz.dabrowski@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 18 Apr 2010 08:11:11 +0000

On Sun, Apr 18, 2010 at 5:10 AM, David Couzelis <drcouzelis@xxxxxxxxx> wrote:
> I would like to use the GCC Objective-C compiler in Haiku. The only
> information I have read about it is here:
> http://www.haiku-os.org/community/forum/would_it_be_trivial_build_gcc4_objectivec_haiku
>
> Are there any reasons Objective-C is not included already?
>
> Alternatively, is there a place where I can get a copy of the GCC4
> source code that is used to make the Haiku optional package? I could
> look into compiling it myself.

If you do not want to build cross compiler, it is simple. Download the
source, please use the gcc-4.5 and my patches based on changes from
official haiku buildtools
http://svn.gna.org/viewcvs/pingwinek/trunk/packages/gcc/

At least hello world program works.

~> uname -a
Haiku localhost 1 r36330 Apr 16 2010 16:41:52 BePC Haiku
~> cat hello.m
#import <stdio.h>

int main( int argc, const char *argv[] ) {
    printf( "hello world\n" );
    return 0;
}
~> gcc hello.m -o hello
~> ./hello
hello world
~> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/boot/common/lib/gcc/i586-pc-haiku/4.5.0/lto-wrapper
Target: i586-pc-haiku
Configured with: ./configure --prefix=/boot/common
--with-local-prefix=/boot/common --infodir=/boot/common/share/info
--mandir=/boot/common/share/man --libdir=/boot/common/lib
--libexecdir=/boot/common/lib --disable-multilib
--enable-checking=release --enable-shared
--enable-languages=c,c++,objc,obj-c++,java,fortran --disable-libgomp
--disable-libmudflap --enable-long-long --enable-threads=posix
--disable-nls --with-system-zlib --with-slibdir=/boot/common/lib
--enable-__cxa_atexit --disable-libunwind-exceptions
--disable-libstdcxx-pch --enable-clocale=gnu --enable-libgcj
--enable-libgcj-multifile --disable-gconf-peer --enable-jni
--enable-xmlj --disable-dssi --disable-plugin --disable-java-awt
--with-java-home=/boot/common/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
Thread model: posix
gcc version 4.5.0 (GCC)


-- 
Grzegorz Dąbrowski (kaliber)
http://tiltos.com
http://home.gna.org/pingwinek/

Other related posts: