Message ID | 20200123125716.12662-1-omosnace@redhat.com (mailing list archive) |
---|---|
Headers | show |
Series | Fix build with -fno-common | expand |
On Thu, Jan 23, 2020 at 01:57:12PM +0100, Ondrej Mosnacek wrote: > GCC 10 is going to enable -fno-common by default [1], so fix all build > errors uncovered by it and add it to global CFLAGS to avoid introducing > new bugs. How far back does -fno-common go? Will this affect our minimum GCC version at all? I assume it wont but figured I'd ask just in case. -- Jason > Changes in v2: > - remove also struct te_assert definition, which is also useless > - redo cil_mem_error_handler to match commit 4459d635b8f1 as suggested > by Jim Carter > > Travis build: [2] > > [1] https://gcc.gnu.org/gcc-10/porting_to.html#common > [2] https://travis-ci.org/WOnder93/selinux/builds/640875119 > > Ondrej Mosnacek (4): > libsepol: fix CIL_KEY_* build errors with -fno-common > libsepol: remove leftovers of cil_mem_error_handler > checkpolicy: remove unused te_assertions > Makefile: always build with -fno-common > > Makefile | 3 +- > checkpolicy/checkpolicy.h | 14 -- > libsepol/cil/src/cil.c | 162 ++++++++++++++++ > libsepol/cil/src/cil_internal.h | 322 ++++++++++++++++---------------- > libsepol/cil/src/cil_mem.h | 1 - > libsepol/cil/src/cil_strpool.c | 8 +- > 6 files changed, 329 insertions(+), 181 deletions(-) > > -- > 2.24.1 >
On Fri, Jan 24, 2020 at 11:39 AM Jason Zaman <jason@perfinion.com> wrote: > On Thu, Jan 23, 2020 at 01:57:12PM +0100, Ondrej Mosnacek wrote: > > GCC 10 is going to enable -fno-common by default [1], so fix all build > > errors uncovered by it and add it to global CFLAGS to avoid introducing > > new bugs. > > How far back does -fno-common go? Will this affect our minimum GCC > version at all? I assume it wont but figured I'd ask just in case. Good question... It looks like it's been around since at least 1996: https://github.com/gcc-mirror/gcc/commit/9493f1421183f7c39598629fe60d37c599dfe2af (That doesn't seem to be the commit that introduced it, but I hope it suffices as evidence :) > > -- Jason > > > Changes in v2: > > - remove also struct te_assert definition, which is also useless > > - redo cil_mem_error_handler to match commit 4459d635b8f1 as suggested > > by Jim Carter > > > > Travis build: [2] > > > > [1] https://gcc.gnu.org/gcc-10/porting_to.html#common > > [2] https://travis-ci.org/WOnder93/selinux/builds/640875119 > > > > Ondrej Mosnacek (4): > > libsepol: fix CIL_KEY_* build errors with -fno-common > > libsepol: remove leftovers of cil_mem_error_handler > > checkpolicy: remove unused te_assertions > > Makefile: always build with -fno-common > > > > Makefile | 3 +- > > checkpolicy/checkpolicy.h | 14 -- > > libsepol/cil/src/cil.c | 162 ++++++++++++++++ > > libsepol/cil/src/cil_internal.h | 322 ++++++++++++++++---------------- > > libsepol/cil/src/cil_mem.h | 1 - > > libsepol/cil/src/cil_strpool.c | 8 +- > > 6 files changed, 329 insertions(+), 181 deletions(-) > > > > -- > > 2.24.1 > > >
On 1/23/20 7:57 AM, Ondrej Mosnacek wrote: > GCC 10 is going to enable -fno-common by default [1], so fix all build > errors uncovered by it and add it to global CFLAGS to avoid introducing > new bugs. > > Changes in v2: > - remove also struct te_assert definition, which is also useless > - redo cil_mem_error_handler to match commit 4459d635b8f1 as suggested > by Jim Carter > > Travis build: [2] > > [1] https://gcc.gnu.org/gcc-10/porting_to.html#common > [2] https://travis-ci.org/WOnder93/selinux/builds/640875119 > > Ondrej Mosnacek (4): > libsepol: fix CIL_KEY_* build errors with -fno-common > libsepol: remove leftovers of cil_mem_error_handler > checkpolicy: remove unused te_assertions > Makefile: always build with -fno-common > > Makefile | 3 +- > checkpolicy/checkpolicy.h | 14 -- > libsepol/cil/src/cil.c | 162 ++++++++++++++++ > libsepol/cil/src/cil_internal.h | 322 ++++++++++++++++---------------- > libsepol/cil/src/cil_mem.h | 1 - > libsepol/cil/src/cil_strpool.c | 8 +- > 6 files changed, 329 insertions(+), 181 deletions(-) > This whole series was applied. Thanks, Jim