From patchwork Tue Apr 12 15:18:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 11709 Received: (qmail 24558 invoked by alias); 12 Apr 2016 15:18:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 24213 invoked by uid 89); 12 Apr 2016 15:18:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=conftest, Hx-languages-length:2409 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 Apr 2016 15:18:11 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D1123E7089 for ; Tue, 12 Apr 2016 15:18:08 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3CFI6Ru010793 for ; Tue, 12 Apr 2016 11:18:07 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 1/2] Fix "-Wl,--dynamic-list" gdb/configure test Date: Tue, 12 Apr 2016 16:18:05 +0100 Message-Id: <1460474286-11973-2-git-send-email-palves@redhat.com> In-Reply-To: <1460474286-11973-1-git-send-email-palves@redhat.com> References: <1460474286-11973-1-git-send-email-palves@redhat.com> The -Wl,--dynamic-list test is currently broken on Fedora 23, when you configure with --with-python=python3.4. We see: configure:13741: checking for the dynamic export flag configure:13796: gcc -o conftest -g3 -O0 -fno-strict-aliasing -DNDEBUG -fwrapv -Wl,--dynamic-list=/home/pedro/gdb/mygit/src/gdb/proc-service.list conftest.c -ldl -lncurses -lm -ldl -lpthread -ldl -lutil -lm -lpython3.4m -Xlinker -export-dynamic >&5 conftest.c:182:30: fatal error: python3.4/Python.h: No such file or directory compilation terminated. configure:13796: $? = 1 The correct -I path is in PYTHON_CPPFLAGS: PYTHON_CPPFLAGS='-I/usr/include/python3.4m -I/usr/include/python3.4m' (Other Python-related tests in the file are already doing this.) gdb/ChangeLog: yyyy-mm-dd Pedro Alves * configure.ac (checking for the dynamic export flag): Add $PYTHON_CPPFLAGS to CPPFLAGS. * configure: Regenerate. --- gdb/configure | 5 ++++- gdb/configure.ac | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/configure b/gdb/configure index b523deb..2b3c978 100755 --- a/gdb/configure +++ b/gdb/configure @@ -13775,12 +13775,14 @@ rm -f core conftest.err conftest.$ac_objext \ CFLAGS="$CFLAGS $PYTHON_CFLAGS" old_LIBS="$LIBS" LIBS="$LIBS $PYTHON_LIBS" + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" if test "$cross_compiling" = yes; then : true else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include "${have_libpython}/Python.h" +#include "Python.h" int main () { @@ -13802,6 +13804,7 @@ fi LIBS="$old_LIBS" CFLAGS="$old_CFLAGS" + CPPFLAGS="$old_CPPFLAGS" fi LDFLAGS="$old_LDFLAGS" fi diff --git a/gdb/configure.ac b/gdb/configure.ac index 70452d3..4476545 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1722,9 +1722,11 @@ if test "${gdb_native}" = yes; then CFLAGS="$CFLAGS $PYTHON_CFLAGS" old_LIBS="$LIBS" LIBS="$LIBS $PYTHON_LIBS" + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" AC_RUN_IFELSE( AC_LANG_PROGRAM( - [#include "]${have_libpython}[/Python.h"], + [#include "Python.h"], [int err; Py_Initialize (); err = PyRun_SimpleString ("import itertools\n"); @@ -1733,6 +1735,7 @@ if test "${gdb_native}" = yes; then [dynamic_list=true], [], [true]) LIBS="$old_LIBS" CFLAGS="$old_CFLAGS" + CPPFLAGS="$old_CPPFLAGS" fi LDFLAGS="$old_LDFLAGS" fi