Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Oct 2010 13:30:03 -0700
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        dlt@mebtel.net, Dimitry Andric <dim@freebsd.org>, current@freebsd.org
Subject:   Re: Another clang problem
Message-ID:  <AANLkTikK0qQDXK=SScofOtKdkcSLNP3px6isebZtzwB1@mail.gmail.com>
In-Reply-To: <20101003195035.GA35617@freebsd.org>
References:  <20101003134111.GA98699@oriental.arm.org> <4CA89F6B.8050108@FreeBSD.org> <20101003195035.GA35617@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 3, 2010 at 12:50 PM, Roman Divacky <rdivacky@freebsd.org> wrote=
:
> On Sun, Oct 03, 2010 at 05:21:15PM +0200, Dimitry Andric wrote:
>> On 2010-10-03 15:41, Derek Tattersall wrote:
>> >In updating gnash to 8.8 the build failed while linking with libvgl.so.=
 =A0My
>> >current system was built last week, with both kernel and world built
>> >with clang. =A0The linkage failure was due to an inlined function,
>> >"set4pixels" which is only referred to, as far as I can tell, within th=
e
>> >source file simple.c which contains the function definition.
>>
>> The problem is that set4pixels() and another function set2lines() are
>> defined as 'inline' functions in simple.c, but it is compiled with
>> -std=3Dgnu99. =A0This means that these definitions cannot be called from
>> another object file.
>>
>> So, either libvgl should be compiled with -std=3Dgnu89, or somebody who
>> knows about libvgl's "official" API should decide whether these
>> functions must be externally accessible or not. =A0Since libvgl looks ve=
ry
>> old (it was imported 8 years ago, and the last functional change was 6
>> years ago), the former is probably the easiest fix.
>
> we compile world with -std=3Dgnu99 even with gcc, why isnt this problem
> with gcc?

    Has someone tried compiling with clang and c99, as opposed to
gnu99? I'm curious as to whether or not the c99 implementation with
clang is always correct, and if that works, whether or not the gnu99
implementation on gcc has a subtlety that isn't implemented properly
on clang.
Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikK0qQDXK=SScofOtKdkcSLNP3px6isebZtzwB1>