[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: discussion seeked for c++ variants in USE_LANGUAGES
Le 12/11/15 17:28, Richard PALO a écrit :
> Le 12/11/15 16:59, David Holland a écrit :
>> On Thu, Nov 12, 2015 at 03:07:38PM +0100, Richard PALO wrote:
>> > > Very likely a lot, both due to disabled GNU extensions and the
>> > > additional restrictions in the C namespace.
>> > Personally, I'd simply like clang and gcc to use the same -std= clause
>> > to simplify pkgsrc maintenance. Today that's not the case for c99 already.
>> > I'll give gcc with -std=c99 instead of -std=gnu99 a try just for grins.
>> I'm not convinced there's any point. No two compilers will arbitrarily
>> reject the same set of programs, regardless of setting, so chasing
>> after uniformity of settings isn't going to accomplish anything.
> But the question I pose here is with respect to GNU extensions, either they're
> enabled or not... seems incongruous to have -std=c99 for clang but -std=gnu99
> for gcc. I believe pkgsrc should at least be consistent (one way or t'other).
> From the clang getting started page:
>> Clang Compiler Driver (Drop-in Substitute for GCC)
> In any event, various cflags/cxxflags tend to be set for compiler-specific needs.
Well, I'm quite pleased with the results of using -std=c99 instead of
-std=gnu99. Too me it seems quite worth the trouble.
For my limited_list bulkbuild of just over 1.150 packages with gcc4.9,
I had mostly trivial modifications to make, which could be considered
upstream bugs(I guess).
to build quick and dirty:
needed CPPFLAGS+=-D__EXTENSIONS__ on SunOS
needed CPPFLAGS+= -Dtypeof=__typeof__
needed CPPFLAGS+=-Dsun for SunOS
+ I needed to fix a bug in config/nsinstall (as well as for mail/thunderbird24)
missing an include to mozilla-config.h (bug hidden by using -std=gnu99)
had numerous SunOS issues that I decided to patch in order to send upstream, including '#ifdef sun' instead of '#ifdef __sun' as well as
'asm' instead of '__asm__'.
I also made a patchset on github and filed an upstream issue to make c99/XPG6.
Less than 1%, not shabby at all!
BTW my limited_list is:
It would be interesting to see about clang now (rather next weekend), but I am
already convinced as well that using '-std=gnuxx' in mk/compiler is wrong with c99, c11 and c++11.
For those cases *needing* gnu extensions, USE_LANGUAGES can simply be set to 'c' and 'c++' with the appropriate CFLAGS/CXXFLAGS added as already frequently done.
I've updated the patchset in place
Main Index |
Thread Index |