From owner-freebsd-current@FreeBSD.ORG Sun Oct 3 20:30:05 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2714E106566C; Sun, 3 Oct 2010 20:30:05 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C03668FC0C; Sun, 3 Oct 2010 20:30:04 +0000 (UTC) Received: by iwn10 with SMTP id 10so1426888iwn.13 for ; Sun, 03 Oct 2010 13:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=L6CeD7PYXeofZOuulkj8l7TXoNJ4apB9WmZJ3kNAvFg=; b=QGnMu8nOCKUrHdQnrvW+pfZZ/CABPCFpaj91xcELpT2+J7h0zgIilF3/dGBUKv6dV6 +rRs4l1OCHFgutwfc/kh3jljrwsRT4wQ97nyKWnRHjLm8+xieVKSpnHMVYjkJgEy18Z9 YwzS/43UhQ1UyBB3Yij7X3lqZO3qLw5Qr06A4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=v+YIZdIdNMSCGgN5Fomnh5bvaqbxK1flXjXv19bHtAWvWxuRsE3tolAr531qAkZUpF jVoVchbDg2j7SEC9MivReMxZ9XeY6YwGcZDMam+pxkeZ5c0H2x0UG8CmLdvN+fWiyYsM T8TEglka3qUC1qhLDXxRtUFbBoeucW1vVMOl4= MIME-Version: 1.0 Received: by 10.231.161.16 with SMTP id p16mr9026639ibx.61.1286137803506; Sun, 03 Oct 2010 13:30:03 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.190.68 with HTTP; Sun, 3 Oct 2010 13:30:03 -0700 (PDT) In-Reply-To: <20101003195035.GA35617@freebsd.org> References: <20101003134111.GA98699@oriental.arm.org> <4CA89F6B.8050108@FreeBSD.org> <20101003195035.GA35617@freebsd.org> Date: Sun, 3 Oct 2010 13:30:03 -0700 X-Google-Sender-Auth: MyRkOTs-Ib42osmVJ2n2EULQNpA Message-ID: From: Garrett Cooper To: Roman Divacky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dlt@mebtel.net, Dimitry Andric , current@freebsd.org Subject: Re: Another clang problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Oct 2010 20:30:05 -0000 On Sun, Oct 3, 2010 at 12:50 PM, Roman Divacky 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