dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0038-intg-fix-configure-failure-with-strict-cflags.patch

bb7cd1
From 076bd32668f7ea194389ddd526ea81f9bf12fb0e Mon Sep 17 00:00:00 2001
bb7cd1
From: Lukas Slebodnik <lslebodn@redhat.com>
bb7cd1
Date: Tue, 28 Mar 2017 12:18:13 +0200
bb7cd1
Subject: [PATCH 38/54] intg: fix configure failure with strict cflags
bb7cd1
MIME-Version: 1.0
bb7cd1
Content-Type: text/plain; charset=UTF-8
bb7cd1
Content-Transfer-Encoding: 8bit
bb7cd1
bb7cd1
The warning -Wstrict-prototypes is a part of AM_CFLAGS which was appended
bb7cd1
for CFLAGS in make target intgcheck-prepare. And combination with
bb7cd1
strict CFLAGS in environment variable (e.g. -Werror) caused failures.
bb7cd1
bb7cd1
sh$ CFLAGS="-Werror" make intgcheck-prepare
bb7cd1
bb7cd1
checking for gcc... gcc
bb7cd1
checking whether the C compiler works... no
bb7cd1
configure: error: in `/home/build/sssd/ci-build-debug/intg/bld':
bb7cd1
configure: error: C compiler cannot create executables
bb7cd1
bb7cd1
configure:3719: checking whether the C compiler works
bb7cd1
configure:3741: gcc -g3 -O2 -Werror -D_FILE_OFFSET_BITS=64
bb7cd1
                -D_LARGEFILE_SOURCE -Wall -Wshadow -Wstrict-prototypes
bb7cd1
                -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings
bb7cd1
                -Wundef -Werror-implicit-function-declaration
bb7cd1
                -Winit-self -Wmissing-include-dirs -fno-strict-aliasing
bb7cd1
                -std=gnu99 -DKCM_PEER_UID=1000   conftest.c  >&5
bb7cd1
conftest.c:11:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
bb7cd1
 main ()
bb7cd1
 ^~~~
bb7cd1
cc1: all warnings being treated as errors
bb7cd1
bb7cd1
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
bb7cd1
---
bb7cd1
 Makefile.am | 2 +-
bb7cd1
 1 file changed, 1 insertion(+), 1 deletion(-)
bb7cd1
bb7cd1
diff --git a/Makefile.am b/Makefile.am
bb7cd1
index 91afdd669aa11a3cc316588d3b51d7e8e9c91cb8..359feddef298b0013c726409b7ba8b86504abf09 100644
bb7cd1
--- a/Makefile.am
bb7cd1
+++ b/Makefile.am
bb7cd1
@@ -3486,7 +3486,7 @@ intgcheck-prepare:
bb7cd1
 	    --without-semanage \
bb7cd1
 	    --enable-files-domain \
bb7cd1
 	    $(INTGCHECK_CONFIGURE_FLAGS) \
bb7cd1
-	    CFLAGS="$$CFLAGS $(AM_CFLAGS) -DKCM_PEER_UID=$$(id -u)"; \
bb7cd1
+	    CFLAGS="$$CFLAGS -DKCM_PEER_UID=$$(id -u)"; \
bb7cd1
 	$(MAKE) $(AM_MAKEFLAGS) ; \
bb7cd1
 	: Force single-thread install to workaround concurrency issues; \
bb7cd1
 	$(MAKE) $(AM_MAKEFLAGS) -j1 install; \
bb7cd1
-- 
bb7cd1
2.9.3
bb7cd1