Date: Tue, 21 Jun 2011 01:00:52 +0200 From: Koop Mast <kwm@rainbow-runner.nl> To: Matthias Andree <mandree@FreeBSD.org> Cc: ports@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: gcc-clang issue Message-ID: <4DFFD124.2030902@rainbow-runner.nl> In-Reply-To: <4DFFCA3B.4030307@FreeBSD.org> References: <201106202202.p5KM2ro0040297@repoman.freebsd.org> <4DFFCA3B.4030307@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/21/2011 0:31 , Matthias Andree wrote: > I'v commited this half an hour ago: > >> mandree 2011-06-20 22:02:53 UTC >> >> FreeBSD ports repository >> >> Modified files: >> sysutils/e2fsprogs Makefile >> Log: >> [1] USE_GCC=4.2+, to avoid clang. Port needs -lgcc and -lgcc_s >> explicitly. >> [...] > > [1] is actually (a) a quick excuse and (b) based on the assumption > that USE_GCC will override a clang default ports compiler. > > I HAVE tried clang, and got a particular kind of linker errors, namely > that unrelated .o files redefine the same unrelated symbols - and a > crc32.o file redefining libext2fs symbols is curious, to put it mildly. > > I currently suspect that there are "inline" handling differences > between clang and gcc, combined with definitions ("implementations") > in .h files, and possibly either different linker behaviour with > clang, or actually different symbols. > Hey, could you try this patch? I try the USE_CSTD=gnu89 trick if I get symbol troubles when linking. This is because clang defaults to gnu99 while gcc still defaults to gnu89. From what I remember the inline keyword has different meanings between the two, or how you use it atleast. Someone explained it to my last year but I can't remember all the gory details about it. http://people.freebsd.org/~kwm/e2fsprogs-clang.diff > Has anyone seen similar issues (duplicate symbol errors) after > switching to clang? > > Haven't had time to check things in detail, and thought I'd commit > USE_GCC right away to unwedge the build for future -exp runs. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DFFD124.2030902>