git: gcc47: Backport static initialization acceptance.
Rimvydas Jasinskas
zrj at crater.dragonflybsd.org
Fri Nov 17 03:11:46 PST 2017
commit 8172914b41e0b50782e103828c8770bcdac543f1
Author: zrj <rimvydas.jasinskas at gmail.com>
Date: Fri Nov 17 12:21:09 2017 +0200
gcc47: Backport static initialization acceptance.
I only backporting these so that failing to accept drm/i915 _MMIO() stuff
would *not* be used as an argument to remove gcc47 alternative compiler
from base, just because "oh look it does not compile the i915.ko".
The gcc47 is likely the last C compiler compilable with C compiler able
to bootstrap the c++ compiler that is used on x86_64 anymore.
If anyone has/works on simple C compiler that could boostrap modern gcc,
you know where I hanging out and I gladly replace gcc47 with it in base.
It only takes few lines to accept updated drm/i915 "features".
It still warns with -pedantic:
/usr/src/sys/dev/drm/i915/intel_pm.c:3925:3: warning: initializer element is not constant [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3925:3: warning: (near initialization for 'wm0_pipe_reg[0]') [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3926:3: warning: initializer element is not constant [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3926:3: warning: (near initialization for 'wm0_pipe_reg[1]') [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3927:3: warning: initializer element is not constant [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3927:3: warning: (near initialization for 'wm0_pipe_reg[2]') [-pedantic]
...
So far i915 is the only place in kernel that does this, please lets keep it at this.
Check C99 Standard: Section 6.7.8 for more info.
Taken-from: gcc trunk (216416 + 216440 revisions)
Summary of changes:
contrib/gcc-4.7/gcc/c-typeck.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8172914b41e0b50782e103828c8770bcdac543f1
--
DragonFly BSD source repository
More information about the Commits
mailing list