[cfe-commits] [PATCH] Haiku support

Paul Davey plmdvy at gmail.com
Sun Apr 11 01:02:07 PDT 2010


sorry forgot to send to list :(

---------- Forwarded message ----------
From: Paul Davey <plmdvy at gmail.com>
Date: Sun, Apr 11, 2010 at 9:20 AM
Subject: Re: [cfe-commits] [PATCH] Haiku support
To: Chris Lattner <clattner at apple.com>


On Sun, Apr 11, 2010 at 6:50 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Apr 10, 2010, at 5:59 AM, Paul Davey wrote:
>
>> Preliminary support for the haiku operating system as a target.
>> A target info for it.
>> Also header search paths.
>> please review...
>
> This looks basically fine, a couple minor things:
>
> +    X86_32TargetInfo::getTargetDefines(Opts, Builder);
> +    Builder.defineMacro("__INTEL__");
> +    Builder.defineMacro("__HAIKU__");
> +//    Builder.defineMacro("__haiku__");
> +  }
>
> Please no commented-out code.

Thanks for the reply and comment.
I fixed this.

>
> +  case llvm::Triple::Haiku:
> +    {
> +      AddPath("/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090629/bin/../lib/gcc/i586-pc-haiku/4.3.3/include", System, true, false, false);
> +      AddPath("/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090629/bin/../lib/gcc/i586-pc-haiku/4.3.3/include-fixed", System, true, false, false);
>
> Please stay in 80 columns, also you don't need the {}'s

Fixed the {}'s
not sure how to fix the 80 column but will try.

>
> Do you really need to implicitly include all this stuff??
> +      AddPath("/boot/common/include", System, true, false, false);
> +      AddPath("/boot/develop/headers/os", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/app", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/app", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/device", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/drivers", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/game", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/interface", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/kernel", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/locale", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/mail", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/media", System, true, false, false);
> +      AddPath("/boot/develop/headers/os/midi", System, true, false, false);
> .....
>
> -Chris

Yes all of those paths need to be in the standard include search paths.
These are the include paths for the various "kits" in haiku along with
other things.
Unfortunately code was never written having them include stuff with
say #include <app/Application.h>
instead the path was in the search path and #include <Application.h> was used...
This is a good example of why clang needs a better way of defining
system include paths.
Many of these could be generated procedurally too...




More information about the cfe-commits mailing list