]> git.proxmox.com Git - mirror_frr.git/commit
build: append -std=gnu99 after SNMP_CFLAGS
authorRenato Westphal <renato@opensourcerouting.org>
Sun, 3 Jun 2018 01:00:32 +0000 (22:00 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sun, 3 Jun 2018 01:12:57 +0000 (22:12 -0300)
commit7aad159464b3a31a42789594e6efd4bd2fceb644
tree3cf525e5f29b859b2fa728e35bb2dcc834d01556
parentebb46153b06a48fa5402b850ad8041a469f1a26d
build: append -std=gnu99 after SNMP_CFLAGS

Programs that link to libnetsnmp must be compiled using a special set
of flags as specified by the "net-snmp-config --base-cflags" command
(whose output is stored in the SNMP_CFLAGS variable). The problem is
that "net-snmp-config --base-cflags" can output -std=c99 in addition to
other compiler flags in some platforms, and this breaks the build since
FRR souce code makes use of some GNU compiler extensions (e.g. allow
trailing commas in function parameter lists). In order to solve this
problem, append -std=gnu99 after SNMP_CFLAGS in all makefiles where this
variable is used. This way the -std=c99 flag will be overwritten when it's
present. Source files that don't link to libnetsnmp will be compiled using
either -std=gnu99 or -std=gnu11 depending on the compiler availability.

Fixes #1617.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/Makefile.am
lib/subdir.am
ospf6d/subdir.am
ospfd/subdir.am
ripd/subdir.am
zebra/subdir.am