Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2015 15:41:07 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        David Chisnall <theraven@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r268137 - head/sys/sys
Message-ID:  <55841BF3.8010205@selasky.org>
In-Reply-To: <FE96503D-D821-4B7F-8AA5-7A80E4051CFA@FreeBSD.org>
References:  <201407020845.s628jRG5031824@svn.freebsd.org> <5BE3492F-86A0-4CE3-A27C-8DB5EB662C64@FreeBSD.org> <5583F2C9.1030409@selasky.org> <1EB851FC-CA78-4A7B-BE5D-4F050C61A14C@FreeBSD.org> <558403C4.4040500@selasky.org> <FE96503D-D821-4B7F-8AA5-7A80E4051CFA@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/19/15 14:54, David Chisnall wrote:
> I definitely know of people building out-of-ports programs on FreeBSD whose code you have just broken (including myself,
 > though I do Objective-C stuff on 10, so haven’t yet encountered the 
breakage).

Hi David,

r268137 has been in 11-current for a long time (11 months) and was 
MFC'ed to 10-stable not long ago. Multiple systems are defining __weak 
for C and C++ :

Linux:
> include/linux/compiler-gcc.h:
#define __weak				__attribute__((weak))

NetBSD:
 > sys/cdefs_elf.h
#define __weak  __attribute__((__weak__))

FreeBSD:
 > sys/cdefs.h
#define	__weak	__attribute__((__weak__))


__weak is *the* way currently to say __attribute__((__weak__)) in C and 
C++ cross multiple systems. Are you sure you want to change that?

I understand that including "sys/cdefs.h" breaks objective C-code in the 
kernel, but we don't have any such code, do we?

In userspace, why is objective C-code including "sys/cdefs.h"? Is this 
perhaps a mistake in another header file which indirectly includes 
"sys/cdefs.h" when it shouldn't?

> Portable code should not rely on anything in cdefs.h.

Right - can you explain why it is ending up in your ObjC code?

And you are certain this is the change causing your build breakage?

https://svnweb.freebsd.org/base?view=revision&revision=283326

Hope you bear with me, I just don't want to rush a fix.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55841BF3.8010205>