From patchwork Sat Nov 5 13:08:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jose E. Marchesi" X-Patchwork-Id: 59995 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ECB16385842E for ; Sat, 5 Nov 2022 13:05:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECB16385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667653509; bh=4OTBLFre5Z2X9gt2kHadvgTOWUvmkiIgekgICT2/Xkg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=IgkOZIsHGqiCGKlmPsQGWhS9X4BNfOT+rL/+Mur47BNYZRd29Tix/AQ21yDPhpDpF ZKf9hSJoN56koNBjrW8Yc5qzPXkIn302VKtYEjRSKA/Zvez/bS5T9p8QmJUlX2bxMi fSkNUm6DsCUx/foTgOGP2zOT1wMt9N/lWExy1Hjg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 3751E3858C2B for ; Sat, 5 Nov 2022 13:04:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3751E3858C2B Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A54N1X0017285; Sat, 5 Nov 2022 13:04:35 GMT Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kngregfs0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 05 Nov 2022 13:04:35 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2A5AugUQ012822; Sat, 5 Nov 2022 13:04:34 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2177.outbound.protection.outlook.com [104.47.57.177]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kne921gx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 05 Nov 2022 13:04:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lvkNGlIO9fQcxtIkJr5oq8XJ3QBOSGVRhpPLGJfT1IHArm3H5qgsrEZeo+0Tyx9BJTuBW1+Mrn7jgzTDXsGOFStSjk85Yo6hyfF/O0JtQfnkuC9BowXeEcHKwd4aeEV9dEbpkZlKiItUMKPF7g6GYWmTaUS7sli/3HQUALVCcQXR3/3TGFuvzqFkCk7uUPtbc2cIT+Lxbzys/BioDpR9sehKgfRuVWz1Y9Qt0xxFy+dumkLnqCsljgxBSkSrWWjIPqVYKxfCuLlmxLtdaPHl+dvHA1wdtZo8VZqNCNC4OVdD2i+STzPYxA2E9UMLvclERB73j7phieHMdjXWN3q4nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4OTBLFre5Z2X9gt2kHadvgTOWUvmkiIgekgICT2/Xkg=; b=j2zDT88rsSXk7dfYowf6lJqPwblRylRcZGBkdIsJe8xJIxPFTBLmjCSfoC+j9f19mFNsa+p8kJbLKKVaLARi1V6eEbXmWVW73NfuHL5s0DTB1HgjutHkGNL2JwNbzC9U63UHAub5AhoxNHLjNzfGwlNaDhYSF4Ls2aA3H1GLgr3ImXZyqy60h3Sg9Gh9Y9VdAEcEezOGFW2JqNgxGjJtWvBR8Y1bEwzQbHrS57uM8CF19G6Q8SarO1+FzCLy51cCAVnUis6mgX8lAF281wf+3ftb8+MBj4/OfwHX9HzbYyl9aATuvm6WZe+zl4dBImrqF0C+dcUpQTCbUC5Xt2i79A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) by SA3PR10MB6997.namprd10.prod.outlook.com (2603:10b6:806:31a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.16; Sat, 5 Nov 2022 13:04:26 +0000 Received: from BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::5095:b148:8def:1049]) by BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::5095:b148:8def:1049%5]) with mapi id 15.20.5791.024; Sat, 5 Nov 2022 13:04:26 +0000 To: gdb-patches@sourceware.org Subject: [PATCH] gdb: link executables with libtool Date: Sat, 5 Nov 2022 14:08:27 +0100 Message-Id: <20221105130827.1194771-1-jose.marchesi@oracle.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: FR3P281CA0009.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1d::8) To BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB2888:EE_|SA3PR10MB6997:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d7be6f5-6120-4c4a-ef11-08dabf2e444d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iDKXGLS4rNYH1XY8239nH0wZpw812GVqOk6GRhFTBLtZUkextIqTTrNNzWUxmuzmpE2Q4qnI9XqLx9xhBgMDC+rf598n8iCTRQsrhIdRQz/NFSO/2tDJBb0mjPWDPsJIV8VkWHV/aAEdPuGgu6lVzWDhymlOhLjE49rNxPmRHg6lgVdCF8d4XVHI4vou7DnRG1TErZwLJeD5zYokdFP/fWViGs4OLro+stc8UWd887V2t38T1ZUczfZqWbg2Z5vtVYQEAgUsdWdDeTyVTackQoo5S5jemjPnixddO9n7trca2Oe2W9MQcH7KS8meXvxRLxGbzVuzL2jSjXxFjB8+DhrXvyRMduokcel3O/pZon5IxGBU7PXeH11UkTfVwLXqjLL6oPyDDLpwzFGk+P1nxec/LxuOPitrsq9QyaRvRJN1EWv8AdezXFC6S5h4P/4U+iO/HB7fgKsbMdkbZAjm+lpEqC+qrdOsdb1mZPvTxUn4DKBTrjaF7mF68mN2yYdiO1NqfKFChJdPzbACu+RVvT6xSbTeJpZqHF9786hR4AO2Hl5hiWS9tg7XRns2cMtzDOXI63r7atVkG1deRbRC2fhV7Uqg2G/1gn3Nfi7cu7VgKGKdl3SA9xfGo3TURKr4INZgxiEjggLOwRODadb5YoUQxbf8Hbp0nyfTsFbdGP//d+03gjNqYMdSWvz+IFDpT1tMNlfPpx3UTsIM5Nv5WA+7/C4bXTKKYDppMJxcccXLfV8b/5V4YOcphwv6Uqq3T+OW75S8JkyGdE+CHXpo9B2I0tKcX7cGWuFMejLLMCwZm6sB6UvG06ZrFt5IJtTK0YlwXG+dPNiPpWsL6QcZvX3ZlpRytR3UuFNtT/Gt53Y= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2888.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(346002)(396003)(136003)(366004)(39860400002)(451199015)(84970400001)(36756003)(6916009)(478600001)(316002)(5660300002)(66946007)(8936002)(66476007)(4326008)(8676002)(6506007)(1076003)(2906002)(2616005)(66556008)(107886003)(186003)(83380400001)(6486002)(4001150100001)(38100700002)(41300700001)(86362001)(6512007)(26005)(21314003)(460985005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +KYiTqxA91G8ODo0hmiD6YJrrxSWZdNjaQK+M5C0Wo07z1Zy493nU4bF2zli121rpzLjwNjmM4ckE+G+yiWzaPhT/CuZsdXtS+0KsNJyP6pOdvr5UHFGY+niGG1mdM2ciOP8gNpNHdIc7LpXhDq4pe+TM7iYTod7QJzLUTI5B6VPHEVlqkvvR2EL++EzQeql7cCQMTgbe67yDW9B9AoMcVOgfsxkN8iBW3569J/O1/N3/HfPo7vwNAyDJQAJRClfaxhb2uXA5X7IlwJAl4SHJHF7uGHAjUmN+bnrj1UmTSIzkiQ1IeiuJPCViGLosYbVlIEyZifS32dYWLcLP1oQBIyYZMQc+iO38YrH6mUN9Hk++YVxc/eMDS+wOd0PIYUhboCJ53IKOTc5UbrfexF1BM4daINZTjHrle6+/JfXYaw/Y9VnTl6yzARCeI7+1P3FtlVectqtVLXr/SsZz+eIPkS7iT5BpGEAGfo9G0aFLZvZI+yFvhrdx7lGMQUBXmirz/moS9mtAmIkO2a2rntx2cuL8yo0uS/DE5cTOJuVlVzAMYMiTwbGRuUeuXbBihypsMFJFoPrE3em6w35P2d/PZV+cYux9rVqqpOTQHrCFF5Xxi061SQMnO1ENCig2KAUnrlCKvmv3KLL7J3Wq6Bq3BxIhmwZbEuDJvGsK0PnpWn4QBKnbIz2vNKRDmVYzj2AewdXac6w694w/GwEfc8iEf4dHw830k8r/ZD1j8aVlLlXvA2vvX/r3o4dWzFRjV7FKcV+ZvUqUsKkRo/ahMCYfv6b+IasyDwhRfbRxCfeXQPaiGbdAnTSvDPhWOf17l19+lx9H44J+cJGN2FiprXwGv/d5m8SbnJlzl/Xl0L5PoLTW+4Y3VGD5lVxBmitLEqeEHjkWehn4pxv832Cz7jm5GkW2czR03Hu1TbMzrRiZG1FI/l4ZiCCRKD7tjOroSSX3n7CoLzpka8oIMRpmAFw0WXs7057liIbPkecwjeWl++0GI1UZLggH1fYcGoMsiJcqJCrnfWu8qOR91Hec9F2glU+ksPKQcokIT0Jd72nQi49AVP6Hw+V2+gufJ2p5VEV3cpCvrNgeUWgCF7xNnktPGO794huec/sCQqfyEImTHxUpnZzLxobrmOsmu6Gvtr5LR5LKJES4901bMzTuiqT54+2v8zgjdTpIaVnQCw9wN0n04wiUrkr40L1YLtT1sGc8AGHA8xdySTxeP+wOEb32MzIS1q4I/6NUJTjP3DNmCT65dHShWk82ZINgghDsU3ewqRJtUnNeA8W9c8GSvuN+sUapgr4h9H1sMBILdfFA+zf8VPoSAS8lfVOux0E/ug6isjJg5HZRlziDSO0AYiufh/c85OWIcWZCOPvEi0cKDt7Cq8N9pYC7+ybH6WWD6xNLqA495pqBcVPec2P7monj5Y5TbizlvoFgaLO610KGSU11gaZ1szdEZiqVi6XXq35OPniJyAOQIbcGnMWDaf/0RihhXv7iviLYmiibaxP9raJRLOCJF8cYe6cAT2ut6GH+Y9ov9it4uO5e1WLSZ8FqbXG5MLsh3WCbWJnziI+SjvFpoTN9bUcIRz4x4CfQ2+r4GMJ/U5t52marVPY/8OM6g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d7be6f5-6120-4c4a-ef11-08dabf2e444d X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2888.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2022 13:04:26.2955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f2Uo6TJrAtUzMqBR2TlUz0/F9FkXUOwtC6Y8SqgYxI8/caZMytbvYq/PQij26GN6ITggemHTnI8NHVqRTUo5Hjyo4nRKFSb8fkMcwpSD2nI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR10MB6997 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-05_07,2022-11-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211050100 X-Proofpoint-ORIG-GUID: A_viwPeoOZtEjx-60pgYd8_5O_7F5z-A X-Proofpoint-GUID: A_viwPeoOZtEjx-60pgYd8_5O_7F5z-A X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Jose E. Marchesi via Gdb-patches" From: "Jose E. Marchesi" Reply-To: "Jose E. Marchesi" Cc: indu.bhagat@oracle.com, elena.zannoni@oracle.com Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This patch changes the GDB build system in order to use libtool to link the several built executables. This makes it possible to refer to libtool libraries (.la files) in CLIBS. As an application of the above, LIBBACKTRACE_LIB now refers to ../libbacktrace/libbacktrace.la LIBCTF now refers to ../libctf/libctf.la NOTE1: The addition of libtool adds a few new configure-time options to GDB. Among these, --enable-shared and --disable-shared, which were previously ignored. Now GDB shall honor these options when linking, picking up the right version of the referred libtool libraries automagically. These tests seems to be sensible to the fact there is now a new process in the mixture (the sh process.) This is why the patch modifies testsuite/lib/gdb.exp in order to run the tests thru libtool --mode=execute. Doing so avoids the regressions. NOTE2: I have not tested the insight build. NOTE3: For regenerating configure I used an environment with Autoconf 2.69 and Automake 1.15.1. This should match the previously used version as announced in the configure script. I am not including the thunk for configure in this patch because the libtool macros drag in a lot of stuff and the resulting patch is very big. Testing performed: - --enable-shared and --disable-shared (the default in binutils) work as expected: the linked executables link with the archive or shared libraries transparently. - Makefile.in modified for EXEEXT = .exe. It installs the binaries just fine. The installed gdb.exe runs fine. - Native build regtested in x86_64. The installed gdb runs fine. In the regression testing I'm observing that the following tests doesn't seem to be deterministic: gdb.base/step-over-syscall.exp gdb.threads/process-dies-while-detaching.exp gdb.threads/process-dies-while-handling-bp.exp Sometimes some of the the tests in these files unexpectedly fail, like in: -PASS: gdb.threads/process-dies-while-detaching.exp: single-process: \ continue: detach: continue +FAIL: gdb.threads/process-dies-while-detaching.exp: single-process: \ continue: detach: continue Sometimes they unexpectedly pass: -KFAIL: gdb.base/step-over-syscall.exp: clone: displaced=on: \ check_pc_after_cross_syscall: single step over clone \ final pc (PRMS: gdb/19675) +PASS: gdb.base/step-over-syscall.exp: clone: displaced=on: \ check_pc_after_cross_syscall: single step over clone final pc -KFAIL: gdb.threads/process-dies-while-handling-bp.exp: \ non_stop=on: cond_bp_target=0: inferior 1 exited \ (prompt) (PRMS: gdb/18749) +PASS: gdb.threads/process-dies-while-handling-bp.exp: \ non_stop=on: cond_bp_target=0: inferior 1 exited - Cross build for aarch64-linux-gnu built to exercise program_transform_name and friends. The installed aarch64-linux-gnu-gdb runs fine. 2022-11-05 Jose E. Marchesi * gdb/aclocal.m4: include libtool macros from the top-level directory. * gdb/Makefile.in (LIBTOOL): Define. (CC_LD): Use libtool for linking. (install-only): Use libtool for installing GDB$(EXEEXT). (install-gdbtk): Likewise for insight$(EXEEXT). * gdb/configure.ac: Call LT_INIT. Refer to libctf.la and libbacktrace.la. * gdb/configure: Regenerate. * gdb/testsuite/lib/gdb.exp: Run uninstalled GDB with libtool --mode=execute. --- ChangeLog | 14 + gdb/Makefile.in | 10 +- gdb/aclocal.m4 | 5 + gdb/configure | 31544 ++++++++++++++++++++++++------------ gdb/configure.ac | 15 +- gdb/testsuite/lib/gdb.exp | 2 +- 6 files changed, 21140 insertions(+), 10450 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73c3a006881..1d19233440d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2022-11-05 Jose E. Marchesi + + * gdb/aclocal.m4: include libtool macros from the top-level + directory. + * gdb/Makefile.in (LIBTOOL): Define. + (CC_LD): Use libtool for linking. + (install-only): Use libtool for installing GDB$(EXEEXT). + (install-gdbtk): Likewise for insight$(EXEEXT). + * gdb/configure.ac: Call LT_INIT. + Refer to libctf.la and libbacktrace.la. + * gdb/configure: Regenerate. + * gdb/testsuite/lib/gdb.exp: Run uninstalled GDB with libtool + --mode=execute. + 2022-10-10 Nick Clifton * src-release.sh: Add "-r " option to create reproducible diff --git a/gdb/Makefile.in b/gdb/Makefile.in index c528ee5aa80..8843a72aaf0 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -143,10 +143,12 @@ MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) MAKEHTML = $(MAKEINFO_CMD) --html MAKEHTMLFLAGS = +LIBTOOL = @LIBTOOL@ + # Set this up with gcc if you have gnu ld and the loader will print out # line numbers for undefined references. #CC_LD = g++ -static -CC_LD = $(CXX) $(CXX_DIALECT) +CC_LD = $(LIBTOOL) --mode=link $(CXX) $(CXX_DIALECT) # Where is our "include" directory? Typically $(srcdir)/../include. # This is essentially the header file directory for the library @@ -2017,7 +2019,8 @@ install-only: $(CONFIG_INSTALL) true ; \ fi ; \ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdb$(EXEEXT) \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \ + gdb$(EXEEXT) \ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \ $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h @@ -2529,7 +2532,8 @@ install-gdbtk: true ; \ fi ; \ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) insight$(EXEEXT) \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \ + insight$(EXEEXT) \ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ $(SHELL) $(srcdir)/../mkinstalldirs \ $(DESTDIR)$(GDBTK_LIBRARY) ; \ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 index 3ed4a58d39f..4aac87b52ed 100644 --- a/gdb/aclocal.m4 +++ b/gdb/aclocal.m4 @@ -212,4 +212,9 @@ m4_include([../config/override.m4]) m4_include([../config/pkg.m4]) m4_include([../config/plugins.m4]) m4_include([../config/tcl.m4]) +m4_include([../libtool.m4]) +m4_include([../ltoptions.m4]) +m4_include([../ltsugar.m4]) +m4_include([../ltversion.m4]) +m4_include([../lt~obsolete.m4]) m4_include([acinclude.m4]) diff --git a/gdb/configure.ac b/gdb/configure.ac index fceb80e8c9d..4fd77e48576 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -46,6 +46,10 @@ ACX_NONCANONICAL_TARGET AC_ARG_PROGRAM +# We require libtool to link with the in-tree libtool libraries +# the proper way. +LT_INIT + # We require a C++11 compiler. Check if one is available, and if # necessary, set CXX_DIALECT to some -std=xxx switch. AX_CXX_COMPILE_STDCXX(11, , mandatory) @@ -2092,7 +2096,7 @@ AC_ARG_ENABLE([libbacktrace], if test "${enable_libbacktrace}" = "yes"; then LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/" - LIBBACKTRACE_LIB=../libbacktrace/.libs/libbacktrace.a + LIBBACKTRACE_LIB=../libbacktrace/libbacktrace.la AC_DEFINE(HAVE_LIBBACKTRACE, 1, [Define if libbacktrace is being used.]) else LIBBACKTRACE_INC= @@ -2151,15 +2155,10 @@ AC_ARG_WITH(xxhash, [], [with_xxhash=auto]) GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections]) -if test x${enable_static} = xno; then - LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" - CTF_DEPS="../libctf/.libs/libctf.so" -else - LIBCTF="../libctf/.libs/libctf.a" - CTF_DEPS="$LIBCTF" -fi if test "${enable_libctf}" = yes; then AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections]) + LIBCTF="../libctf/libctf.la" + CTF_DEPS="../libctf/libctf.la" else LIBCTF= CTF_DEPS= diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e2cda30b95a..63d57581d13 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -154,7 +154,7 @@ global GDB_DATA_DIRECTORY global inferior_spawn_id if [info exists TOOL_EXECUTABLE] { - set GDB $TOOL_EXECUTABLE + set GDB "libtool --mode=execute $TOOL_EXECUTABLE" } if ![info exists GDB] { if ![is_remote host] {