From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id F32A23858D20; Thu, 10 Nov 2022 17:16:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F32A23858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2AAH57rH006401; Thu, 10 Nov 2022 17:16:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : references : date : in-reply-to : message-id : content-type : mime-version; s=corp-2022-7-12; bh=nPUhhhQt4rS1E9iwSrb2o14VeZhzgdumL5b3jrwPExM=; b=Rv/cDtHWdvKJCXEm56S//XFOWCgv6qrr+At3wmlOCNT21W7GrLmNzZPFbT1uVjGgw3oH He41Vef1Oml3fbYYY1Vm96lVEBi6PPrMOayXDgdJpZGFZHoLjXjzsLUASycPdI81jLuY cfMCEilL8eVOKAQPLiPf9p7lXQLynSRTyR4e33ZUkRBjjm2pARGdBsrP1pXLnFkPRg7K 4zxnnjciZLkTX0JWPX2aDDKGOPrazdy0dhaitG3/8eXGUEloCvFMBiTFWPajhnYGmJ+R rgJnADl9EIpbchnFzmwjDN6d56lsGelbVwm0fPSycSviILmrBfkiVDpMXT0T4mpo+f/j Xg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ks5cu818w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Nov 2022 17:16:13 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AAGCuc8009811; Thu, 10 Nov 2022 17:11:48 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kpcq57927-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Nov 2022 17:11:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TqEzNE1f4GEWfMeDPhdpYgVD655L68RfVGEmEuuYEUp8RTI8iK8/0DffRiRFvWGbmWlWPvZ8B125hDJw27iqkP64nNQseWnhiG6Ye2mD3EeUEyUL0T5mGoo9F5HF1OCQNCUTbbcA8VcSHFtIUMqMa3wG9HrCnlTvJODMpv0CBZekTQBOmZ16WECuOFb2L1FPUnRCT6SzDIrAc27u1RtUv8x+qmRqvCFfbgyk8ZRbCqYdV5pPP+KKX8TLt5JN5UcWxymx9PsNpkwi6gyr3ZLuNbyLHGxYtm+BpjoMURAcLBrNQlFhrtaIJiy3MOw9XDVxwJ4CLAW7hK+CuCcf/jHx+Q== 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=nPUhhhQt4rS1E9iwSrb2o14VeZhzgdumL5b3jrwPExM=; b=K2GAmytDPim+iNOi6U+9DDa/3HU7iZ8PKCDM3OWCm/U3MSy/cV7rIYoaPRbelqQy01Yr/0g+cAFSaqlrHdZ1uwne56pFgm+jVKYmcVK6Az7Jh3JMNCjwTjuUSteY9V9U8eNZCmE6/epeLMHjd4FDys2kLdwKuXYaTQ+mpWwZOUAIq4RoOj9CiifiLdlXs23lWS4520gRThZD97Ar30XFwn432dN0drGq5i0OLFShSmp7aZHdnnv9stPG7XrySHU52lKfybkaBKSnpmXDANF5IR9EZMMpHZrL50iISqiI0VblrEwnRd1BvHM61JaPyAbQL6Ig3qxLm/biudVXstWQCg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nPUhhhQt4rS1E9iwSrb2o14VeZhzgdumL5b3jrwPExM=; b=AKIluiCbIeQOH3dsOGEighLgcevWTrc8opjkT0MIFRbMekljLixIVjKV/KrZM08Y+8GmiAxZFrJohBgF/EnedV4qEYwag9F7BFIxmWYxyXVv/lDI4vRXyi64LRLn2aZAuAq4lwnPQauecGGU4zBcq+87ceSE1l9rx89ay2riAHA= Received: from DS0PR10MB6798.namprd10.prod.outlook.com (2603:10b6:8:13c::20) by DM4PR10MB6037.namprd10.prod.outlook.com (2603:10b6:8:bb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12; Thu, 10 Nov 2022 17:11:46 +0000 Received: from DS0PR10MB6798.namprd10.prod.outlook.com ([fe80::d361:ae7a:f995:2bb2]) by DS0PR10MB6798.namprd10.prod.outlook.com ([fe80::d361:ae7a:f995:2bb2%3]) with mapi id 15.20.5791.027; Thu, 10 Nov 2022 17:11:46 +0000 From: Nick Alcock To: "Jose E. Marchesi" Cc: Tom Tromey , gdb-patches@sourceware.org, Simon Marchi , indu.bhagat@oracle.com, elena.zannoni@oracle.com, binutils@sourceware.org Subject: Re: [PATCH] gdb: use libtool in GDB_AC_CHECK_BFD References: <20221107194634.1313150-1-jose.marchesi@oracle.com> <5e940b15-cd5c-83b2-0bdd-9afa27b5f197@simark.ca> <87bkpeuae6.fsf@oracle.com> <875yfmztd6.fsf@tromey.com> <87sfiqsr7m.fsf@oracle.com> Emacs: it's like swatting a fly with a supernova. Date: Thu, 10 Nov 2022 17:11:41 +0000 In-Reply-To: <87sfiqsr7m.fsf@oracle.com> (Jose E. Marchesi's message of "Thu, 10 Nov 2022 17:35:09 +0100") Message-ID: <87sfiqwx82.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1.91 (gnu/linux) Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0145.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::13) To DS0PR10MB6798.namprd10.prod.outlook.com (2603:10b6:8:13c::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6798:EE_|DM4PR10MB6037:EE_ X-MS-Office365-Filtering-Correlation-Id: 64d7b876-3779-4470-5fac-08dac33ea573 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eHWWsFuEUSSGAKZh2yhwMAhSZajtGy8Qzbp7IicsT8n71hK57DO5GIZe+LwsFK09ZSJYRhkTeaKAmsJpWnxNBySicrNo4iJFMy3CqG5Dici1pLv+TJHnt3gFCrw9HzpWpi9ZLHPVkURfvBdTj4RAEsDWMiPN1Hq6MhkBB6dYmFSM82jY0rmP8MjS9diVdEs1N4lFwVESW+JOPy60kcABMSMoA8h3J1pGMxounHy26d901DYE0/YGKW8BOsZICQED2BdEbejZdMHA68s07oN6mQzgvQJxsw0ygL8Ov7ciWJ2QsCy+iwaqEV7n1Zn5CmYalDcEGnCt7f49Z7u6N4J/TuMCWNuVgg6yBaKsFp1Zq4auH90JCv6ZbYJL0Vp9u5ptuKtNSwuvakiqrSdPBDUcX+b+EWmBDB0p8o2lxX7uN9TVsVzbUoERZBfnFM6Eu5D+6CTrgVit9ZY8jAxuEq5a/u5zaaRoZVpQtAy/BUmaOHYhsqv0P01Gui7GO/1jwtH8bz9GS58WxrGAEWxSAR6vxkOLhOJpSXpHMZ9z6S4rT99jwnvE0TVbo6n+HJPOCJRCL0Xrvap+mpZRFqGxsn+amaJy8VF3HRf8Dp3jKe4VuYuvOGCmVC0Avyz+DBNy2rc2hV/xq3OScLeQhYMCYX0lV5bsLb0aoIFamc5+QGpIVHdZc/QCefHoGewqHbUvR9d/eJOKln8bFdTKuXXFb6eBlQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB6798.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(346002)(366004)(376002)(39860400002)(136003)(396003)(451199015)(38100700002)(86362001)(8936002)(478600001)(6486002)(5660300002)(6862004)(6666004)(4326008)(66946007)(316002)(66556008)(44832011)(66476007)(41300700001)(8676002)(54906003)(6636002)(2906002)(9686003)(186003)(6506007)(6512007)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?OsS6VCpIu/0MV/3OsqD316FrxYaBL5cNa65o8iAFPMaOP3rPAQsjJXRCkC93?= =?us-ascii?Q?Cs+4IrPemMeQKpgWsXsPRnF/NgXpYp7lOwbgt7fe8Pg1ALDrz16VCGLENV+y?= =?us-ascii?Q?/GTCoCIDcDDLScbZsqgbArMWmHIociYXfSK2WrY2J9MtGNgv1XfPqEXydGUy?= =?us-ascii?Q?qN3/75SiawvAonqnzs37lKxnimJPqvLSItrmm6IUgXJP9KVsid0urCVb96aO?= =?us-ascii?Q?W89jRNZ+fkS5PgBQzDyyVQLLgLM3I11lPpIdIv5zJ0rmDy6wRK8/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5EL1QXw1rZgMerxaHpVqDlWpBNvyRr7ttUZ?= =?us-ascii?Q?5dq7ZYwKrkKDjllgodicogSgz2+yKWKRVef7k1/stpMktSdAA6jK0lwoGCvL?= =?us-ascii?Q?1mjvyjJHTteIILQVEDxahynodNkY3SYw5CAupY4vTP8Zn1/ar9mgJIgRbwDz?= =?us-ascii?Q?/JuHI6iWnT+3LNwT/SsB3/l7BcVqM541Od72ME7o/+K8h/Bk7qYrCY5xot1h?= =?us-ascii?Q?12CSP/dI8fuCKDiNS5I3a5ECCC+rUd/c3RQXMgWlDbhsE6LdgpXVvRcNAXHy?= =?us-ascii?Q?4MWcuWSToYxG+EFR68wFOD5VWwarYfn2w+XgPzvKK8RkGHuGoCoPAk3eIbGQ?= =?us-ascii?Q?iJlJshGYmZxaJGUCzUZKpaZI6n9/tq7yaGnaZUSqwU1jisxeNKfncsEB1fKY?= =?us-ascii?Q?NIMdiw/iFKc94ul2ZFQP3AnsASWjade0RozeulsHP3XZvqK850GkEQ6/Gxnv?= =?us-ascii?Q?tg=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64d7b876-3779-4470-5fac-08dac33ea573 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6798.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2022 17:11:45.9440 (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: FgkIwY1VkujSHQaF+5xex4pMuY/CXQj7zZa2SskQxYNhUkfE7LUxEkVNqSx2sOqeWW2HcILyNmrlZStf/k/Olw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6037 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-10_12,2022-11-09_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211100120 X-Proofpoint-GUID: d3QFG_IgP4quUctHVWbq5iGV62VBtPcW X-Proofpoint-ORIG-GUID: d3QFG_IgP4quUctHVWbq5iGV62VBtPcW X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: [Tried to Cc: gdb-patches, but I'm not yet subscribed to it from this address. Not sure if this is going to work... and libctf is part of binutils anyway, so I'm Cc:ing binutils@ in so that at least my response goes somewhere public.] On 10 Nov 2022, Jose E. Marchesi said: >>>>>>> "Jose" == Jose E Marchesi via Gdb-patches writes: >> Jose> 1) The calls to AM_ZLIB and AC_ZSTD from gdb/configure.ac. >> Jose> 2) The definition of ZLIB and ZLIBINC from gdb/Makefile.in >> Jose> 3) ../config/zlib.m4 from aclocal_m4_deps in gdb/Makefile.in >> >> ... however the use in ctf-api.h seems like it would prevent removing >> some of the configury. gdb includes this header and so it needs the >> correct -I options to find the in-tree zlib.h. >> >> I don't see why ctf-api.h needs this include, but I essentially don't >> know anything about CTF. > > Nick, would it be possible to remove the include of zlib.h from > ctf-api.h? Even if libctf uses zlib, it would be good to not expose the > dependency in the API header... Yeah, this is an interestingly painful one. I completely agree that it needs fixing, because it causes problems if you don't have a system zlib: you end up with a basically unusable ctf-api.h after installation, which isn't good at all. But... this is because of this function in the exported API: extern int ctf_gzwrite (ctf_dict_t *fp, gzFile fd); Now this is actually a typedef, described as "semi-opaque": typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ IF the name of gzfile_s is guaranteed unchanging across zlib releases we could do this instead of the #include: /* Note to users: this is a 'gzFile' from . */ struct gzFile_s; extern int ctf_gzwrite (ctf_dict_t *fp, gzFile_s *fd); The problem is that zlib apparently considers this structure name an implementation detail (given that what it gives you in the prototype is a typedef to it), but if that name ever changes then including and in the same translation unit would fail. Indeed this function used to take a void * (with the same typedef name) in 1.2.5 and before :( Maybe I could just make it take a void *, but that's not very clear at all! That type name is actually useful documentation... and I can't introduce the typedef myself because double-declaring a typedef is an error. (And a configure test won't help here, because the problem is the zlib version installed when *users* include ...) So... suggestions? Do people think gzFile_s is unlikely to be renamed again or changed away from a structure in future, so that doing this is safe? (Even when it was a void *, it was a structure internally, albeit a totally different one.) -- NULL && (void)