diff mbox series

[userspace,v2,4/4] Makefile: always build with -fno-common

Message ID 20200123125716.12662-5-omosnace@redhat.com (mailing list archive)
State Accepted
Headers show
Series Fix build with -fno-common | expand

Commit Message

Ondrej Mosnacek Jan. 23, 2020, 12:57 p.m. UTC
GCC 10 has it enabled by default and everything now builds OK with it,
so add it to CFLAGS to avoid breaking the build in the future.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

James Carter Jan. 23, 2020, 6:26 p.m. UTC | #1
On 1/23/20 7:57 AM, Ondrej Mosnacek wrote:
> GCC 10 has it enabled by default and everything now builds OK with it,
> so add it to CFLAGS to avoid breaking the build in the future.
> 
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

For all four patches,

Acked-by: James Carter <jwcart2@tycho.nsa.gov>

> ---
>   Makefile | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index c238dbc8..298cd2b7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -16,7 +16,8 @@ else
>   		-Wstrict-prototypes \
>   		-Wundef \
>   		-Wunused \
> -		-Wwrite-strings
> +		-Wwrite-strings \
> +		-fno-common
>   endif
>   
>   ifneq ($(DESTDIR),)
>
Petr Lautrbach Jan. 28, 2020, 9:54 a.m. UTC | #2
Ondrej Mosnacek <omosnace@redhat.com> writes:

> GCC 10 has it enabled by default and everything now builds OK with it,
> so add it to CFLAGS to avoid breaking the build in the future.
>
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> ---
>  Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index c238dbc8..298cd2b7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -16,7 +16,8 @@ else
>  		-Wstrict-prototypes \
>  		-Wundef \
>  		-Wunused \
> -		-Wwrite-strings
> +		-Wwrite-strings \
> +		-fno-common
>  endif
>  
>  ifneq ($(DESTDIR),)


This change applies only when you run a build from root directory.
Would it make sense to propagate it also to libsepol/src/Makefile and
checkpolicy/Makefile so it's used when users builds components from
released tar balls?
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index c238dbc8..298cd2b7 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,8 @@  else
 		-Wstrict-prototypes \
 		-Wundef \
 		-Wunused \
-		-Wwrite-strings
+		-Wwrite-strings \
+		-fno-common
 endif
 
 ifneq ($(DESTDIR),)