[systemd-devel] Minimum required gcc version?

Michael Olbrich m.olbrich at pengutronix.de
Thu Jun 18 08:33:31 PDT 2015


On Thu, Jun 18, 2015 at 03:20:04PM +0200, Lennart Poettering wrote:
> On Thu, 18.06.15 14:29, Michael Olbrich (m.olbrich at pengutronix.de) wrote:
> > Do we have a minimum required gcc version? The README just lists gcc
> > without any version. However the current git fails to build with gcc-4.7:
> > In this version, gcc produces -Wshadow warnings for variables with the same
> > name as a defined function (e.g. 'now' in several functions in
> > src/core/device.c). This results in build errors because we compile with
> > -Werror=shadow now.
> Hm, yuck. I figure we could add that only for gcc versions newer than
> that, with a configure check...
> or can't you add a -Wno-shadow to CFLAGS on the configure cmdline,
> overriding what we set there?

I can easily work around this issue with cc_cv_CFLAGS__Werror_shadow=no in
the environment for configure. I just wanted to report this in case you
care about gcc-4.7.


Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

More information about the systemd-devel mailing list