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 76E73385AE4D for ; Tue, 2 Aug 2022 08:07:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 76E73385AE4D 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 2726M8HU012761; Tue, 2 Aug 2022 08:07:46 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 3hmu2c5yj8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 02 Aug 2022 08:07:44 +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 2726j1GA006773; Tue, 2 Aug 2022 08:07:43 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2048.outbound.protection.outlook.com [104.47.51.48]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3hmu31tn5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 02 Aug 2022 08:07:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fZUOgyTKiauGBZFNzl7IQz0GLZo4xr7PFyg3+3VCwnNtzN+oP0OlLBjT8P8uDFojPa+hpjkGd9Q0/Bc4gxEHi9xFSANXfaN4jz06cbEebvInVn/ER+7UoBZVaA0A+NRs8BIHCiMjQF0SMUunRylwrWcCps9QvYPsRISM4L0DuNQHHA/s0zlO3A+ZQoMgnZSLQ339V05y3gr855JtuQPBYHtj+9fDtxgrO0jrD1Rl8z5gNvMRpA4IpHrTuOG3PWTNL9/v6CneJ2AM0PXHcskqTqSQeFWmsrFd4yuWucekCrhNOT+oZllfX86XutXYBk7RX4py1Y+j1/htvTo/xrhNFw== 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=cvwJ4APwkX+LlUcGTYcXU9SnpwjUG8Vkz1ugA2h4Q8s=; b=OZF5E22I5L+2zDPhuDTTIuLIjSf/zJAEvY5LL6By/NjyE5+M/o0qGSH9IFQLDtYml/r1egwpglAwVOnttGk3qVkyrhdcbwZah/MLBzkCJ9gPYNUyd3b9wNVI7xIIBqOinDdCWbhxNapWpGc9B3CDwp24f1lyJCJCx6voNHuwV3z6Brsn+DE5hNJQkiJkZBicClvYW+uLZTzWRO4JnIY7+6+Gv3Oso5/v0KzXjnOvRno9V6O/3wPA2Qgv16UP8UZ9L0ENc3XFa/8qjtExzw+tmMqVdZKVn2+I9fYZYxHWxuO0BMhRry8S+AieGh9lC18TuvXXt399P0sA683HIFrLyQ== 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 MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by CH2PR10MB4184.namprd10.prod.outlook.com (2603:10b6:610:7f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.11; Tue, 2 Aug 2022 08:07:34 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::65fb:fa92:9a15:f89b]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::65fb:fa92:9a15:f89b%6]) with mapi id 15.20.5482.016; Tue, 2 Aug 2022 08:07:34 +0000 From: Indu Bhagat To: binutils@sourceware.org Subject: [PATCH,V6 04/10] libctfframe: add the CTF Frame library Date: Tue, 2 Aug 2022 01:04:46 -0700 Message-Id: <20220802080452.1143351-5-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220802080452.1143351-1-indu.bhagat@oracle.com> References: <20220802080452.1143351-1-indu.bhagat@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR04CA0074.namprd04.prod.outlook.com (2603:10b6:303:6b::19) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71a7be56-b20a-4969-d842-08da745e0dac X-MS-TrafficTypeDiagnostic: CH2PR10MB4184:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E1lH6E505kXPEW1BkEddQJ9VxjXExbINqD1JLE5m15aIjXNxlj4MLkrhy4xcwSWEfA/eS/AkUy13yXjrBBA9sRe6Uc+R/vyngJd8QcTLwm19h7BIKQ0XwzKZMwVKhUA/2DMJvkwwonnGVHBg1Q9SDlVYGrklob5V6u7ZkYonuv9K9B5N+rCYP2tyWMDOBVC1ZrspuvYBPDiw6HPdrwx+/obRmEsaDaewP67W9+uXmSjH+JqX54WihgdiHqQQ8AJ7gF13v1+y6C6h1Yz4+bKYIciZDm05CpL230dB10K7cV0/RuU2bKg3buO6Zb5YyfF3JXfEEVcpiC5hFk3Vs0lYPFCLHHFDZRSFoauLz1J17H78Tftj1aoQBfRk0wkevYcP9Su4Is4lzIr/rZFxjXNiqhTxL83t3T5vljRftbHKobymW9ffP45F7RXWXFbi5DWL7D86IcpHQMvQR7Meb+cl02KNkIqW/vj3itZfkqlapPNx9QfRWY6RoLX9G6KLo/2IxULSG3yWeRrZWmq7S936RVCruOLC5TM4ZYqLXuT42wKZDPwc12le5Ftb/Ud3iDuv7f3X4UXzk0d4H9VeOOFEo5DXxk47CMBhRuLNE6stsJU3LZlfnQkHYHsDtrjk9TF8rUEC4hlOWhodSqav77Vr3ebueMUsDZX8R6OmWaFG2CM/d9MMTgKifXrfrSjZH+oIa80qj83dRMPQ5bUuDCwkvfYf+YzUbkfEKwaf7AZVEqRByoS5yz07kJu5GoHt4x39jHg0bAImbNFZX23bwd2fRgTu0UwnQrT7bv8JRRu2Sy/E1ZYKN+AL4vV6iIGMHIiNmCR7cmiVtBvweI6QsvpXDeU124loCam2wYrMKfMEdhzu7dsr9A6XZvKKqXRkoBORkLReDBcV0KB0b2ceCxpUIRr21ZrZugdKaSSu6+mLS11xdQC5DXrRBaj0L31FKsEw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(376002)(366004)(136003)(346002)(396003)(39860400002)(4326008)(2616005)(1076003)(107886003)(83380400001)(186003)(66476007)(8936002)(66556008)(44832011)(8676002)(5660300002)(30864003)(16799955002)(66946007)(2906002)(36756003)(316002)(84970400001)(86362001)(478600001)(6916009)(6506007)(52116002)(6666004)(41300700001)(45080400002)(6512007)(26005)(38350700002)(38100700002)(6486002)(15188155005)(2004002)(547064002)(559001)(579004)(19623215001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cWiZ4jmFie7RkOkGDC9axVHZqbVq8eWhrY8nxceggmCjg92doRAIxVgpM/ch?= =?us-ascii?Q?HE/lo/YApsquMrjpwI28hb02f2Ko/dOZ3r9lZNPINFu2BUTcyPoNowc54Jkq?= =?us-ascii?Q?aVCHQDuoLDdHU39spz6U06aVoS2fUEkKzTH9X8zBi/0N3wvSL51yW4dI6D5k?= =?us-ascii?Q?izYMgTIaBrjxUPR2ZoZ2I7sPqtBf4Kzn4OgWUlYJEuDa4/sO7wi8H2Lw6s6V?= =?us-ascii?Q?JXgYRglVOPNVWtbQwISuihqWQb/0qSWptxslLPMJRC7nhSxAVc2153auy7Hd?= =?us-ascii?Q?MpAUUZgDYM2VTBwNSYPH5E39Grqm2K7l7J9h4L88mSIUX9A59bCXA1c4K1vB?= =?us-ascii?Q?N6Towd1ID3kyRC+HfpwK+uxEXbGBI9Q6PL7IWH3wwd4WOmb8sA3hGI/NsuSR?= =?us-ascii?Q?Uw5zp9hcK43Tf94StBewPbVdWEoHyFji0Jvnp+wSb6OH1WxEuRTKnCxEMZZw?= =?us-ascii?Q?BCJscY4f590YbzkDwJJ6ezU36gjmd3znap2y9AQj34NlH3FFgPNawo6RzFCb?= =?us-ascii?Q?AlSFQxUOCpfgH8ojMAON357BG1FRoYuty18hU2AyufidG/SFwotvw/w1cY0n?= =?us-ascii?Q?CRkxIdKWCmrGyZ9X/7R57mWz3zfzRCErwZbUCi0r/ctgCoCW7G/OD3w1NCqL?= =?us-ascii?Q?xGgtvLepAVpS0vTSk3s+1yP5iLkx/Su32XIxeio7ocjXbHMbPKXmefgqc6CY?= =?us-ascii?Q?4P7b2qK0vt7VdQaUZJZTwL9rEdxXHmlGgWeRWLJcRXx53CPKv8eMA0mmQMfk?= =?us-ascii?Q?GGMLIn/fK5ymu4T01JNtc7MovYgCIHE/maZnoxoJw886+KBr/vHqZyVd0Cjz?= =?us-ascii?Q?blBy+/vXviwuFh1bsRnh2wqDnqwnKHsJhgIHr9+2GPNmRIxkfrOkpdsd4dKg?= =?us-ascii?Q?cLp2JzxaOiEYPi51d1q2wgL5GVYjjuXJZvj6qP/2GUUM6Xvwpqn7HTUOpL6v?= =?us-ascii?Q?02UPtz+F+vBg0TNzBsv/p2zxrLEqvABjQVEGLadf+ewuP0WKak1VCiqCUGmc?= =?us-ascii?Q?CywP870CKbfvs2OQTDUsKgwZjG70Z5FAa1/zsVuL0jMkaFEZuqirKbmgnWFt?= =?us-ascii?Q?bzQcVtk1SGpO50nMkYIwGekDfP4cRSQyhocfAyZIGGCTqKKfqn0gong/qGNd?= =?us-ascii?Q?SuZ7NxOyBpc8oM9GChn6hLi9R3m4dmy9DWsOc+4L9ap3n4vrUKWOc+L1Vzll?= =?us-ascii?Q?p/WRvaOHwsSBwKK0bRPGg0MnaODV7FZXN+959j8A9wrTz58iAp0cuLRdlgWd?= =?us-ascii?Q?BmuVIoYAE9E7D+C9Zf9h8ZIwKvkcmhSM5kZ4byvx8TsBIwQcWnafq3XWpzRN?= =?us-ascii?Q?WuwJUrmeS4/JPPO/KnwvAsFh93+AYXxXtPV0Rrnm5EGp7D69ynEUKuascyD/?= =?us-ascii?Q?IAIpf7o/fs2FXRWuaiO+Jl6khBcnjy28O1owTKb8r5C4saHhGRI5mJg4BK6V?= =?us-ascii?Q?qPPPJgXHHi7O1G5l8PicWHJcpQreVl2HRFBwiiMXQrnj3F38I1aNUtxUCzRt?= =?us-ascii?Q?IAXvc7fpSaJ/lC+mr9CDfzCJ4J3hngGUQ1gcN+ZronUc2MAC+hk+Dbfl/AHG?= =?us-ascii?Q?pIn3PyD1hTWRZvX8dwYmuHhRJctZdte5dXoYI+Ax?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71a7be56-b20a-4969-d842-08da745e0dac X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2022 08:07:34.7149 (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: 6/iolQB6lZlpocjdSzM2GgJoGTjVaC7A4GSwu2c8mixyN8PUDmrlgcdEE+PEIhQ6biFnsLUK+55a9e4p09wh4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-02_04,2022-08-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2208020038 X-Proofpoint-GUID: kNYsPCoIQmGcxn9Nb8LlJH9NBAA2WdM4 X-Proofpoint-ORIG-GUID: kNYsPCoIQmGcxn9Nb8LlJH9NBAA2WdM4 X-Spam-Status: No, score=-13.2 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 08:07:54 -0000 From: Weimin Pan [Changes from V5] - testuite fixes for various warnings on x86_64-linux. - libctfframe testsuite now uses recursive makefiles for building the test programs. This keeps the test machinery simple. These tests use the host compiler to build the tests. - The test programs in libctfframe testsuite now use dejagnu pass () / fail () methods. [End of changes from V5] [No changes in V4] [Changes from V3] - Bugfixes around endian flipping code. - ctf_frame_find_fre () API now performs the checks according to the type of FDE: For CTF_FRAME_DESCRIPTOR_ENTRY_TYPE_ADDRINC: return the entry where (PC >= fre_start_addr) For CTF_FRAME_DESCRIPTOR_ENTRY_TYPE_ADDRMASK: return the entry where (PC & MASK >= MASK) - Additional testcases for CTF Frame encoder and endian flipping. [End of changes from V3] [Changes from V2] - consistent use of terminology around CTF Frame and its components. - Added testsuite for CTF frame decoder. [End of changes from V2] [Changes from V1] - bugfixes [End of changes from V1] libctfframe is a library that allows you to: - decode a .ctf_frame section - probe and inspect a .ctf_frame section - encode (and eventually write) a .ctf_frame section. This library is currently being used by the linker, readelf, objdump and the unwinder. The file include/ctf-frame-api.h defines the user-facing APIs for decoding, encoding and probing .ctf_frame sections. A set of error codes together with their error message strings are also defined. Endian flipping is performed automatically at read and write time, if cross-endianness is detected. PS: libctfframe/configure has NOT been included in the patch. Please regenerate. ChangeLog: * Makefile.def: Add libctfframe as new module with its dependencies. * Makefile.in: Regenerated. * binutils/Makefile.am: Add libctfframe. * binutils/Makefile.in: Regenerated. * configure: Regenerated * configure.ac: Add libctfframe to host_libs. * libctfframe/Makefile.am: New file. * libctfframe/Makefile.in: New file. * libctfframe/aclocal.m4: New file. * libctfframe/config.h.in: New file. * libctfframe/configure: New file. <-- [REMOVED FROM THE PATCH. PLEASE REGENERATE.] * libctfframe/configure.ac: New file. * libctfframe/ctf-frame-error.c: New file. * libctfframe/ctf-frame-impl.h: New file. * libctfframe/ctf-frame.c: New file. include/ChangeLog: * ctf-frame-api.h: New file. testsuite/ChangeLog: * libctfframe/testsuite/Makefile.am: New file. * libctfframe/testsuite/Makefile.in: Regenerated. * libctfframe/testsuite/libctfframe.decode/Makefile.am: New file. * libctfframe/testsuite/libctfframe.decode/Makefile.in: Regenerated. * libctfframe/testsuite/libctfframe.decode/decode.exp: New file. * libctfframe/testsuite/libctfframe.encode/Makefile.am: Likewise. * libctfframe/testsuite/libctfframe.encode/Makefile.in: Regenerated. * libctfframe/testsuite/libctfframe.encode/encode.exp: New file. * libctfframe/testsuite/libctfframe.decode/bigendian_data.c: Likewise. * libctfframe/testsuite/libctfframe.decode/frecnt_1.c: Likewise. * libctfframe/testsuite/libctfframe.decode/frecnt_2.c: Likewise. --- Makefile.def | 2 + Makefile.in | 1288 +++++++++++++- binutils/Makefile.am | 2 + binutils/Makefile.in | 1 + configure | 2 +- configure.ac | 2 +- include/ctf-frame-api.h | 210 +++ libctfframe/Makefile.am | 43 + libctfframe/Makefile.in | 1048 +++++++++++ libctfframe/aclocal.m4 | 1241 +++++++++++++ libctfframe/config.h.in | 144 ++ libctfframe/configure.ac | 78 + libctfframe/ctf-frame-error.c | 49 + libctfframe/ctf-frame-impl.h | 55 + libctfframe/ctf-frame.c | 1569 +++++++++++++++++ libctfframe/testsuite/Makefile.am | 23 + libctfframe/testsuite/Makefile.in | 682 +++++++ libctfframe/testsuite/config/default.exp | 54 + .../testsuite/libctfframe.decode/DATA1 | Bin 0 -> 59 bytes .../testsuite/libctfframe.decode/DATA2 | Bin 0 -> 91 bytes .../testsuite/libctfframe.decode/DATA_BIGE | Bin 0 -> 59 bytes .../testsuite/libctfframe.decode/Makefile.am | 14 + .../testsuite/libctfframe.decode/Makefile.in | 661 +++++++ .../libctfframe.decode/bigendian_data.c | 107 ++ .../testsuite/libctfframe.decode/decode.exp | 41 + .../testsuite/libctfframe.decode/frecnt_1.c | 99 ++ .../testsuite/libctfframe.decode/frecnt_2.c | 103 ++ .../testsuite/libctfframe.encode/Makefile.am | 6 + .../testsuite/libctfframe.encode/Makefile.in | 608 +++++++ .../testsuite/libctfframe.encode/encode.exp | 25 + .../testsuite/libctfframe.encode/encode_1.c | 182 ++ 31 files changed, 8332 insertions(+), 7 deletions(-) create mode 100644 include/ctf-frame-api.h create mode 100644 libctfframe/Makefile.am create mode 100644 libctfframe/Makefile.in create mode 100644 libctfframe/aclocal.m4 create mode 100644 libctfframe/config.h.in create mode 100644 libctfframe/configure.ac create mode 100644 libctfframe/ctf-frame-error.c create mode 100644 libctfframe/ctf-frame-impl.h create mode 100644 libctfframe/ctf-frame.c create mode 100644 libctfframe/testsuite/Makefile.am create mode 100644 libctfframe/testsuite/Makefile.in create mode 100644 libctfframe/testsuite/config/default.exp create mode 100644 libctfframe/testsuite/libctfframe.decode/DATA1 create mode 100644 libctfframe/testsuite/libctfframe.decode/DATA2 create mode 100644 libctfframe/testsuite/libctfframe.decode/DATA_BIGE create mode 100644 libctfframe/testsuite/libctfframe.decode/Makefile.am create mode 100644 libctfframe/testsuite/libctfframe.decode/Makefile.in create mode 100644 libctfframe/testsuite/libctfframe.decode/bigendian_data.c create mode 100644 libctfframe/testsuite/libctfframe.decode/decode.exp create mode 100644 libctfframe/testsuite/libctfframe.decode/frecnt_1.c create mode 100644 libctfframe/testsuite/libctfframe.decode/frecnt_2.c create mode 100644 libctfframe/testsuite/libctfframe.encode/Makefile.am create mode 100644 libctfframe/testsuite/libctfframe.encode/Makefile.in create mode 100644 libctfframe/testsuite/libctfframe.encode/encode.exp create mode 100644 libctfframe/testsuite/libctfframe.encode/encode_1.c diff --git a/Makefile.def b/Makefile.def index acdcd625ed6..a63c3966513 100644 --- a/Makefile.def +++ b/Makefile.def @@ -149,6 +149,7 @@ host_modules= { module= lto-plugin; bootstrap=true; host_modules= { module= libcc1; extra_configure_flags=--enable-shared; }; host_modules= { module= gotools; }; host_modules= { module= libctf; bootstrap=true; }; +host_modules= { module=libctfframe; bootstrap=true; }; target_modules = { module= libstdc++-v3; bootstrap=true; @@ -478,6 +479,7 @@ dependencies = { module=all-binutils; on=all-intl; }; dependencies = { module=all-binutils; on=all-gas; }; dependencies = { module=all-binutils; on=all-libctf; }; dependencies = { module=all-ld; on=all-libctf; }; +dependencies = { module=all-binutils; on=all-libctfframe; }; // We put install-opcodes before install-binutils because the installed // binutils might be on PATH, and they might need the shared opcodes diff --git a/Makefile.in b/Makefile.in index cb39e4790d6..7b93fd14ffb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1109,7 +1109,8 @@ configure-host: \ maybe-configure-lto-plugin \ maybe-configure-libcc1 \ maybe-configure-gotools \ - maybe-configure-libctf + maybe-configure-libctf \ + maybe-configure-libctfframe .PHONY: configure-target configure-target: \ maybe-configure-target-libstdc++-v3 \ @@ -1290,6 +1291,9 @@ all-host: maybe-all-gotools @if libctf-no-bootstrap all-host: maybe-all-libctf @endif libctf-no-bootstrap +@if libctfframe-no-bootstrap +all-host: maybe-all-libctfframe +@endif libctfframe-no-bootstrap .PHONY: all-target @@ -1396,6 +1400,7 @@ info-host: maybe-info-lto-plugin info-host: maybe-info-libcc1 info-host: maybe-info-gotools info-host: maybe-info-libctf +info-host: maybe-info-libctfframe .PHONY: info-target @@ -1487,6 +1492,7 @@ dvi-host: maybe-dvi-lto-plugin dvi-host: maybe-dvi-libcc1 dvi-host: maybe-dvi-gotools dvi-host: maybe-dvi-libctf +dvi-host: maybe-dvi-libctfframe .PHONY: dvi-target @@ -1578,6 +1584,7 @@ pdf-host: maybe-pdf-lto-plugin pdf-host: maybe-pdf-libcc1 pdf-host: maybe-pdf-gotools pdf-host: maybe-pdf-libctf +pdf-host: maybe-pdf-libctfframe .PHONY: pdf-target @@ -1669,6 +1676,7 @@ html-host: maybe-html-lto-plugin html-host: maybe-html-libcc1 html-host: maybe-html-gotools html-host: maybe-html-libctf +html-host: maybe-html-libctfframe .PHONY: html-target @@ -1760,6 +1768,7 @@ TAGS-host: maybe-TAGS-lto-plugin TAGS-host: maybe-TAGS-libcc1 TAGS-host: maybe-TAGS-gotools TAGS-host: maybe-TAGS-libctf +TAGS-host: maybe-TAGS-libctfframe .PHONY: TAGS-target @@ -1851,6 +1860,7 @@ install-info-host: maybe-install-info-lto-plugin install-info-host: maybe-install-info-libcc1 install-info-host: maybe-install-info-gotools install-info-host: maybe-install-info-libctf +install-info-host: maybe-install-info-libctfframe .PHONY: install-info-target @@ -1942,6 +1952,7 @@ install-dvi-host: maybe-install-dvi-lto-plugin install-dvi-host: maybe-install-dvi-libcc1 install-dvi-host: maybe-install-dvi-gotools install-dvi-host: maybe-install-dvi-libctf +install-dvi-host: maybe-install-dvi-libctfframe .PHONY: install-dvi-target @@ -2033,6 +2044,7 @@ install-pdf-host: maybe-install-pdf-lto-plugin install-pdf-host: maybe-install-pdf-libcc1 install-pdf-host: maybe-install-pdf-gotools install-pdf-host: maybe-install-pdf-libctf +install-pdf-host: maybe-install-pdf-libctfframe .PHONY: install-pdf-target @@ -2124,6 +2136,7 @@ install-html-host: maybe-install-html-lto-plugin install-html-host: maybe-install-html-libcc1 install-html-host: maybe-install-html-gotools install-html-host: maybe-install-html-libctf +install-html-host: maybe-install-html-libctfframe .PHONY: install-html-target @@ -2215,6 +2228,7 @@ installcheck-host: maybe-installcheck-lto-plugin installcheck-host: maybe-installcheck-libcc1 installcheck-host: maybe-installcheck-gotools installcheck-host: maybe-installcheck-libctf +installcheck-host: maybe-installcheck-libctfframe .PHONY: installcheck-target @@ -2306,6 +2320,7 @@ mostlyclean-host: maybe-mostlyclean-lto-plugin mostlyclean-host: maybe-mostlyclean-libcc1 mostlyclean-host: maybe-mostlyclean-gotools mostlyclean-host: maybe-mostlyclean-libctf +mostlyclean-host: maybe-mostlyclean-libctfframe .PHONY: mostlyclean-target @@ -2397,6 +2412,7 @@ clean-host: maybe-clean-lto-plugin clean-host: maybe-clean-libcc1 clean-host: maybe-clean-gotools clean-host: maybe-clean-libctf +clean-host: maybe-clean-libctfframe .PHONY: clean-target @@ -2488,6 +2504,7 @@ distclean-host: maybe-distclean-lto-plugin distclean-host: maybe-distclean-libcc1 distclean-host: maybe-distclean-gotools distclean-host: maybe-distclean-libctf +distclean-host: maybe-distclean-libctfframe .PHONY: distclean-target @@ -2579,6 +2596,7 @@ maintainer-clean-host: maybe-maintainer-clean-lto-plugin maintainer-clean-host: maybe-maintainer-clean-libcc1 maintainer-clean-host: maybe-maintainer-clean-gotools maintainer-clean-host: maybe-maintainer-clean-libctf +maintainer-clean-host: maybe-maintainer-clean-libctfframe .PHONY: maintainer-clean-target @@ -2727,7 +2745,8 @@ check-host: \ maybe-check-lto-plugin \ maybe-check-libcc1 \ maybe-check-gotools \ - maybe-check-libctf + maybe-check-libctf \ + maybe-check-libctfframe .PHONY: check-target check-target: \ @@ -2865,7 +2884,8 @@ install-host-nogcc: \ maybe-install-lto-plugin \ maybe-install-libcc1 \ maybe-install-gotools \ - maybe-install-libctf + maybe-install-libctf \ + maybe-install-libctfframe .PHONY: install-host install-host: \ @@ -2921,7 +2941,8 @@ install-host: \ maybe-install-lto-plugin \ maybe-install-libcc1 \ maybe-install-gotools \ - maybe-install-libctf + maybe-install-libctf \ + maybe-install-libctfframe .PHONY: install-target install-target: \ @@ -3032,7 +3053,8 @@ install-strip-host: \ maybe-install-strip-lto-plugin \ maybe-install-strip-libcc1 \ maybe-install-strip-gotools \ - maybe-install-strip-libctf + maybe-install-strip-libctf \ + maybe-install-strip-libctfframe .PHONY: install-strip-target install-strip-target: \ @@ -44044,6 +44066,1146 @@ maintainer-clean-libctf: +.PHONY: configure-libctfframe maybe-configure-libctfframe +maybe-configure-libctfframe: +@if gcc-bootstrap +configure-libctfframe: stage_current +@endif gcc-bootstrap +@if libctfframe +maybe-configure-libctfframe: configure-libctfframe +configure-libctfframe: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + $(HOST_EXPORTS) \ + echo Configuring in $(HOST_SUBDIR)/libctfframe; \ + cd "$(HOST_SUBDIR)/libctfframe" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) \ + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + || exit 1 +@endif libctfframe + + + +.PHONY: configure-stage1-libctfframe maybe-configure-stage1-libctfframe +maybe-configure-stage1-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stage1-libctfframe: configure-stage1-libctfframe +configure-stage1-libctfframe: + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage 1 in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stage2-libctfframe maybe-configure-stage2-libctfframe +maybe-configure-stage2-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stage2-libctfframe: configure-stage2-libctfframe +configure-stage2-libctfframe: + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage 2 in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stage3-libctfframe maybe-configure-stage3-libctfframe +maybe-configure-stage3-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stage3-libctfframe: configure-stage3-libctfframe +configure-stage3-libctfframe: + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage 3 in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stage4-libctfframe maybe-configure-stage4-libctfframe +maybe-configure-stage4-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stage4-libctfframe: configure-stage4-libctfframe +configure-stage4-libctfframe: + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage 4 in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stageprofile-libctfframe maybe-configure-stageprofile-libctfframe +maybe-configure-stageprofile-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stageprofile-libctfframe: configure-stageprofile-libctfframe +configure-stageprofile-libctfframe: + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage profile in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stagetrain-libctfframe maybe-configure-stagetrain-libctfframe +maybe-configure-stagetrain-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stagetrain-libctfframe: configure-stagetrain-libctfframe +configure-stagetrain-libctfframe: + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGEtrain_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGEtrain_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGEtrain_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage train in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stagefeedback-libctfframe maybe-configure-stagefeedback-libctfframe +maybe-configure-stagefeedback-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stagefeedback-libctfframe: configure-stagefeedback-libctfframe +configure-stagefeedback-libctfframe: + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage feedback in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stageautoprofile-libctfframe maybe-configure-stageautoprofile-libctfframe +maybe-configure-stageautoprofile-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stageautoprofile-libctfframe: configure-stageautoprofile-libctfframe +configure-stageautoprofile-libctfframe: + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGEautoprofile_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGEautoprofile_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage autoprofile in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + +.PHONY: configure-stageautofeedback-libctfframe maybe-configure-stageautofeedback-libctfframe +maybe-configure-stageautofeedback-libctfframe: +@if libctfframe-bootstrap +maybe-configure-stageautofeedback-libctfframe: configure-stageautofeedback-libctfframe +configure-stageautofeedback-libctfframe: + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + test ! -f $(HOST_SUBDIR)/libctfframe/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + CFLAGS="$(STAGEautofeedback_CFLAGS)"; export CFLAGS; \ + CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)"; export CXXFLAGS; \ + LIBCFLAGS="$(STAGEautofeedback_CFLAGS)"; export LIBCFLAGS; \ + echo Configuring stage autofeedback in $(HOST_SUBDIR)/libctfframe; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libctfframe; \ + cd $(HOST_SUBDIR)/libctfframe || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libctfframe/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libctfframe; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) +@endif libctfframe-bootstrap + + + + + +.PHONY: all-libctfframe maybe-all-libctfframe +maybe-all-libctfframe: +@if gcc-bootstrap +all-libctfframe: stage_current +@endif gcc-bootstrap +@if libctfframe +TARGET-libctfframe=all +maybe-all-libctfframe: all-libctfframe +all-libctfframe: configure-libctfframe + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ + $(TARGET-libctfframe)) +@endif libctfframe + + + +.PHONY: all-stage1-libctfframe maybe-all-stage1-libctfframe +.PHONY: clean-stage1-libctfframe maybe-clean-stage1-libctfframe +maybe-all-stage1-libctfframe: +maybe-clean-stage1-libctfframe: +@if libctfframe-bootstrap +maybe-all-stage1-libctfframe: all-stage1-libctfframe +all-stage1: all-stage1-libctfframe +TARGET-stage1-libctfframe = $(TARGET-libctfframe) +all-stage1-libctfframe: configure-stage1-libctfframe + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + $(HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGE1_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGE1_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGE1_CXXFLAGS)" \ + LIBCFLAGS="$(LIBCFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) \ + $(STAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGE1_TFLAGS)" \ + $(TARGET-stage1-libctfframe) + +maybe-clean-stage1-libctfframe: clean-stage1-libctfframe +clean-stage1: clean-stage1-libctfframe +clean-stage1-libctfframe: + @if [ $(current_stage) = stage1 ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stage1-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stage1-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) \ + $(STAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stage2-libctfframe maybe-all-stage2-libctfframe +.PHONY: clean-stage2-libctfframe maybe-clean-stage2-libctfframe +maybe-all-stage2-libctfframe: +maybe-clean-stage2-libctfframe: +@if libctfframe-bootstrap +maybe-all-stage2-libctfframe: all-stage2-libctfframe +all-stage2: all-stage2-libctfframe +TARGET-stage2-libctfframe = $(TARGET-libctfframe) +all-stage2-libctfframe: configure-stage2-libctfframe + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGE2_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGE2_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGE2_CXXFLAGS)" \ + LIBCFLAGS="$(STAGE2_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGE2_TFLAGS)" \ + $(TARGET-stage2-libctfframe) + +maybe-clean-stage2-libctfframe: clean-stage2-libctfframe +clean-stage2: clean-stage2-libctfframe +clean-stage2-libctfframe: + @if [ $(current_stage) = stage2 ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stage2-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stage2-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stage3-libctfframe maybe-all-stage3-libctfframe +.PHONY: clean-stage3-libctfframe maybe-clean-stage3-libctfframe +maybe-all-stage3-libctfframe: +maybe-clean-stage3-libctfframe: +@if libctfframe-bootstrap +maybe-all-stage3-libctfframe: all-stage3-libctfframe +all-stage3: all-stage3-libctfframe +TARGET-stage3-libctfframe = $(TARGET-libctfframe) +all-stage3-libctfframe: configure-stage3-libctfframe + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGE3_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGE3_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGE3_CXXFLAGS)" \ + LIBCFLAGS="$(STAGE3_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGE3_TFLAGS)" \ + $(TARGET-stage3-libctfframe) + +maybe-clean-stage3-libctfframe: clean-stage3-libctfframe +clean-stage3: clean-stage3-libctfframe +clean-stage3-libctfframe: + @if [ $(current_stage) = stage3 ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stage3-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stage3-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stage4-libctfframe maybe-all-stage4-libctfframe +.PHONY: clean-stage4-libctfframe maybe-clean-stage4-libctfframe +maybe-all-stage4-libctfframe: +maybe-clean-stage4-libctfframe: +@if libctfframe-bootstrap +maybe-all-stage4-libctfframe: all-stage4-libctfframe +all-stage4: all-stage4-libctfframe +TARGET-stage4-libctfframe = $(TARGET-libctfframe) +all-stage4-libctfframe: configure-stage4-libctfframe + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGE4_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGE4_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGE4_CXXFLAGS)" \ + LIBCFLAGS="$(STAGE4_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGE4_TFLAGS)" \ + $(TARGET-stage4-libctfframe) + +maybe-clean-stage4-libctfframe: clean-stage4-libctfframe +clean-stage4: clean-stage4-libctfframe +clean-stage4-libctfframe: + @if [ $(current_stage) = stage4 ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stage4-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stage4-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stageprofile-libctfframe maybe-all-stageprofile-libctfframe +.PHONY: clean-stageprofile-libctfframe maybe-clean-stageprofile-libctfframe +maybe-all-stageprofile-libctfframe: +maybe-clean-stageprofile-libctfframe: +@if libctfframe-bootstrap +maybe-all-stageprofile-libctfframe: all-stageprofile-libctfframe +all-stageprofile: all-stageprofile-libctfframe +TARGET-stageprofile-libctfframe = $(TARGET-libctfframe) +all-stageprofile-libctfframe: configure-stageprofile-libctfframe + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGEprofile_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGEprofile_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \ + LIBCFLAGS="$(STAGEprofile_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGEprofile_TFLAGS)" \ + $(TARGET-stageprofile-libctfframe) + +maybe-clean-stageprofile-libctfframe: clean-stageprofile-libctfframe +clean-stageprofile: clean-stageprofile-libctfframe +clean-stageprofile-libctfframe: + @if [ $(current_stage) = stageprofile ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stageprofile-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stageprofile-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stagetrain-libctfframe maybe-all-stagetrain-libctfframe +.PHONY: clean-stagetrain-libctfframe maybe-clean-stagetrain-libctfframe +maybe-all-stagetrain-libctfframe: +maybe-clean-stagetrain-libctfframe: +@if libctfframe-bootstrap +maybe-all-stagetrain-libctfframe: all-stagetrain-libctfframe +all-stagetrain: all-stagetrain-libctfframe +TARGET-stagetrain-libctfframe = $(TARGET-libctfframe) +all-stagetrain-libctfframe: configure-stagetrain-libctfframe + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGEtrain_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGEtrain_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGEtrain_CXXFLAGS)" \ + LIBCFLAGS="$(STAGEtrain_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGEtrain_TFLAGS)" \ + $(TARGET-stagetrain-libctfframe) + +maybe-clean-stagetrain-libctfframe: clean-stagetrain-libctfframe +clean-stagetrain: clean-stagetrain-libctfframe +clean-stagetrain-libctfframe: + @if [ $(current_stage) = stagetrain ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stagetrain-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stagetrain-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stagefeedback-libctfframe maybe-all-stagefeedback-libctfframe +.PHONY: clean-stagefeedback-libctfframe maybe-clean-stagefeedback-libctfframe +maybe-all-stagefeedback-libctfframe: +maybe-clean-stagefeedback-libctfframe: +@if libctfframe-bootstrap +maybe-all-stagefeedback-libctfframe: all-stagefeedback-libctfframe +all-stagefeedback: all-stagefeedback-libctfframe +TARGET-stagefeedback-libctfframe = $(TARGET-libctfframe) +all-stagefeedback-libctfframe: configure-stagefeedback-libctfframe + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGEfeedback_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGEfeedback_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \ + LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGEfeedback_TFLAGS)" \ + $(TARGET-stagefeedback-libctfframe) + +maybe-clean-stagefeedback-libctfframe: clean-stagefeedback-libctfframe +clean-stagefeedback: clean-stagefeedback-libctfframe +clean-stagefeedback-libctfframe: + @if [ $(current_stage) = stagefeedback ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stagefeedback-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stagefeedback-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stageautoprofile-libctfframe maybe-all-stageautoprofile-libctfframe +.PHONY: clean-stageautoprofile-libctfframe maybe-clean-stageautoprofile-libctfframe +maybe-all-stageautoprofile-libctfframe: +maybe-clean-stageautoprofile-libctfframe: +@if libctfframe-bootstrap +maybe-all-stageautoprofile-libctfframe: all-stageautoprofile-libctfframe +all-stageautoprofile: all-stageautoprofile-libctfframe +TARGET-stageautoprofile-libctfframe = $(TARGET-libctfframe) +all-stageautoprofile-libctfframe: configure-stageautoprofile-libctfframe + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + $$s/gcc/config/i386/$(AUTO_PROFILE) \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGEautoprofile_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGEautoprofile_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)" \ + LIBCFLAGS="$(STAGEautoprofile_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGEautoprofile_TFLAGS)" \ + $(TARGET-stageautoprofile-libctfframe) + +maybe-clean-stageautoprofile-libctfframe: clean-stageautoprofile-libctfframe +clean-stageautoprofile: clean-stageautoprofile-libctfframe +clean-stageautoprofile-libctfframe: + @if [ $(current_stage) = stageautoprofile ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stageautoprofile-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stageautoprofile-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + +.PHONY: all-stageautofeedback-libctfframe maybe-all-stageautofeedback-libctfframe +.PHONY: clean-stageautofeedback-libctfframe maybe-clean-stageautofeedback-libctfframe +maybe-all-stageautofeedback-libctfframe: +maybe-clean-stageautofeedback-libctfframe: +@if libctfframe-bootstrap +maybe-all-stageautofeedback-libctfframe: all-stageautofeedback-libctfframe +all-stageautofeedback: all-stageautofeedback-libctfframe +TARGET-stageautofeedback-libctfframe = $(TARGET-libctfframe) +all-stageautofeedback-libctfframe: configure-stageautofeedback-libctfframe + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libctfframe && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(STAGEautofeedback_CFLAGS)" \ + GENERATOR_CFLAGS="$(STAGEautofeedback_GENERATOR_CFLAGS)" \ + CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)" \ + LIBCFLAGS="$(STAGEautofeedback_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ + $(TARGET-stageautofeedback-libctfframe) + +maybe-clean-stageautofeedback-libctfframe: clean-stageautofeedback-libctfframe +clean-stageautofeedback: clean-stageautofeedback-libctfframe +clean-stageautofeedback-libctfframe: + @if [ $(current_stage) = stageautofeedback ]; then \ + [ -f $(HOST_SUBDIR)/libctfframe/Makefile ] || exit 0; \ + else \ + [ -f $(HOST_SUBDIR)/stageautofeedback-libctfframe/Makefile ] || exit 0; \ + $(MAKE) stageautofeedback-start; \ + fi; \ + cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean +@endif libctfframe-bootstrap + + + + + +.PHONY: check-libctfframe maybe-check-libctfframe +maybe-check-libctfframe: +@if libctfframe +maybe-check-libctfframe: check-libctfframe + +check-libctfframe: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) + +@endif libctfframe + +.PHONY: install-libctfframe maybe-install-libctfframe +maybe-install-libctfframe: +@if libctfframe +maybe-install-libctfframe: install-libctfframe + +install-libctfframe: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(FLAGS_TO_PASS) install) + +@endif libctfframe + +.PHONY: install-strip-libctfframe maybe-install-strip-libctfframe +maybe-install-strip-libctfframe: +@if libctfframe +maybe-install-strip-libctfframe: install-strip-libctfframe + +install-strip-libctfframe: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(FLAGS_TO_PASS) install-strip) + +@endif libctfframe + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-libctfframe info-libctfframe +maybe-info-libctfframe: +@if libctfframe +maybe-info-libctfframe: info-libctfframe + +info-libctfframe: \ + configure-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-dvi-libctfframe dvi-libctfframe +maybe-dvi-libctfframe: +@if libctfframe +maybe-dvi-libctfframe: dvi-libctfframe + +dvi-libctfframe: \ + configure-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-pdf-libctfframe pdf-libctfframe +maybe-pdf-libctfframe: +@if libctfframe +maybe-pdf-libctfframe: pdf-libctfframe + +pdf-libctfframe: \ + configure-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing pdf in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-html-libctfframe html-libctfframe +maybe-html-libctfframe: +@if libctfframe +maybe-html-libctfframe: html-libctfframe + +html-libctfframe: \ + configure-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing html in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + html) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-TAGS-libctfframe TAGS-libctfframe +maybe-TAGS-libctfframe: +@if libctfframe +maybe-TAGS-libctfframe: TAGS-libctfframe + +TAGS-libctfframe: \ + configure-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + TAGS) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-install-info-libctfframe install-info-libctfframe +maybe-install-info-libctfframe: +@if libctfframe +maybe-install-info-libctfframe: install-info-libctfframe + +install-info-libctfframe: \ + configure-libctfframe \ + info-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-info) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-install-dvi-libctfframe install-dvi-libctfframe +maybe-install-dvi-libctfframe: +@if libctfframe +maybe-install-dvi-libctfframe: install-dvi-libctfframe + +install-dvi-libctfframe: \ + configure-libctfframe \ + dvi-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-dvi in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-dvi) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-install-pdf-libctfframe install-pdf-libctfframe +maybe-install-pdf-libctfframe: +@if libctfframe +maybe-install-pdf-libctfframe: install-pdf-libctfframe + +install-pdf-libctfframe: \ + configure-libctfframe \ + pdf-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-pdf in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-pdf) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-install-html-libctfframe install-html-libctfframe +maybe-install-html-libctfframe: +@if libctfframe +maybe-install-html-libctfframe: install-html-libctfframe + +install-html-libctfframe: \ + configure-libctfframe \ + html-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-html in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-html) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-installcheck-libctfframe installcheck-libctfframe +maybe-installcheck-libctfframe: +@if libctfframe +maybe-installcheck-libctfframe: installcheck-libctfframe + +installcheck-libctfframe: \ + configure-libctfframe + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + installcheck) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-mostlyclean-libctfframe mostlyclean-libctfframe +maybe-mostlyclean-libctfframe: +@if libctfframe +maybe-mostlyclean-libctfframe: mostlyclean-libctfframe + +mostlyclean-libctfframe: + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + mostlyclean) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-clean-libctfframe clean-libctfframe +maybe-clean-libctfframe: +@if libctfframe +maybe-clean-libctfframe: clean-libctfframe + +clean-libctfframe: + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + clean) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-distclean-libctfframe distclean-libctfframe +maybe-distclean-libctfframe: +@if libctfframe +maybe-distclean-libctfframe: distclean-libctfframe + +distclean-libctfframe: + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + distclean) \ + || exit 1 + +@endif libctfframe + +.PHONY: maybe-maintainer-clean-libctfframe maintainer-clean-libctfframe +maybe-maintainer-clean-libctfframe: +@if libctfframe +maybe-maintainer-clean-libctfframe: maintainer-clean-libctfframe + +maintainer-clean-libctfframe: + @[ -f ./libctfframe/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libctfframe"; \ + (cd $(HOST_SUBDIR)/libctfframe && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + maintainer-clean) \ + || exit 1 + +@endif libctfframe + + + # --------------------------------------- # Modules which run on the target machine # --------------------------------------- @@ -59280,6 +60442,11 @@ stage1-start:: mkdir stage1-libctf; \ mv stage1-libctf libctf @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stage1-libctfframe ] || \ + mkdir stage1-libctfframe; \ + mv stage1-libctfframe libctfframe +@endif libctfframe @[ -d stage1-$(TARGET_SUBDIR) ] || \ mkdir stage1-$(TARGET_SUBDIR); \ mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR) @@ -59405,6 +60572,11 @@ stage1-end:: cd $(HOST_SUBDIR); mv libctf stage1-libctf; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stage1-libctfframe; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); \ fi @@ -59597,6 +60769,12 @@ stage2-start:: mv stage2-libctf libctf; \ mv stage1-libctf prev-libctf || test -f stage1-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stage2-libctfframe ] || \ + mkdir stage2-libctfframe; \ + mv stage2-libctfframe libctfframe; \ + mv stage1-libctfframe prev-libctfframe || test -f stage1-lean +@endif libctfframe @[ -d stage2-$(TARGET_SUBDIR) ] || \ mkdir stage2-$(TARGET_SUBDIR); \ mv stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -59747,6 +60925,12 @@ stage2-end:: mv prev-libctf stage1-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stage2-libctfframe; \ + mv prev-libctfframe stage1-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); : ; \ @@ -59963,6 +61147,12 @@ stage3-start:: mv stage3-libctf libctf; \ mv stage2-libctf prev-libctf || test -f stage2-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stage3-libctfframe ] || \ + mkdir stage3-libctfframe; \ + mv stage3-libctfframe libctfframe; \ + mv stage2-libctfframe prev-libctfframe || test -f stage2-lean +@endif libctfframe @[ -d stage3-$(TARGET_SUBDIR) ] || \ mkdir stage3-$(TARGET_SUBDIR); \ mv stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -60113,6 +61303,12 @@ stage3-end:: mv prev-libctf stage2-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stage3-libctfframe; \ + mv prev-libctfframe stage2-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR); : ; \ @@ -60385,6 +61581,12 @@ stage4-start:: mv stage4-libctf libctf; \ mv stage3-libctf prev-libctf || test -f stage3-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stage4-libctfframe ] || \ + mkdir stage4-libctfframe; \ + mv stage4-libctfframe libctfframe; \ + mv stage3-libctfframe prev-libctfframe || test -f stage3-lean +@endif libctfframe @[ -d stage4-$(TARGET_SUBDIR) ] || \ mkdir stage4-$(TARGET_SUBDIR); \ mv stage4-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -60535,6 +61737,12 @@ stage4-end:: mv prev-libctf stage3-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stage4-libctfframe; \ + mv prev-libctfframe stage3-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stage4-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR); : ; \ @@ -60795,6 +62003,12 @@ stageprofile-start:: mv stageprofile-libctf libctf; \ mv stage1-libctf prev-libctf || test -f stage1-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stageprofile-libctfframe ] || \ + mkdir stageprofile-libctfframe; \ + mv stageprofile-libctfframe libctfframe; \ + mv stage1-libctfframe prev-libctfframe || test -f stage1-lean +@endif libctfframe @[ -d stageprofile-$(TARGET_SUBDIR) ] || \ mkdir stageprofile-$(TARGET_SUBDIR); \ mv stageprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -60945,6 +62159,12 @@ stageprofile-end:: mv prev-libctf stage1-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stageprofile-libctfframe; \ + mv prev-libctfframe stage1-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); : ; \ @@ -61138,6 +62358,12 @@ stagetrain-start:: mv stagetrain-libctf libctf; \ mv stageprofile-libctf prev-libctf || test -f stageprofile-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stagetrain-libctfframe ] || \ + mkdir stagetrain-libctfframe; \ + mv stagetrain-libctfframe libctfframe; \ + mv stageprofile-libctfframe prev-libctfframe || test -f stageprofile-lean +@endif libctfframe @[ -d stagetrain-$(TARGET_SUBDIR) ] || \ mkdir stagetrain-$(TARGET_SUBDIR); \ mv stagetrain-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -61288,6 +62514,12 @@ stagetrain-end:: mv prev-libctf stageprofile-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stagetrain-libctfframe; \ + mv prev-libctfframe stageprofile-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stagetrain-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR); : ; \ @@ -61481,6 +62713,12 @@ stagefeedback-start:: mv stagefeedback-libctf libctf; \ mv stagetrain-libctf prev-libctf || test -f stagetrain-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stagefeedback-libctfframe ] || \ + mkdir stagefeedback-libctfframe; \ + mv stagefeedback-libctfframe libctfframe; \ + mv stagetrain-libctfframe prev-libctfframe || test -f stagetrain-lean +@endif libctfframe @[ -d stagefeedback-$(TARGET_SUBDIR) ] || \ mkdir stagefeedback-$(TARGET_SUBDIR); \ mv stagefeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -61631,6 +62869,12 @@ stagefeedback-end:: mv prev-libctf stagetrain-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stagefeedback-libctfframe; \ + mv prev-libctfframe stagetrain-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stagefeedback-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stagetrain-$(TARGET_SUBDIR); : ; \ @@ -61847,6 +63091,12 @@ stageautoprofile-start:: mv stageautoprofile-libctf libctf; \ mv stage1-libctf prev-libctf || test -f stage1-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stageautoprofile-libctfframe ] || \ + mkdir stageautoprofile-libctfframe; \ + mv stageautoprofile-libctfframe libctfframe; \ + mv stage1-libctfframe prev-libctfframe || test -f stage1-lean +@endif libctfframe @[ -d stageautoprofile-$(TARGET_SUBDIR) ] || \ mkdir stageautoprofile-$(TARGET_SUBDIR); \ mv stageautoprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -61997,6 +63247,12 @@ stageautoprofile-end:: mv prev-libctf stage1-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stageautoprofile-libctfframe; \ + mv prev-libctfframe stage1-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stageautoprofile-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); : ; \ @@ -62190,6 +63446,12 @@ stageautofeedback-start:: mv stageautofeedback-libctf libctf; \ mv stageautoprofile-libctf prev-libctf || test -f stageautoprofile-lean @endif libctf +@if libctfframe + @cd $(HOST_SUBDIR); [ -d stageautofeedback-libctfframe ] || \ + mkdir stageautofeedback-libctfframe; \ + mv stageautofeedback-libctfframe libctfframe; \ + mv stageautoprofile-libctfframe prev-libctfframe || test -f stageautoprofile-lean +@endif libctfframe @[ -d stageautofeedback-$(TARGET_SUBDIR) ] || \ mkdir stageautofeedback-$(TARGET_SUBDIR); \ mv stageautofeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \ @@ -62340,6 +63602,12 @@ stageautofeedback-end:: mv prev-libctf stageautoprofile-libctf; : ; \ fi @endif libctf +@if libctfframe + @if test -d $(HOST_SUBDIR)/libctfframe; then \ + cd $(HOST_SUBDIR); mv libctfframe stageautofeedback-libctfframe; \ + mv prev-libctfframe stageautoprofile-libctfframe; : ; \ + fi +@endif libctfframe @if test -d $(TARGET_SUBDIR); then \ mv $(TARGET_SUBDIR) stageautofeedback-$(TARGET_SUBDIR); \ mv prev-$(TARGET_SUBDIR) stageautoprofile-$(TARGET_SUBDIR); : ; \ @@ -63259,6 +64527,16 @@ all-stagetrain-ld: maybe-all-stagetrain-libctf all-stagefeedback-ld: maybe-all-stagefeedback-libctf all-stageautoprofile-ld: maybe-all-stageautoprofile-libctf all-stageautofeedback-ld: maybe-all-stageautofeedback-libctf +all-binutils: maybe-all-libctfframe +all-stage1-binutils: maybe-all-stage1-libctfframe +all-stage2-binutils: maybe-all-stage2-libctfframe +all-stage3-binutils: maybe-all-stage3-libctfframe +all-stage4-binutils: maybe-all-stage4-libctfframe +all-stageprofile-binutils: maybe-all-stageprofile-libctfframe +all-stagetrain-binutils: maybe-all-stagetrain-libctfframe +all-stagefeedback-binutils: maybe-all-stagefeedback-libctfframe +all-stageautoprofile-binutils: maybe-all-stageautoprofile-libctfframe +all-stageautofeedback-binutils: maybe-all-stageautofeedback-libctfframe install-binutils: maybe-install-opcodes install-strip-binutils: maybe-install-strip-opcodes install-libctf: maybe-install-bfd diff --git a/binutils/Makefile.am b/binutils/Makefile.am index 751fbacce12..17dcc27fc86 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -176,6 +176,8 @@ LIBCTF = LIBCTF_NOBFD = endif +LIBCTFFRAME = ../libctfframe/libctfframe.la + LIBIBERTY = ../libiberty/libiberty.a POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES) diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 78d32b350e3..2ed7f05bf37 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -738,6 +738,7 @@ OPCODES = ../opcodes/libopcodes.la @ENABLE_LIBCTF_TRUE@LIBCTF = ../libctf/libctf.la @ENABLE_LIBCTF_FALSE@LIBCTF_NOBFD = @ENABLE_LIBCTF_TRUE@LIBCTF_NOBFD = ../libctf/libctf-nobfd.la +LIBCTFFRAME = ../libctfframe/libctfframe.la LIBIBERTY = ../libiberty/libiberty.a POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES) EXPECT = expect diff --git a/configure b/configure index be433ef6d5d..53a06675d4d 100755 --- a/configure +++ b/configure @@ -2784,7 +2784,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" # these libraries are used by various programs built for the host environment #f -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf libctfframe" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to diff --git a/configure.ac b/configure.ac index 1651cbf3b02..8959335e02e 100644 --- a/configure.ac +++ b/configure.ac @@ -132,7 +132,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" # these libraries are used by various programs built for the host environment #f -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf libctfframe" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to diff --git a/include/ctf-frame-api.h b/include/ctf-frame-api.h new file mode 100644 index 00000000000..59c2abadf0e --- /dev/null +++ b/include/ctf-frame-api.h @@ -0,0 +1,210 @@ +/* Public API to CTF Frame. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This file is part of libctfframe. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _CTF_FRAME_API_H +#define _CTF_FRAME_API_H + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct ctf_frame_decoder_ctx ctf_frame_decoder_ctx; +typedef struct ctf_frame_encoder_ctx ctf_frame_encoder_ctx; + +#define MAX_OFFSET_BYTES (CTF_FRAME_FRE_OFFSET_4B * 2 * 3) + +/* User interfacing CTF Frame Row Entry. + An abstraction provided by libctfframe so the consumer is decoupled from + the binary format representation of the same. */ + +typedef struct ctf_frame_row_entry +{ + uint32_t fre_start_addr; + unsigned char fre_info; + unsigned char fre_offsets[MAX_OFFSET_BYTES]; +} ctf_frame_row_entry; + +#define CTF_FRAME_ERR ((int) -1) + +/* This macro holds information about all the available ctf frame + errors. It is used to form both an enum holding all the error + constants, and also the error strings themselves. To use, define + _CTF_FRAME_FIRST and _CTF_FRAME_ITEM to expand as you like, then + mention the macro name. See the enum after this for an example. */ +#define _CTF_FRAME_ERRORS \ + _CTF_FRAME_FIRST (ECTF_FRAME_VERSION_INVAL, "CTF Frame version not supported.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_NOMEM, "Out of Memory.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_INVAL, "Corrupt CTF Frame.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_BUF_INVAL, "Corrupt CTF Frame buffer.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_DCTX_INVAL, "Corrupt CTF Frame decoder.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_ECTX_INVAL, "Corrupt CTF Frame encoder.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_FDE_INVAL, "Corrput FDE.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_FRE_INVAL, "Corrupt FRE.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_FDE_NOTFOUND,"FDE not found.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_FRE_NOTFOUND,"FRE not found.") \ + _CTF_FRAME_ITEM (ECTF_FRAME_FREOFFSET_NOPRESENT,"FRE offset not present.") + +#define ECTF_FRAME_BASE 2000 /* Base value for libctfframe errnos. */ + +enum + { +#define _CTF_FRAME_FIRST(NAME, STR) NAME = ECTF_FRAME_BASE +#define _CTF_FRAME_ITEM(NAME, STR) , NAME +_CTF_FRAME_ERRORS +#undef _CTF_FRAME_ITEM +#undef _CTF_FRAME_FIRST + }; + +/* Count of CTF errors. */ +#define ECTF_FRAME_NERR (ECTF_FRAME_NOMEM - ECTF_FRAME_BASE + 1) + +/* Get the error message string. */ + +extern const char * +ctf_frame_errmsg (int error); + +/* Get FDE function info given a FRE_TYPE. */ + +extern unsigned char +ctf_frame_fde_func_info (unsigned int fre_type, unsigned int fde_type); + +/* Gather the FRE type given the function size. */ + +extern unsigned int +ctf_frame_calc_fre_type (unsigned int func_size); + +/* The CTF Frame Decoder. */ + +/* Decode the specified CTF Frame buffer CF_BUF of size CF_SIZE and return the + new CTF Frame decoder context. Sets ERRP for the caller if any error. */ +extern ctf_frame_decoder_ctx * +ctf_frame_decode (const char *cf_buf, size_t cf_size, int *errp); + +/* Free the decoder context. */ +extern void +ctf_frame_decoder_free (ctf_frame_decoder_ctx **dctx); + +/* Get the CTF Frame's abi/arch info. */ +extern unsigned char +ctf_frame_decoder_get_abi_arch (ctf_frame_decoder_ctx *dctx); + +/* Return the number of function descriptor entries in the CTF Frame decoder + DCTX. */ +unsigned int +ctf_frame_decoder_get_num_fidx (ctf_frame_decoder_ctx *dctx); + +/* Find the function descriptor entry which contains the specified address. */ +extern ctf_frame_func_desc_entry * +ctf_frame_get_funcdesc_with_addr (ctf_frame_decoder_ctx *dctx, + int32_t addr, int *errp); + +/* Find the CTF Frame Row Entry which contains the PC. Returns + CTF_FRAME_ERR if failure. */ + +extern int +ctf_frame_find_fre (ctf_frame_decoder_ctx *ctx, int32_t pc, + ctf_frame_row_entry *frep); + +/* Get the FRE_IDX'th FRE of the function at FUNC_IDX'th function + index entry in the CTF Frame decoder CTX. Returns error code as + applicable. */ +extern int +ctf_frame_decoder_get_fre (ctf_frame_decoder_ctx *ctx, + unsigned int func_idx, + unsigned int fre_idx, + ctf_frame_row_entry *fre); + +/* Get the data (NUM_FRES, FUNC_START_ADDRESS) from the function + descriptor entry at index I'th in the decoder CTX. If failed, + return error code. */ +extern int +ctf_frame_decoder_get_funcdesc (ctf_frame_decoder_ctx *ctx, + unsigned int i, + uint32_t *num_fres, + uint32_t *func_size, + int32_t *func_start_address, + unsigned char *func_info); + + +/* Get the base reg id from the FRE info. Sets errp if fails. */ +extern unsigned int +ctf_frame_fre_get_base_reg_id (ctf_frame_row_entry *fre, int *errp); + +/* Get the CFA offset from the FRE. If the offset is invalid, sets errp. */ +extern int32_t +ctf_frame_fre_get_cfa_offset (ctf_frame_row_entry *fre, int *errp); + +/* Get the FP offset from the FRE. If the offset is invalid, sets errp. */ +extern int32_t +ctf_frame_fre_get_fp_offset (ctf_frame_row_entry *fre, int *errp); + +/* Get the RA offset from the FRE. If the offset is invalid, sets errp. */ +extern int32_t +ctf_frame_fre_get_ra_offset (ctf_frame_row_entry *fre, int *errp); + +/* The CTF Frame Encoder. */ + +/* Create an encoder context with the given CTF format version VER, FLAGS and + ABI information. Sets errp if failure. */ +extern ctf_frame_encoder_ctx * +ctf_frame_encode (unsigned char ver, unsigned char flags, int abi, int *errp); + +/* Free the encoder context. */ +extern void +ctf_free_encoder (ctf_frame_encoder_ctx *encoder); + +/* Get the abi/arch info from the CTF Frame encoder context CTX. */ +extern unsigned char +ctf_frame_encoder_get_abi_arch (ctf_frame_encoder_ctx *encoder); + +/* Return the number of function descriptor entries in the CTF Frame encoder + ENCODER. */ +extern unsigned int +ctf_frame_encoder_get_num_fidx (ctf_frame_encoder_ctx *encoder); + +/* Add an FRE to function at FUNC_IDX'th function descriptor index entry in + the encoder context. */ +extern int +ctf_frame_encoder_add_fre (ctf_frame_encoder_ctx *encoder, + unsigned int func_idx, + ctf_frame_row_entry *frep); + +/* Add a new function descriptor entry with START_ADDR, FUNC_SIZE and NUM_FRES + to the encoder. */ +extern int +ctf_frame_encoder_add_funcdesc (ctf_frame_encoder_ctx *encoder, + int32_t start_addr, + uint32_t func_size, + unsigned char func_info, + uint32_t num_fres); + +/* Serialize the contents of the encoder and return the buffer. ENCODED_SIZE + is updated to the size of the buffer. Sets ERRP if failure. */ +extern char * +ctf_frame_write_encoder (ctf_frame_encoder_ctx *encoder, + size_t *encoded_size, int *errp); + +#ifdef __cplusplus +} +#endif + +#endif /* _CTF_FRAME_API_H */ diff --git a/libctfframe/Makefile.am b/libctfframe/Makefile.am new file mode 100644 index 00000000000..07d76c75748 --- /dev/null +++ b/libctfframe/Makefile.am @@ -0,0 +1,43 @@ +## Process this file with automake to produce Makefile.in. +# +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not see +# . +# + +SUBDIRS = testsuite + +ACLOCAL_AMFLAGS = -I .. -I ../config + +AUTOMAKE_OPTIONS = foreign no-texinfo.tex + +BASEDIR = $(srcdir)/.. +INCDIR = $(srcdir)/../include +# include libctf for swap.h +AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf +AM_CFLAGS = -std=gnu99 @ac_libctfframe_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ + +if INSTALL_LIBBFD +lib_LTLIBRARIES = libctfframe.la +include_HEADERS = $(INCDIR)/ctf-frame.h $(INCDIR)/ctf-frame-api.h +else +include_HEADERS = +noinst_LTLIBRARIES = libctfframe.la +endif + +libctfframe_la_SOURCES = ctf-frame.c ctf-frame-error.c +libctfframe_la_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include \ + -I$(srcdir)/../libctf + diff --git a/libctfframe/Makefile.in b/libctfframe/Makefile.in new file mode 100644 index 00000000000..e6d3ee7ff3c --- /dev/null +++ b/libctfframe/Makefile.in @@ -0,0 +1,1048 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not see +# . +# + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/jobserver.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/warnings.m4 \ + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__include_HEADERS_DIST) \ + $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +libctfframe_la_LIBADD = +am_libctfframe_la_OBJECTS = libctfframe_la-ctf-frame.lo \ + libctfframe_la-ctf-frame-error.lo +libctfframe_la_OBJECTS = $(am_libctfframe_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +@INSTALL_LIBBFD_FALSE@am_libctfframe_la_rpath = +@INSTALL_LIBBFD_TRUE@am_libctfframe_la_rpath = -rpath $(libdir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/../depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libctfframe_la_SOURCES) +DIST_SOURCES = $(libctfframe_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__include_HEADERS_DIST = $(INCDIR)/ctf-frame.h \ + $(INCDIR)/ctf-frame-api.h +HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/../ar-lib $(top_srcdir)/../compile \ + $(top_srcdir)/../config.guess $(top_srcdir)/../config.sub \ + $(top_srcdir)/../depcomp $(top_srcdir)/../install-sh \ + $(top_srcdir)/../ltmain.sh $(top_srcdir)/../missing \ + $(top_srcdir)/../mkinstalldirs +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_PEDANTIC = @WARN_PEDANTIC@ +WERROR = @WERROR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_libctfframe_warn_cflags = @ac_libctfframe_warn_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +c_warn = @c_warn@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_noncanonical = @host_noncanonical@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +target_noncanonical = @target_noncanonical@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +warn = @warn@ +SUBDIRS = testsuite +ACLOCAL_AMFLAGS = -I .. -I ../config +AUTOMAKE_OPTIONS = foreign no-texinfo.tex +BASEDIR = $(srcdir)/.. +INCDIR = $(srcdir)/../include +# include libctf for swap.h +AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf +AM_CFLAGS = -std=gnu99 @ac_libctfframe_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ +@INSTALL_LIBBFD_TRUE@lib_LTLIBRARIES = libctfframe.la +@INSTALL_LIBBFD_FALSE@include_HEADERS = +@INSTALL_LIBBFD_TRUE@include_HEADERS = $(INCDIR)/ctf-frame.h $(INCDIR)/ctf-frame-api.h +@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libctfframe.la +libctfframe_la_SOURCES = ctf-frame.c ctf-frame-error.c +libctfframe_la_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include \ + -I$(srcdir)/../libctf + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libctfframe.la: $(libctfframe_la_OBJECTS) $(libctfframe_la_DEPENDENCIES) $(EXTRA_libctfframe_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libctfframe_la_rpath) $(libctfframe_la_OBJECTS) $(libctfframe_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libctfframe_la-ctf-frame-error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libctfframe_la-ctf-frame.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libctfframe_la-ctf-frame.lo: ctf-frame.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libctfframe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libctfframe_la-ctf-frame.lo -MD -MP -MF $(DEPDIR)/libctfframe_la-ctf-frame.Tpo -c -o libctfframe_la-ctf-frame.lo `test -f 'ctf-frame.c' || echo '$(srcdir)/'`ctf-frame.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libctfframe_la-ctf-frame.Tpo $(DEPDIR)/libctfframe_la-ctf-frame.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctf-frame.c' object='libctfframe_la-ctf-frame.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libctfframe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libctfframe_la-ctf-frame.lo `test -f 'ctf-frame.c' || echo '$(srcdir)/'`ctf-frame.c + +libctfframe_la-ctf-frame-error.lo: ctf-frame-error.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libctfframe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libctfframe_la-ctf-frame-error.lo -MD -MP -MF $(DEPDIR)/libctfframe_la-ctf-frame-error.Tpo -c -o libctfframe_la-ctf-frame-error.lo `test -f 'ctf-frame-error.c' || echo '$(srcdir)/'`ctf-frame-error.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libctfframe_la-ctf-frame-error.Tpo $(DEPDIR)/libctfframe_la-ctf-frame-error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctf-frame-error.c' object='libctfframe_la-ctf-frame-error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libctfframe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libctfframe_la-ctf-frame-error.lo `test -f 'ctf-frame-error.c' || echo '$(srcdir)/'`ctf-frame-error.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES + +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-includeHEADERS \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libctfframe/aclocal.m4 b/libctfframe/aclocal.m4 new file mode 100644 index 00000000000..3a0b3426ebc --- /dev/null +++ b/libctfframe/aclocal.m4 @@ -0,0 +1,1241 @@ +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.15.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../bfd/acinclude.m4]) +m4_include([../config/acx.m4]) +m4_include([../config/depstand.m4]) +m4_include([../config/jobserver.m4]) +m4_include([../config/lead-dot.m4]) +m4_include([../config/override.m4]) +m4_include([../config/warnings.m4]) +m4_include([../libtool.m4]) +m4_include([../ltoptions.m4]) +m4_include([../ltsugar.m4]) +m4_include([../ltversion.m4]) +m4_include([../lt~obsolete.m4]) diff --git a/libctfframe/config.h.in b/libctfframe/config.h.in new file mode 100644 index 00000000000..6712ff1cc81 --- /dev/null +++ b/libctfframe/config.h.in @@ -0,0 +1,144 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_BYTESWAP_H + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#undef HAVE_DECL_ASPRINTF + +/* Define to 1 if you have the declaration of `bswap_16', and to 0 if you + don't. */ +#undef HAVE_DECL_BSWAP_16 + +/* Define to 1 if you have the declaration of `bswap_32', and to 0 if you + don't. */ +#undef HAVE_DECL_BSWAP_32 + +/* Define to 1 if you have the declaration of `bswap_64', and to 0 if you + don't. */ +#undef HAVE_DECL_BSWAP_64 + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#undef HAVE_DECL_STPCPY + +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#undef HAVE_DECL_VASPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ENDIAN_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Version number of package */ +#undef VERSION + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE diff --git a/libctfframe/configure.ac b/libctfframe/configure.ac new file mode 100644 index 00000000000..eafe7bea96a --- /dev/null +++ b/libctfframe/configure.ac @@ -0,0 +1,78 @@ +dnl -*- Autoconf -*- +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2022 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING. If not see +dnl . +dnl + +AC_INIT([libctfframe], BFD_VERSION) +AC_CONFIG_SRCDIR(ctf-frame.c) +AC_CONFIG_MACRO_DIR(..) +AC_CONFIG_MACRO_DIR(../config) +AC_CONFIG_MACRO_DIR(../bfd) +AC_USE_SYSTEM_EXTENSIONS +AM_INIT_AUTOMAKE + +# Checks for programs. +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_RANLIB +AM_PROG_AR + +dnl Default to a non shared library. This may be overridden by the +dnl configure option --enable-shared. +AC_DISABLE_SHARED + +LT_INIT +AC_SYS_LARGEFILE + +MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing +AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) +AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) +AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) + +# Figure out what compiler warnings we can enable. +# See config/warnings.m4 for details. + +ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wno-narrowing -Wwrite-strings \ + -Wmissing-format-attribute], [warn]) +ACX_PROG_CC_WARNING_OPTS([-Wstrict-prototypes -Wmissing-prototypes \ + -Wold-style-definition], [c_warn]) +ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long]) + +# Only enable with --enable-werror-always until existing warnings are +# corrected. +ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]) + +AM_MAINTAINER_MODE +AM_INSTALL_LIBBFD +ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_libctfframe_warn_cflags]) + +AC_FUNC_MMAP +AC_CHECK_HEADERS(byteswap.h endian.h) + +dnl Check for bswap_{16,32,64} +AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64], [], [], [[#include ]]) +AC_CHECK_DECLS([asprintf, vasprintf, stpcpy]) + +AC_CONFIG_FILES(Makefile + testsuite/Makefile + testsuite/libctfframe.decode/Makefile + testsuite/libctfframe.encode/Makefile) +AC_CONFIG_HEADERS(config.h) +AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/libctfframe/ctf-frame-error.c b/libctfframe/ctf-frame-error.c new file mode 100644 index 00000000000..c0c65aa426a --- /dev/null +++ b/libctfframe/ctf-frame-error.c @@ -0,0 +1,49 @@ +/* ctf-frame-error.c - Error messages. + + Copyright (C) 2022 Free Software Foundation, Inc. + + his file is part of libctfframe. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "ctf-frame-api.h" +#include +#include + +/* In this file, we want to treat the first item of the ctf error + macro like subsequent items. */ +#define _CTF_FRAME_FIRST(NAME, VALUE) _CTF_FRAME_ITEM(NAME, VALUE) + +/* The error message strings, each in a unique structure member precisely big + enough for that error, plus a str member to access them all as a string + table. */ + +static const char *const _ctf_frame_errlist[] = { +#define _CTF_FRAME_ITEM(n, s) s, +_CTF_FRAME_ERRORS +#undef _CTF_FRAME_ITEM +}; + +const char * +ctf_frame_errmsg (int error) +{ + const char *str; + + if (error >= ECTF_FRAME_BASE && (error - ECTF_FRAME_BASE) < ECTF_FRAME_NERR) + str = _ctf_frame_errlist[error - ECTF_FRAME_BASE]; + else + str = (const char *) strerror (error); + + return (str ? str : "Unknown error"); +} diff --git a/libctfframe/ctf-frame-impl.h b/libctfframe/ctf-frame-impl.h new file mode 100644 index 00000000000..c4d7a48a679 --- /dev/null +++ b/libctfframe/ctf-frame-impl.h @@ -0,0 +1,55 @@ +/* Implementation header. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This file is part of libctfframe. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _CTF_FRAME_IMPL_H +#define _CTF_FRAME_IMPL_H + +#include "ctf-frame-api.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#define ctf_frame_assert(expr) (assert (expr)) + +struct ctf_frame_decoder_ctx +{ + ctf_frame_header cfd_header; /* CTF Frame header. */ + uint32_t *cfd_funcdesc; /* CTF function desc entries table. */ + void *cfd_fres; /* CTF FRE table. */ + int cfd_fre_nbytes; /* CTF fres number of bytes. */ +}; + +struct ctf_frame_encoder_ctx +{ + ctf_frame_header cfe_header; /* CTF Frame header. */ + uint32_t *cfe_funcdesc; /* CTF function desc entries table. */ + ctf_frame_row_entry *cfe_fres; /* CTF FRE table. */ + uint32_t cfe_fre_nbytes; /* CTF fres size in bytes. */ + char *cfe_data; /* CTF data buffer. */ + size_t cfe_data_size; /* CTF data buffer. */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _CTF_FRAME_IMPL_H */ diff --git a/libctfframe/ctf-frame.c b/libctfframe/ctf-frame.c new file mode 100644 index 00000000000..fa90547269a --- /dev/null +++ b/libctfframe/ctf-frame.c @@ -0,0 +1,1569 @@ +/* ctf-frame.c - CTF Frame decoder/encoder. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This file is part of libctfframe. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "config.h" +#include +#include +#include +#include +#include +#include "ctf-frame-impl.h" +#include "swap.h" + +typedef struct cf_funidx_tbl +{ + unsigned int count; + unsigned int alloced; + ctf_frame_func_desc_entry entry[1]; +} cf_funidx_tbl; + +typedef struct cf_fre_tbl +{ + unsigned int count; + unsigned int alloced; + ctf_frame_row_entry entry[1]; +} cf_fre_tbl; + +#define _cf_printflike_(string_index,first_to_check) \ + __attribute__ ((__format__ (__printf__, (string_index), (first_to_check)))) + +static void debug_printf (const char *, ...); + +static int _ctf_frame_debug; /* Control for printing out debug info. */ +static int number_of_entries = 64; + +static void +ctf_frame_init_debug (void) +{ + static int inited; + + if (!inited) + { + _ctf_frame_debug = getenv ("CTF_FRAME_DEBUG") != NULL; + inited = 1; + } +} + +_cf_printflike_ (1, 2) +static void debug_printf (const char *format, ...) +{ + if (_ctf_frame_debug) + { + va_list args; + + va_start (args, format); + vfprintf (stderr, format, args); + va_end (args); + } +} + +/* Generate bitmask of given size in bytes. This is used for + some checks on the FRE start address. + CTF_FRAME_ROW_ENTRY_TYPE_ADDR1 => 1 byte => [ bitmask = 0xff ] + CTF_FRAME_ROW_ENTRY_TYPE_ADDR2 => 2 byte => [ bitmask = 0xffff ] + CTF_FRAME_ROW_ENTRY_TYPE_ADDR4 => 4 byte => [ bitmask = 0xffffffff ]. */ +#define CTF_BITMASK_OF_SIZE(size_in_bytes) \ + (((uint64_t)1 << (size_in_bytes*8)) - 1) + +/* Store the specified error code into errp if it is non-NULL. + Return CTF_FRAME_ERR. */ + +static int +ctf_frame_set_errno (int *errp, int error) +{ + if (errp != NULL) + *errp = error; + return CTF_FRAME_ERR; +} + +/* Store the specified error code into errp if it is non-NULL. + Return NULL. */ + +static void * +ctf_frame_ret_set_errno (int *errp, int error) +{ + if (errp != NULL) + *errp = error; + return NULL; +} + +/* Access functions for frame row entry data. */ + +static unsigned int +ctf_frame_fre_get_offset_count (unsigned char fre_info) +{ + return CTF_FRAME_V1_FRE_OFFSET_COUNT (fre_info); +} + +static unsigned int +ctf_frame_fre_get_offset_size (unsigned char fre_info) +{ + return CTF_FRAME_V1_FRE_OFFSET_SIZE (fre_info); +} + +/* Access functions for info from function descriptor entry. */ + +static unsigned int +ctf_frame_get_fre_type (ctf_frame_func_desc_entry *fdep) +{ + unsigned int fre_type = 0; + if (fdep) + fre_type = CTF_FRAME_V1_FUNC_FRE_TYPE (fdep->ctf_func_info); + return fre_type; +} + +static unsigned int +ctf_frame_get_fde_type (ctf_frame_func_desc_entry *fdep) +{ + unsigned int fde_type = 0; + if (fdep) + fde_type = CTF_FRAME_V1_FUNC_FDE_TYPE (fdep->ctf_func_info); + return fde_type; +} + +/* Check if flipping is needed, based on ENDIAN. */ + +static int +need_swapping (int endian) +{ + unsigned int ui = 1; + char *c = (char *)&ui; + int is_little = (int)*c; + + switch (endian) + { + case CTF_FRAME_ABI_AARCH64_ENDIAN_LITTLE: + case CTF_FRAME_ABI_AMD64_ENDIAN_LITTLE: + return !is_little; + case CTF_FRAME_ABI_AARCH64_ENDIAN_BIG: + return is_little; + default: + break; + } + + return 0; +} + +/* Flip the endianness of the CTF header. */ + +static void +flip_header (ctf_frame_header *cfh) +{ + swap_thing (cfh->cth_frame_preamble.ctfp_magic); + swap_thing (cfh->cth_frame_preamble.ctfp_version); + swap_thing (cfh->cth_frame_preamble.ctfp_flags); + swap_thing (cfh->cth_cfa_fixed_fp_offset); + swap_thing (cfh->cth_cfa_fixed_ra_offset); + swap_thing (cfh->cth_num_fdes); + swap_thing (cfh->cth_num_fres); + swap_thing (cfh->cth_fre_len); + swap_thing (cfh->cth_fdeoff); + swap_thing (cfh->cth_freoff); +} + +static void +flip_fde (ctf_frame_func_desc_entry *fdep) +{ + swap_thing (fdep->ctf_func_start_address); + swap_thing (fdep->ctf_func_size); + swap_thing (fdep->ctf_func_start_fre_off); + swap_thing (fdep->ctf_func_num_fres); +} + +/* Check if CTF Frame header has valid data. */ + +static int +ctf_frame_header_sanity_check_p (ctf_frame_header *hp) +{ + unsigned char all_flags = CTF_FRAME_F_FDE_SORTED | CTF_FRAME_F_FRAME_POINTER; + /* Check preamble is valid. */ + if ((hp->cth_frame_preamble.ctfp_magic != CTF_FRAME_MAGIC) + || (hp->cth_frame_preamble.ctfp_version != CTF_FRAME_VERSION) + || ((hp->cth_frame_preamble.ctfp_flags | all_flags) + != all_flags)) + return 0; + + /* Check offsets are valid. */ + if (hp->cth_fdeoff > hp->cth_freoff) + return 0; + + return 1; +} + +/* Flip the start address pointed to by FP. */ + +static void +flip_fre_start_address (char *fp, unsigned int fre_type) +{ + void *start = (void*)fp; + if (fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR2) + { + unsigned short *start_addr = (unsigned short *)(start); + swap_thing (*start_addr); + } + else if (fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR4) + { + uint32_t *start_addr = (uint32_t *)(start); + swap_thing (*start_addr); + } +} + +static void +flip_fre_stack_offsets (char *fp, unsigned char offset_size, + unsigned char offset_cnt) +{ + int j; + void *offsets = (void *)fp; + + if (offset_size == CTF_FRAME_FRE_OFFSET_2B) + { + unsigned short *ust = (unsigned short *)offsets; + for (j = offset_cnt; j > 0; ust++, j--) + swap_thing (*ust); + } + else if (offset_size == CTF_FRAME_FRE_OFFSET_4B) + { + uint32_t *uit = (uint32_t *)offsets; + for (j = offset_cnt; j > 0; uit++, j--) + swap_thing (*uit); + } +} + +/* Get the FRE start address size, given the FRE_TYPE. */ + +static size_t +ctf_fre_start_addr_size (unsigned int fre_type) +{ + size_t addr_size = 0; + switch (fre_type) + { + case CTF_FRAME_ROW_ENTRY_TYPE_ADDR1: + addr_size = 1; + break; + case CTF_FRAME_ROW_ENTRY_TYPE_ADDR2: + addr_size = 2; + break; + case CTF_FRAME_ROW_ENTRY_TYPE_ADDR4: + addr_size = 4; + break; + default: + /* No other value is expected. */ + ctf_frame_assert (0); + break; + } + return addr_size; +} + +/* Check if the FREP has valid data. */ + +static int +ctf_fre_sanity_check_p (ctf_frame_row_entry *frep) +{ + unsigned int offset_size, offset_cnt; + unsigned int fre_info; + + if (frep == NULL) + return 0; + + fre_info = frep->fre_info; + offset_size = ctf_frame_fre_get_offset_size (fre_info); + + if (offset_size != CTF_FRAME_FRE_OFFSET_1B + && offset_size != CTF_FRAME_FRE_OFFSET_2B + && offset_size != CTF_FRAME_FRE_OFFSET_4B) + return 0; + + offset_cnt = ctf_frame_fre_get_offset_count (fre_info); + if (offset_cnt > 3) + return 0; + + return 1; +} + +/* Get FRE_INFO's offset size in bytes. */ + +static size_t +ctf_fre_offset_bytes_size (unsigned char fre_info) +{ + unsigned int offset_size, offset_cnt; + + offset_size = ctf_frame_fre_get_offset_size (fre_info); + + debug_printf ("offset_size = %u\n", offset_size); + + offset_cnt = ctf_frame_fre_get_offset_count (fre_info); + + if (offset_size == CTF_FRAME_FRE_OFFSET_2B + || offset_size == CTF_FRAME_FRE_OFFSET_4B) /* 2 or 4 bytes. */ + return (offset_cnt * (offset_size * 2)); + + return (offset_cnt); +} + +/* Get total size in bytes to represent FREP in the binary format. This + includes the starting address, FRE info, and all the offsets. */ + +static size_t +ctf_fre_entry_size (ctf_frame_row_entry *frep, unsigned int fre_type) +{ + if (frep == NULL) + return 0; + + unsigned char fre_info = frep->fre_info; + size_t addr_size = ctf_fre_start_addr_size (fre_type); + + return (addr_size + sizeof (frep->fre_info) + + ctf_fre_offset_bytes_size (fre_info)); +} + +static int +flip_fre (char *fp, unsigned int fre_type, size_t *fre_size) +{ + unsigned char fre_info; + unsigned int offset_size, offset_cnt; + size_t addr_size, fre_info_size = 0; + int err = 0; + + if (fre_size == NULL) + return ctf_frame_set_errno (&err, EINVAL); + + flip_fre_start_address (fp, fre_type); + + /* Advance the buffer pointer to where the FRE info is. */ + addr_size = ctf_fre_start_addr_size (fre_type); + fp += addr_size; + + /* FRE info is unsigned char. No need to flip. */ + fre_info = *(unsigned char*)fp; + offset_size = ctf_frame_fre_get_offset_size (fre_info); + offset_cnt = ctf_frame_fre_get_offset_count (fre_info); + + /* Advance the buffer pointer to where the stack offsets are. */ + fre_info_size = sizeof (unsigned char); + fp += fre_info_size; + flip_fre_stack_offsets (fp, offset_size, offset_cnt); + + *fre_size + = addr_size + fre_info_size + ctf_fre_offset_bytes_size (fre_info); + + return 0; +} + +/* Endian flip the contents of FRAME_BUF of size BUF_SIZE. + The CTF Frame header in the FRAME_BUF must be endian flipped prior to + calling flip_ctf_frame. If an error code is returned, the buffer should + not be used. */ + +static int +flip_ctf_frame (char *frame_buf, size_t buf_size) +{ + unsigned int i, j, prev_frep_index; + ctf_frame_header *ihp; + char *fdes; + char *fp = NULL; + ctf_frame_func_desc_entry *fdep; + unsigned int num_fdes, num_fres; + unsigned int fre_type; + size_t esz; + int err = 0; + + /* Header must have been flipped by now. */ + ihp = (ctf_frame_header *)frame_buf; + + if (!ctf_frame_header_sanity_check_p (ihp)) + return ctf_frame_set_errno (&err, ECTF_FRAME_BUF_INVAL); + + /* The contents of the CTF Frame header are safe to read. Get the number of + FDEs and the first FDE in the buffer. */ + num_fdes = ihp->cth_num_fdes; + fdes = frame_buf + sizeof (ctf_frame_header) + ihp->cth_fdeoff; + fdep = (ctf_frame_func_desc_entry *)fdes; + + j = 0; + prev_frep_index = 0; + for (i = 0; i < num_fdes; fdep++, i++) + { + flip_fde (fdep); + + num_fres = fdep->ctf_func_num_fres; + fre_type = ctf_frame_get_fre_type (fdep); + + fp = frame_buf + sizeof (ctf_frame_header) + ihp->cth_freoff; + fp += fdep->ctf_func_start_fre_off; + for (; j < prev_frep_index + num_fres; j++) + { + if (flip_fre (fp, fre_type, &esz)) + goto bad; + + if (esz == 0) + goto bad; + fp += esz; + } + prev_frep_index = j; + } + /* All FREs must have been endian flipped by now. */ + if (j != ihp->cth_num_fres) + goto bad; + /* All contents must have been processed by now. */ + if ((frame_buf + buf_size) != (void*)fp) + goto bad; + + /* Success. */ + return 0; +bad: + return CTF_FRAME_ERR; +} + +/* The CTF Frame Decoder. */ + +/* Compare function for qsort'ing the FDE table. */ + +static int +fde_func (const void *p1, const void *p2) +{ + const ctf_frame_func_desc_entry *aa = p1; + const ctf_frame_func_desc_entry *bb = p2; + + if (aa->ctf_func_start_address < bb->ctf_func_start_address) + return -1; + else if (aa->ctf_func_start_address > bb->ctf_func_start_address) + return 1; + return 0; +} + +/* Get IDX'th offset from FRE. Set errp as applicable. */ + +static int32_t +ctf_frame_get_fre_offset (ctf_frame_row_entry *fre, int idx, int *errp) +{ + int offset_cnt, offset_size; + + if (fre == NULL || !ctf_fre_sanity_check_p (fre)) + return ctf_frame_set_errno (errp, ECTF_FRAME_FRE_INVAL); + + offset_cnt = ctf_frame_fre_get_offset_count (fre->fre_info); + offset_size = ctf_frame_fre_get_offset_size (fre->fre_info); + + if (offset_cnt < idx + 1) + return ctf_frame_set_errno (errp, ECTF_FRAME_FREOFFSET_NOPRESENT); + + if (errp) + *errp = 0; /* Offset Valid. */ + + if (offset_size == CTF_FRAME_FRE_OFFSET_1B) + { + int8_t *sp = (int8_t *)fre->fre_offsets; + return sp[idx]; + } + else if (offset_size == CTF_FRAME_FRE_OFFSET_2B) + { + int16_t *sp = (int16_t *)fre->fre_offsets; + return sp[idx]; + } + else + { + int32_t *ip = (int32_t *)fre->fre_offsets; + return ip[idx]; + } +} + +/* Free the decoder context. */ + +void +ctf_frame_decoder_free (ctf_frame_decoder_ctx **decoder) +{ + if (decoder != NULL) + { + ctf_frame_decoder_ctx *dctx = *decoder; + if (dctx == NULL) + return; + + if (dctx->cfd_funcdesc != NULL) + { + free (dctx->cfd_funcdesc); + dctx->cfd_funcdesc = NULL; + } + if (dctx->cfd_fres != NULL) + { + free (dctx->cfd_fres); + dctx->cfd_fres = NULL; + } + + free (*decoder); + *decoder = NULL; + } +} + +/* Get FDE function info given a FRE_TYPE. */ +/* FIXME API for linker. Revisit if its better placed somewhere else? */ + +unsigned char +ctf_frame_fde_func_info (unsigned int fre_type, + unsigned int fde_type) +{ + unsigned char func_info; + ctf_frame_assert (fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR1 + || fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR2 + || fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR4); + ctf_frame_assert (fde_type == CTF_FRAME_FUNC_DESC_ENTRY_TYPE_PCINC + || fde_type == CTF_FRAME_FUNC_DESC_ENTRY_TYPE_PCMASK); + func_info = CTF_FRAME_V1_FUNC_INFO (fde_type, fre_type); + return func_info; +} + +/* Gather the FRE type given the function size. */ +/* FIXME API for linker. Revisit if its better placed somewhere else? */ + +unsigned int +ctf_frame_calc_fre_type (unsigned int func_size) +{ + unsigned int fre_type = 0; + if (func_size <= 0xff) + fre_type = CTF_FRAME_ROW_ENTRY_TYPE_ADDR1; + else if (func_size <= 0xffff) + fre_type = CTF_FRAME_ROW_ENTRY_TYPE_ADDR2; + else if (func_size <= 0xffffffff) + fre_type = CTF_FRAME_ROW_ENTRY_TYPE_ADDR4; + return fre_type; +} + +/* Get the base reg id from the FRE info. Set errp if failure. */ + +unsigned int +ctf_frame_fre_get_base_reg_id (ctf_frame_row_entry *fre, int *errp) +{ + if (fre == NULL) + return ctf_frame_set_errno (errp, ECTF_FRAME_FRE_INVAL); + + unsigned int fre_info = fre->fre_info; + return CTF_FRAME_V1_FRE_CFA_BASE_REG_ID (fre_info); +} + +/* Get the CFA offset from the FRE. If the offset is invalid, sets errp. */ + +int32_t +ctf_frame_fre_get_cfa_offset (ctf_frame_row_entry *fre, int *errp) +{ + return ctf_frame_get_fre_offset (fre, CTF_FRAME_FRE_CFA_OFFSET_IDX, errp); +} + +/* Get the FP offset from the FRE. If the offset is invalid, sets errp. */ + +int32_t +ctf_frame_fre_get_fp_offset (ctf_frame_row_entry *fre, int *errp) +{ + return ctf_frame_get_fre_offset (fre, CTF_FRAME_FRE_FP_OFFSET_IDX, errp); +} + +/* Get the RA offset from the FRE. If the offset is invalid, sets errp. */ + +int32_t +ctf_frame_fre_get_ra_offset (ctf_frame_row_entry *fre, int *errp) +{ + return ctf_frame_get_fre_offset (fre, CTF_FRAME_FRE_RA_OFFSET_IDX, errp); +} + +static int +ctf_frame_row_entry_copy (ctf_frame_row_entry *dst, ctf_frame_row_entry *src) +{ + int err = 0; + + if (dst == NULL || src == NULL) + return ctf_frame_set_errno (&err, EINVAL); + + memcpy (dst, src, sizeof (ctf_frame_row_entry)); + return 0; +} + +static int +ctf_frame_decode_fre_start_address (const char *fre_buf, + uint32_t *fre_start_addr, + unsigned int fre_type) +{ + uint32_t saddr = 0; + int err = 0; + + if (fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR1) + { + uint8_t *uc = (uint8_t *)fre_buf; + saddr = (uint32_t)*uc; + } + else if (fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR2) + { + uint16_t *ust = (uint16_t *)fre_buf; + saddr = (uint32_t)*ust; + } + else if (fre_type == CTF_FRAME_ROW_ENTRY_TYPE_ADDR4) + { + uint32_t *uit = (uint32_t *)fre_buf; + saddr = (uint32_t)*uit; + } + else + return ctf_frame_set_errno (&err, EINVAL); + + *fre_start_addr = saddr; + return 0; +} + +/* Decode a frame row entry FRE which starts at location FRE_BUF. The function + updates ESZ to the size of the FRE as stored in the binary format. + + This function works closely with the CTF Frame binary format. + + Returns CTF_FRAME_ERR if failure. */ + +static int +ctf_frame_decode_fre (const char *fre_buf, ctf_frame_row_entry *fre, + unsigned int fre_type, + size_t *esz) +{ + int err = 0; + void *stack_offsets = NULL; + size_t stack_offsets_sz; + size_t addr_size; + size_t fre_size; + + if (fre_buf == NULL || fre == NULL || esz == NULL) + return ctf_frame_set_errno (&err, EINVAL); + + /* Copy over the FRE start address. */ + ctf_frame_decode_fre_start_address (fre_buf, &fre->fre_start_addr, fre_type); + + addr_size = ctf_fre_start_addr_size (fre_type); + fre->fre_info = *(unsigned char *)(fre_buf + addr_size); + /* Sanity check as the API works closely with the binary format. */ + ctf_frame_assert (sizeof (fre->fre_info) == sizeof (unsigned char)); + + /* Cleanup the space for fre_offsets first, then copy over the valid + bytes. */ + memset (fre->fre_offsets, 0, MAX_OFFSET_BYTES); + /* Get offsets size. */ + stack_offsets_sz = ctf_fre_offset_bytes_size (fre->fre_info); + stack_offsets = (unsigned char *)fre_buf + addr_size + sizeof (fre->fre_info); + memcpy (fre->fre_offsets, stack_offsets, stack_offsets_sz); + + /* The FRE has been decoded. Use it to perform one last sanity check. */ + fre_size = ctf_fre_entry_size (fre, fre_type); + ctf_frame_assert (fre_size == (addr_size + sizeof (fre->fre_info) + + stack_offsets_sz)); + *esz = fre_size; + + return 0; +} + +/* Decode the specified CTF Frame buffer CF_BUF of size CF_SIZE and return the + new CTF Frame decoder context. + + Sets ERRP for the caller if any error. Frees up the allocated memory in + case of error. */ + +ctf_frame_decoder_ctx * +ctf_frame_decode (const char *cf_buf, size_t cf_size, int *errp) +{ + const ctf_frame_preamble *cfpp; + size_t hdrsz = sizeof (ctf_frame_header); + ctf_frame_header *cfhp; + ctf_frame_decoder_ctx *dctx; + char *frame_buf; + char *tempbuf = NULL; + + int fidx_size; + uint32_t fre_bytes; + int foreign_endian = 0; + + ctf_frame_init_debug (); + + if ((cf_buf == NULL) || (!cf_size)) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_INVAL); + else if (cf_size < hdrsz) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_BUF_INVAL); + + cfpp = (const ctf_frame_preamble *) cf_buf; + + debug_printf ("ctf_frame_decode: magic=0x%x version=%u flags=%u\n", + cfpp->ctfp_magic, cfpp->ctfp_version, cfpp->ctfp_flags); + + /* Check for foreign endianness. */ + if (cfpp->ctfp_magic != CTF_FRAME_MAGIC) + { + if (cfpp->ctfp_magic == bswap_16 (CTF_FRAME_MAGIC)) + foreign_endian = 1; + else + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_BUF_INVAL); + } + + /* Initialize a new decoder context. */ + if ((dctx = malloc (sizeof (ctf_frame_decoder_ctx))) == NULL) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + memset (dctx, 0, sizeof (ctf_frame_decoder_ctx)); + + if (foreign_endian) + { + /* Allocate a new buffer and initialize it. */ + tempbuf = (char *) malloc (cf_size * sizeof (char)); + if (tempbuf == NULL) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + memcpy (tempbuf, cf_buf, cf_size); + + /* Flip the header. */ + ctf_frame_header *ihp = (ctf_frame_header *) tempbuf; + flip_header (ihp); + /* Flip the rest of the CTF Frame section data buffer. */ + if (flip_ctf_frame (tempbuf, cf_size)) + { + free (tempbuf); + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_BUF_INVAL); + } + frame_buf = tempbuf; + } + else + frame_buf = (char *)cf_buf; + + /* Handle the CTF header. */ + dctx->cfd_header = *(ctf_frame_header *) frame_buf; + /* Validate the contents of CTF header. */ + cfhp = &dctx->cfd_header; + if (!ctf_frame_header_sanity_check_p (cfhp)) + { + ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + goto decode_fail_free; + } + frame_buf += hdrsz; + + /* Handle the CTF Function Descriptor Entry section. */ + fidx_size + = cfhp->cth_num_fdes * sizeof (ctf_frame_func_desc_entry); + dctx->cfd_funcdesc = malloc (fidx_size); + if (dctx->cfd_funcdesc == NULL) + { + ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + goto decode_fail_free; + } + memcpy (dctx->cfd_funcdesc, frame_buf, fidx_size); + + debug_printf ("%u total fidx size\n", fidx_size); + + frame_buf += (fidx_size); + + /* Handle the CTF Frame Row Entry section. */ + dctx->cfd_fres = malloc (cfhp->cth_fre_len); + if (dctx->cfd_fres == NULL) + { + ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + goto decode_fail_free; + } + memcpy (dctx->cfd_fres, frame_buf, cfhp->cth_fre_len); + + fre_bytes = cfhp->cth_fre_len; + dctx->cfd_fre_nbytes = fre_bytes; + + debug_printf ("%u total fre bytes\n", fre_bytes); + + return dctx; + +decode_fail_free: + if (foreign_endian && tempbuf != NULL) + free (tempbuf); + ctf_frame_decoder_free (&dctx); + dctx = NULL; + return dctx; +} + +/* Get DECODER's CTF Frame header. */ + +static ctf_frame_header * +ctf_frame_decoder_get_header (ctf_frame_decoder_ctx *decoder) +{ + ctf_frame_header *hp = NULL; + if (decoder != NULL) + hp = &decoder->cfd_header; + return hp; +} + +/* Get the CTF Frame's abi/arch info. */ + +unsigned char +ctf_frame_decoder_get_abi_arch (ctf_frame_decoder_ctx *ctx) +{ + ctf_frame_header *ctff_header; + ctff_header = ctf_frame_decoder_get_header (ctx); + return ctff_header->cth_frame_abi_arch; +} + +/* Find the function descriptor entry starting which contains the specified + address ADDR. */ + +ctf_frame_func_desc_entry * +ctf_frame_get_funcdesc_with_addr (ctf_frame_decoder_ctx *ctx, + int32_t addr, int *errp) +{ + ctf_frame_header *dhp; + ctf_frame_func_desc_entry *fdp; + int low, high, cnt; + + if (ctx == NULL) + return ctf_frame_ret_set_errno (errp, EINVAL); + + dhp = ctf_frame_decoder_get_header (ctx); + + if (dhp == NULL || dhp->cth_num_fdes == 0 || ctx->cfd_funcdesc == NULL) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_DCTX_INVAL); + /* If the FDE sub-section is not sorted on PCs, it is OK to do it now. + This allows the usage of binary search later below. */ + if ((dhp->cth_frame_preamble.ctfp_flags & CTF_FRAME_F_FDE_SORTED) == 0) + { + /* Sort the FDE table. */ + qsort (ctx->cfd_funcdesc, dhp->cth_num_fdes, + sizeof (ctf_frame_func_desc_entry), fde_func); + dhp->cth_frame_preamble.ctfp_flags |= CTF_FRAME_F_FDE_SORTED; + } + + /* Do the binary search. */ + fdp = (ctf_frame_func_desc_entry *) ctx->cfd_funcdesc; + low = 0; + high = dhp->cth_num_fdes; + cnt = high; + while (low <= high) + { + int mid = low + (high - low) / 2; + + if (fdp[mid].ctf_func_start_address == addr) + return fdp + mid; + + if (fdp[mid].ctf_func_start_address < addr) + { + if (mid == (cnt - 1)) /* Check if it's the last one. */ + return fdp + (cnt - 1) ; + else if (fdp[mid+1].ctf_func_start_address > addr) + return fdp + mid; + low = mid + 1; + } + else + high = mid - 1; + } + + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_FDE_NOTFOUND); +} + +/* Find the CTF Frame Row Entry which contains the PC. Returns + CTF_FRAME_ERR if failure. */ + +int +ctf_frame_find_fre (ctf_frame_decoder_ctx *ctx, int32_t pc, + ctf_frame_row_entry *frep) +{ + ctf_frame_func_desc_entry *fdep; + uint32_t start_address, i; + ctf_frame_row_entry cur_fre, next_fre; + unsigned char *sp; + unsigned int fre_type, fde_type; + size_t esz; + int err = 0; + size_t size = 0; + /* For regular FDEs (i.e. fde_type CTF_FRAME_FUNC_DESC_ENTRY_TYPE_PCMASK), + where the start address in the FRE is an offset from start pc, + use a bitmask with all bits set so that none of the address bits are + ignored. In this case, we need to return the FRE where + (PC >= FRE_START_ADDR) */ + uint64_t bitmask = 0xffffffff; + + if ((ctx == NULL) || (frep == NULL)) + return ctf_frame_set_errno (&err, EINVAL); + + /* Find the FDE which contains the PC, then scan its fre entries. */ + fdep = ctf_frame_get_funcdesc_with_addr (ctx, pc, &err); + if (fdep == NULL || ctx->cfd_fres == NULL) + return ctf_frame_set_errno (&err, ECTF_FRAME_DCTX_INVAL); + + fre_type = ctf_frame_get_fre_type (fdep); + fde_type = ctf_frame_get_fde_type (fdep); + + /* For FDEs for repetitive pattern of insns, we need to return the FRE + such that (PC & FRE_START_ADDR_AS_MASK >= FRE_START_ADDR_AS_MASK). + so, update the bitmask to the start address. */ + if (fde_type == CTF_FRAME_FUNC_DESC_ENTRY_TYPE_PCMASK) + bitmask = start_address; + + sp = (unsigned char *) ctx->cfd_fres + fdep->ctf_func_start_fre_off; + for (i = 0; i < fdep->ctf_func_num_fres; i++) + { + err = ctf_frame_decode_fre ((const char *)sp, &next_fre, + fre_type, &esz); + start_address = next_fre.fre_start_addr; + + if (((fdep->ctf_func_start_address + + (int32_t) start_address) & bitmask) <= (pc & bitmask)) + { + ctf_frame_row_entry_copy (&cur_fre, &next_fre); + + /* Get the next FRE in sequence. */ + if (i < fdep->ctf_func_num_fres - 1) + { + sp += esz; + err = ctf_frame_decode_fre ((const char*)sp, &next_fre, + fre_type, &esz); + + /* Sanity check the next FRE. */ + if (!ctf_fre_sanity_check_p (&next_fre)) + return ctf_frame_set_errno (&err, ECTF_FRAME_FRE_INVAL); + + size = next_fre.fre_start_addr; + } + else size = fdep->ctf_func_size; + + /* If the cur FRE is the one that contains the PC, return it. */ + if (((fdep->ctf_func_start_address + + (int32_t)size) & bitmask) > (pc & bitmask)) + { + ctf_frame_row_entry_copy (frep, &cur_fre); + return 0; + } + } + else + return ctf_frame_set_errno (&err, ECTF_FRAME_FRE_INVAL); + } + return ctf_frame_set_errno (&err, ECTF_FRAME_FDE_INVAL); +} + +/* Return the number of function descriptor entries in the CTF Frame decoder + DCTX. */ + +unsigned int +ctf_frame_decoder_get_num_fidx (ctf_frame_decoder_ctx *ctx) +{ + unsigned int num_fdes = 0; + ctf_frame_header *dhp = NULL; + dhp = ctf_frame_decoder_get_header (ctx); + if (dhp) + num_fdes = dhp->cth_num_fdes; + return num_fdes; +} + +/* Get the data (NUM_FRES, FUNC_START_ADDRESS) from the function + descriptor entry at index I'th in the decoder CTX. If failed, + return error code. */ +/* FIXME - consolidate the args and return a + ctf_frame_func_desc_index_elem rather? */ + +int +ctf_frame_decoder_get_funcdesc (ctf_frame_decoder_ctx *ctx, + unsigned int i, + uint32_t *num_fres, + uint32_t *func_size, + int32_t *func_start_address, + unsigned char *func_info) +{ + ctf_frame_func_desc_entry *fdp; + unsigned int num_fdes; + int err = 0; + + if (ctx == NULL || func_start_address == NULL || num_fres == NULL + || func_size == NULL) + return ctf_frame_set_errno (&err, EINVAL); + + num_fdes = ctf_frame_decoder_get_num_fidx (ctx); + if (num_fdes == 0 + || i >= num_fdes + || ctx->cfd_funcdesc == NULL) + return ctf_frame_set_errno (&err, ECTF_FRAME_DCTX_INVAL); + + fdp = (ctf_frame_func_desc_entry *) ctx->cfd_funcdesc + i; + *num_fres = fdp->ctf_func_num_fres; + *func_start_address = fdp->ctf_func_start_address; + *func_size = fdp->ctf_func_size; + *func_info = fdp->ctf_func_info; + + return 0; +} + +/* Get the function descriptor entry at index FUNC_IDX in the decoder + context CTX. */ + +static ctf_frame_func_desc_entry * +ctf_frame_decoder_get_funcdesc_at_index (ctf_frame_decoder_ctx *ctx, + uint32_t func_idx) +{ + /* Invalid argument. No FDE will be found. */ + if (func_idx >= ctf_frame_decoder_get_num_fidx (ctx)) + return NULL; + + ctf_frame_func_desc_entry *fdep; + fdep = (ctf_frame_func_desc_entry *) ctx->cfd_funcdesc; + return fdep + func_idx; +} + +/* Get the FRE_IDX'th FRE of the function at FUNC_IDX'th function + descriptor entry in the CTF Frame decoder CTX. Returns error code as + applicable. */ + +int +ctf_frame_decoder_get_fre (ctf_frame_decoder_ctx *ctx, + unsigned int func_idx, + unsigned int fre_idx, + ctf_frame_row_entry *fre) +{ + ctf_frame_func_desc_entry *fdep; + ctf_frame_row_entry ifre; + unsigned char *sp; + uint32_t i; + unsigned int fre_type; + size_t esz = 0; + int err = 0; + + if (ctx == NULL || fre == NULL) + return ctf_frame_set_errno (&err, EINVAL); + + /* Get function descriptor entry at index func_idx. */ + fdep = ctf_frame_decoder_get_funcdesc_at_index (ctx, func_idx); + + if (fdep == NULL) + return ctf_frame_set_errno (&err, ECTF_FRAME_FDE_NOTFOUND); + + fre_type = ctf_frame_get_fre_type (fdep); + /* Now scan the FRE entries. */ + sp = (unsigned char *) ctx->cfd_fres + fdep->ctf_func_start_fre_off; + for (i = 0; i < fdep->ctf_func_num_fres; i++) + { + /* Decode the FRE at the current position. Return it if valid. */ + err = ctf_frame_decode_fre ((const char *)sp, &ifre, fre_type, &esz); + if (i == fre_idx) + { + if (!ctf_fre_sanity_check_p (&ifre)) + return ctf_frame_set_errno (&err, ECTF_FRAME_FRE_INVAL); + + ctf_frame_row_entry_copy (fre, &ifre); + + if (fdep->ctf_func_size) + ctf_frame_assert (fre->fre_start_addr < fdep->ctf_func_size); + else + /* A CTF FDE with func size equal to zero is possible. */ + ctf_frame_assert (fre->fre_start_addr == fdep->ctf_func_size); + + return 0; + } + /* Next FRE. */ + sp += esz; + } + + return ctf_frame_set_errno (&err, ECTF_FRAME_FDE_NOTFOUND); +} + + +/* CTF Frame Encoder. */ + +/* Get a reference to the ENCODER's CTF Frame header. */ + +static ctf_frame_header * +ctf_frame_encoder_get_header (ctf_frame_encoder_ctx *encoder) +{ + ctf_frame_header *hp = NULL; + if (encoder) + hp = &encoder->cfe_header; + return hp; +} + +static ctf_frame_func_desc_entry * +ctf_frame_encoder_get_funcdesc_at_index (ctf_frame_encoder_ctx *encoder, + uint32_t func_idx) +{ + ctf_frame_func_desc_entry *fde = NULL; + if (func_idx < ctf_frame_encoder_get_num_fidx (encoder)) + { + cf_funidx_tbl *func_tbl = (cf_funidx_tbl *) encoder->cfe_funcdesc; + fde = func_tbl->entry + func_idx; + } + return fde; +} + +/* Create an encoder context with the given CTF format version VER, FLAGS and + ABI information. Sets errp if failure. */ + +ctf_frame_encoder_ctx * +ctf_frame_encode (unsigned char ver, unsigned char flags, int abi_arch, + int *errp) +{ + ctf_frame_header *hp; + ctf_frame_encoder_ctx *fp; + + if (ver != CTF_FRAME_VERSION) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_VERSION_INVAL); + + if ((fp = malloc (sizeof (ctf_frame_encoder_ctx))) == NULL) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + + memset (fp, 0, sizeof (ctf_frame_encoder_ctx)); + + /* Get the CTF header and update it. */ + hp = ctf_frame_encoder_get_header (fp); + hp->cth_frame_preamble.ctfp_version = ver; + hp->cth_frame_preamble.ctfp_magic = CTF_FRAME_MAGIC; + hp->cth_frame_preamble.ctfp_flags = flags; + hp->cth_frame_abi_arch = abi_arch; + + return fp; +} + +/* Free the encoder context. */ + +void +ctf_free_encoder (ctf_frame_encoder_ctx *encoder) +{ + if (encoder != NULL) + { + free (encoder->cfe_funcdesc); + free (encoder->cfe_fres); + free (encoder->cfe_data); + free (encoder); + } +} + +/* Get the abi/arch info from the CTF Frame encoder context ENCODER. */ + +unsigned char +ctf_frame_encoder_get_abi_arch (ctf_frame_encoder_ctx *encoder) +{ + unsigned char abi_arch = 0; + ctf_frame_header *ehp; + ehp = ctf_frame_encoder_get_header (encoder); + if (ehp) + abi_arch = ehp->cth_frame_abi_arch; + return abi_arch; +} + +/* Return the number of function descriptor entries in the CTF Frame encoder + ENCODER. */ + +unsigned int +ctf_frame_encoder_get_num_fidx (ctf_frame_encoder_ctx *encoder) +{ + unsigned int num_fdes = 0; + ctf_frame_header *ehp = NULL; + ehp = ctf_frame_encoder_get_header (encoder); + if (ehp) + num_fdes = ehp->cth_num_fdes; + return num_fdes; +} + +/* Add an FRE to function at FUNC_IDX'th function descriptor entry in + the encoder context. */ + +int +ctf_frame_encoder_add_fre (ctf_frame_encoder_ctx *encoder, + unsigned int func_idx, + ctf_frame_row_entry *frep) +{ + ctf_frame_header *ehp; + ctf_frame_func_desc_entry *fdep; + ctf_frame_row_entry *ectx_frep; + size_t offsets_sz, esz; + unsigned int fre_type; + size_t fre_tbl_sz; + int err = 0; + + if (encoder == NULL || frep == NULL) + return ctf_frame_set_errno (&err, EINVAL); + if (!ctf_fre_sanity_check_p (frep)) + return ctf_frame_set_errno (&err, ECTF_FRAME_FRE_INVAL); + + /* Use func_idx to gather the function descriptor entry. */ + fdep = ctf_frame_encoder_get_funcdesc_at_index (encoder, func_idx); + + if (fdep == NULL) + return ctf_frame_set_errno (&err, ECTF_FRAME_FDE_NOTFOUND); + + fre_type = ctf_frame_get_fre_type (fdep); + cf_fre_tbl *fre_tbl = (cf_fre_tbl *) encoder->cfe_fres; + + if (fre_tbl == NULL) + { + fre_tbl_sz = (sizeof (cf_fre_tbl) + + (number_of_entries * sizeof (ctf_frame_row_entry))); + fre_tbl = malloc (fre_tbl_sz); + + if (fre_tbl == NULL) + { + ctf_frame_set_errno (&err, ECTF_FRAME_NOMEM); + goto bad; /* OOM. */ + } + memset (fre_tbl, 0, fre_tbl_sz); + fre_tbl->alloced = number_of_entries; + } + else if (fre_tbl->count == fre_tbl->alloced) + { + fre_tbl_sz = (sizeof (cf_fre_tbl) + + ((fre_tbl->alloced + number_of_entries) + * sizeof (ctf_frame_row_entry))); + fre_tbl = realloc (fre_tbl, fre_tbl_sz); + if (fre_tbl == NULL) + { + ctf_frame_set_errno (&err, ECTF_FRAME_NOMEM); + goto bad; /* OOM. */ + } + + memset (&fre_tbl->entry[fre_tbl->alloced], 0, + number_of_entries * sizeof (ctf_frame_row_entry)); + fre_tbl->alloced += number_of_entries; + } + + ectx_frep = &fre_tbl->entry[fre_tbl->count]; + ectx_frep->fre_start_addr + = frep->fre_start_addr; + ectx_frep->fre_info = frep->fre_info; + + if (fdep->ctf_func_size) + ctf_frame_assert (frep->fre_start_addr < fdep->ctf_func_size); + else + /* A CTF FDE with func size equal to zero is possible. */ + ctf_frame_assert (frep->fre_start_addr == fdep->ctf_func_size); + + /* frep has already been sanity check'd. Get offsets size. */ + offsets_sz = ctf_fre_offset_bytes_size (frep->fre_info); + memcpy (&ectx_frep->fre_offsets, &frep->fre_offsets, offsets_sz); + + esz = ctf_fre_entry_size (frep, fre_type); + fre_tbl->count++; + + encoder->cfe_fres = (void *) fre_tbl; + encoder->cfe_fre_nbytes += esz; + + ehp = ctf_frame_encoder_get_header (encoder); + ehp->cth_num_fres = fre_tbl->count; + + /* Update the value of the number of FREs for the function. */ + fdep->ctf_func_num_fres++; + + return 0; + +bad: + if (fre_tbl != NULL) + free (fre_tbl); + encoder->cfe_fres = NULL; + encoder->cfe_fre_nbytes = 0; + return -1; +} + +/* Add a new function descriptor entry with START_ADDR, FUNC_SIZE and NUM_FRES + to the encoder. */ + +int +ctf_frame_encoder_add_funcdesc (ctf_frame_encoder_ctx *encoder, + int32_t start_addr, + uint32_t func_size, + unsigned char func_info, + uint32_t num_fres __attribute__ ((unused))) +{ + ctf_frame_header *ehp; + cf_funidx_tbl *fd_info; + size_t fd_tbl_sz; + int err = 0; + + /* FIXME book-keep num_fres for error checking. */ + if (encoder == NULL) + return ctf_frame_set_errno (&err, EINVAL); + + fd_info = (cf_funidx_tbl *) encoder->cfe_funcdesc; + ehp = ctf_frame_encoder_get_header (encoder); + + if (fd_info == NULL) + { + fd_tbl_sz = (sizeof (cf_funidx_tbl) + + (number_of_entries * sizeof (ctf_frame_func_desc_entry))); + fd_info = malloc (fd_tbl_sz); + if (fd_info == NULL) + { + ctf_frame_set_errno (&err, ECTF_FRAME_NOMEM); + goto bad; /* OOM. */ + } + memset (fd_info, 0, fd_tbl_sz); + fd_info->alloced = number_of_entries; + } + else if (fd_info->count == fd_info->alloced) + { + fd_tbl_sz = (sizeof (cf_funidx_tbl) + + ((fd_info->alloced + number_of_entries) + * sizeof (ctf_frame_func_desc_entry))); + fd_info = realloc (fd_info, fd_tbl_sz); + if (fd_info == NULL) + { + ctf_frame_set_errno (&err, ECTF_FRAME_NOMEM); + goto bad; /* OOM. */ + } + + memset (&fd_info->entry[fd_info->alloced], 0, + number_of_entries * sizeof (ctf_frame_func_desc_entry)); + fd_info->alloced += number_of_entries; + } + + fd_info->entry[fd_info->count].ctf_func_start_address = start_addr; + /* Num FREs is updated as FREs are added for the function later via + ctf_frame_encoder_add_fre. */ + fd_info->entry[fd_info->count].ctf_func_size = func_size; + fd_info->entry[fd_info->count].ctf_func_start_fre_off + = encoder->cfe_fre_nbytes; +#if 0 + // Linker optimization test code cleanup later ibhagat TODO FIXME + unsigned int fre_type = ctf_frame_calc_fre_type (func_size); + + fd_info->entry[fd_info->count].ctf_func_info + = ctf_frame_fde_func_info (fre_type); +#endif + fd_info->entry[fd_info->count].ctf_func_info = func_info; + fd_info->count++; + encoder->cfe_funcdesc = (void *) fd_info; + ehp->cth_num_fdes++; + return 0; + +bad: + if (fd_info != NULL) + free (fd_info); + encoder->cfe_funcdesc = NULL; + ehp->cth_num_fdes = 0; + return -1; +} + +static int +ctf_frame_sort_funcdesc (ctf_frame_encoder_ctx *encoder) +{ + ctf_frame_header *ehp; + + ehp = ctf_frame_encoder_get_header (encoder); + /* Sort and write out the FDE table. */ + cf_funidx_tbl *fd_info = (cf_funidx_tbl *) encoder->cfe_funcdesc; + if (fd_info) + { + qsort (fd_info->entry, fd_info->count, + sizeof (ctf_frame_func_desc_entry), fde_func); + /* Update preamble's flags. */ + ehp->cth_frame_preamble.ctfp_flags |= CTF_FRAME_F_FDE_SORTED; + } + return 0; +} + +/* Write a frame row entry pointed to by FREP into the buffer CONTENTS. The + size in bytes written out are updated in ESZ. + + This function works closely with the CTF Frame binary format. + + Returns CTF_FRAME_ERR if failure. */ + +static int +ctf_frame_encoder_write_fre (char *contents, ctf_frame_row_entry *frep, + unsigned int fre_type, size_t *esz) +{ + size_t fre_size; + size_t fre_start_addr_sz; + size_t fre_stack_offsets_sz; + int err = 0; + + if (!ctf_fre_sanity_check_p (frep)) + return ctf_frame_set_errno (&err, ECTF_FRAME_FRE_INVAL); + + fre_start_addr_sz = ctf_fre_start_addr_size (fre_type); + fre_stack_offsets_sz = ctf_fre_offset_bytes_size (frep->fre_info); + + /* The FRE start address must be encodable in the available number of + bytes. */ + uint64_t bitmask = CTF_BITMASK_OF_SIZE (fre_start_addr_sz); + ctf_frame_assert ((uint64_t)frep->fre_start_addr <= bitmask); + + memcpy (contents, + &frep->fre_start_addr, + fre_start_addr_sz); + contents += fre_start_addr_sz; + + memcpy (contents, + &frep->fre_info, + sizeof (frep->fre_info)); + contents += sizeof (frep->fre_info); + + memcpy (contents, + frep->fre_offsets, + fre_stack_offsets_sz); + contents+= fre_stack_offsets_sz; + + fre_size = ctf_fre_entry_size (frep, fre_type); + /* Sanity checking. */ + ctf_frame_assert ((fre_start_addr_sz + + sizeof (frep->fre_info) + + fre_stack_offsets_sz) == fre_size); + + *esz = fre_size; + + return 0; +} + +/* Serialize the core contents of the CTF Frame section and write out to the + output buffer held in the ENCODER. Return CTF_FRAME_ERR if failure. */ + +static int +ctf_frame_encoder_write_ctf_frame (ctf_frame_encoder_ctx *encoder) +{ + char *contents; + size_t buf_size; + size_t hdr_size; + size_t all_fdes_size; + size_t fre_size; + size_t esz = 0; + ctf_frame_header *ehp; + unsigned char flags; + cf_funidx_tbl *fd_info; + cf_fre_tbl *fr_info; + uint32_t i, num_fdes; + uint32_t j, num_fres; + ctf_frame_func_desc_entry *fdep; + ctf_frame_row_entry *frep; + + unsigned int fre_type; + int err = 0; + + contents = encoder->cfe_data; + buf_size = encoder->cfe_data_size; + hdr_size = sizeof (ctf_frame_header); + num_fdes = ctf_frame_encoder_get_num_fidx (encoder); + all_fdes_size = num_fdes * sizeof (ctf_frame_func_desc_entry); + ehp = ctf_frame_encoder_get_header (encoder); + + fd_info = (cf_funidx_tbl *) encoder->cfe_funcdesc; + fr_info = (cf_fre_tbl *) encoder->cfe_fres; + + /* Sanity checks: + - buffers must be malloc'd by the caller. */ + if ((contents == NULL) || (buf_size < hdr_size)) + return ctf_frame_set_errno (&err, ECTF_FRAME_BUF_INVAL); + if (fr_info == NULL) + return ctf_frame_set_errno (&err, ECTF_FRAME_FRE_INVAL); + + /* Write out the FRE table first. + + Recall that read/write of FREs needs information from the corresponding + FDE; the latter stores the information about the FRE type record used for + the function. Also note that sorting of FDEs does NOT impact the order + in which FREs are stored in the CTF Frame's FRE sub-section. This means + that writing out FREs after sorting of FDEs will need some additional + book-keeping. At this time, we can afford to avoid it by writing out + the FREs first to the output buffer. */ + fre_size = 0; + uint32_t global = 0; + uint32_t fre_index = 0; + + contents += hdr_size + all_fdes_size; + for (i = 0; i < num_fdes; i++) + { + fdep = &fd_info->entry[i]; + fre_type = ctf_frame_get_fre_type (fdep); + num_fres = fdep->ctf_func_num_fres; + + for (j = 0; j < num_fres; j++) + { + fre_index = global + j; + frep = &fr_info->entry[fre_index]; + + ctf_frame_encoder_write_fre (contents, frep, fre_type, &esz); + contents += esz; + fre_size += esz; /* For debugging only. */ + } + global += j; + } + + ctf_frame_assert (fre_size == ehp->cth_fre_len); + ctf_frame_assert (global == ehp->cth_num_fres); + ctf_frame_assert ((size_t)(contents - encoder->cfe_data) == buf_size); + + /* Sort the FDE table */ + ctf_frame_sort_funcdesc (encoder); + + /* Sanity checks: + - the FDE section must have been sorted by now on the start address + of each function. */ + flags = ehp->cth_frame_preamble.ctfp_flags; + if (!(flags & CTF_FRAME_F_FDE_SORTED) + || (fd_info == NULL)) + return ctf_frame_set_errno (&err, ECTF_FRAME_FDE_INVAL); + + contents = encoder->cfe_data; + /* Write out the CTF Frame header. The CTF Frame header in the encoder + object has already been updated with correct offsets by the caller. */ + memcpy (contents, ehp, hdr_size); + contents += hdr_size; + + /* Write out the FDE table sorted on funtion start address. */ + memcpy (contents, fd_info->entry, all_fdes_size); + contents += all_fdes_size; + + return 0; +} + +/* Serialize the contents of the encoder and return the buffer. ENCODED_SIZE + is updated to the size of the buffer. */ + +char * +ctf_frame_write_encoder (ctf_frame_encoder_ctx *encoder, + size_t *encoded_size, int *errp) +{ + ctf_frame_header *ehp; + size_t hdrsize, fsz, fresz, bufsize; + int foreign_endian; + + /* Initialize the encoded_size to zero. This makes it simpler to just + return from the function in case of failure. Free'ing up of + encoder->cfe_data is the responsibility of the caller. */ + *encoded_size = 0; + + if (encoder == NULL || encoded_size == NULL || errp == NULL) + return ctf_frame_ret_set_errno (errp, EINVAL); + + hdrsize = sizeof (ctf_frame_header); + fsz = ctf_frame_encoder_get_num_fidx (encoder) + * sizeof (ctf_frame_func_desc_entry); + fresz = encoder->cfe_fre_nbytes; + + /* The total size of buffer is the sum of header, CTF Function Descriptor + Entries section and the FRE section. */ + bufsize = hdrsize + fsz + fresz; + encoder->cfe_data = (char *) malloc (bufsize); + if (encoder->cfe_data == NULL) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_NOMEM); + encoder->cfe_data_size = bufsize; + + /* Update the header information. */ + ehp = ctf_frame_encoder_get_header (encoder); + /* CTF FDE section follows immediately after the header. */ + ehp->cth_fdeoff = 0; + /* CTF FRE section follows immediately after the CTF FDE section. */ + ehp->cth_freoff = fsz; + ehp->cth_fre_len = fresz; + /* FIXME - cth_cfa_fixed_fp_offset cth_cfa_fixed_ra_offset?? */ + + foreign_endian = need_swapping (ehp->cth_frame_abi_arch); + + /* Write out the FDE Index and the FRE table. */ + if (ctf_frame_encoder_write_ctf_frame (encoder)) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_BUF_INVAL); + + /* Endian flip the contents if necessary. */ + if (foreign_endian) + { + flip_header ((ctf_frame_header*)encoder->cfe_data); + if (flip_ctf_frame (encoder->cfe_data, bufsize)) + return ctf_frame_ret_set_errno (errp, ECTF_FRAME_BUF_INVAL); + } + + *encoded_size = bufsize; + return encoder->cfe_data; +} diff --git a/libctfframe/testsuite/Makefile.am b/libctfframe/testsuite/Makefile.am new file mode 100644 index 00000000000..03266696945 --- /dev/null +++ b/libctfframe/testsuite/Makefile.am @@ -0,0 +1,23 @@ +AUTOMAKE_OPTIONS = dejagnu foreign + +SUBDIRS = libctfframe.decode libctfframe.encode + +# Setup the testing framework +EXPECT = expect +RUNTEST = runtest +RUNTESTFLAGS = + +check-DEJAGNU: site.exp + srcroot=`cd $(srcdir) && pwd`; export srcroot; \ + r=`pwd`; export r; \ + LC_ALL=C; export LC_ALL; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest --tool $(DEJATOOL) \ + CC="$(CC)" \ + CROSS_COMPILE="$(CROSS_COMPILE)" \ + CFLAGS="$(CFLAGS) -I$(top_srcdir)/../include -I$(top_srcdir) -I$(top_builddir)" \ + $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi diff --git a/libctfframe/testsuite/Makefile.in b/libctfframe/testsuite/Makefile.in new file mode 100644 index 00000000000..3a6accc9e53 --- /dev/null +++ b/libctfframe/testsuite/Makefile.in @@ -0,0 +1,682 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = testsuite +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/jobserver.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/warnings.m4 \ + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DEJATOOL = $(PACKAGE) +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/../mkinstalldirs +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_PEDANTIC = @WARN_PEDANTIC@ +WERROR = @WERROR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_libctfframe_warn_cflags = @ac_libctfframe_warn_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +c_warn = @c_warn@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_noncanonical = @host_noncanonical@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +target_noncanonical = @target_noncanonical@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +warn = @warn@ +AUTOMAKE_OPTIONS = dejagnu foreign +SUBDIRS = libctfframe.decode libctfframe.encode + +# Setup the testing framework +EXPECT = expect +RUNTEST = runtest +RUNTESTFLAGS = +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign testsuite/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) + @echo 'Making a new site.exp file ...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ + echo "## Begin content included from file $$f. Do not modify. ##" \ + && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ + && echo "## End content included from file $$f. ##" \ + || exit 1; \ + done >> site.tmp + @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp + @if test -f site.exp; then \ + sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ + fi + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + +distclean-DEJAGNU: + -rm -f site.exp site.bak + -l='$(DEJATOOL)'; for tool in $$l; do \ + rm -f $$tool.sum $$tool.log; \ + done + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-DEJAGNU distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-DEJAGNU check-am clean clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-DEJAGNU \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +check-DEJAGNU: site.exp + srcroot=`cd $(srcdir) && pwd`; export srcroot; \ + r=`pwd`; export r; \ + LC_ALL=C; export LC_ALL; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest --tool $(DEJATOOL) \ + CC="$(CC)" \ + CROSS_COMPILE="$(CROSS_COMPILE)" \ + CFLAGS="$(CFLAGS) -I$(top_srcdir)/../include -I$(top_srcdir) -I$(top_builddir)" \ + $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libctfframe/testsuite/config/default.exp b/libctfframe/testsuite/config/default.exp new file mode 100644 index 00000000000..c91c01b2265 --- /dev/null +++ b/libctfframe/testsuite/config/default.exp @@ -0,0 +1,54 @@ +# Basic expect script for libctfframe decoder tests. +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is part of the GNU Binutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Written by Jeffrey Wheat (cassidy@cygnus.com) +# + +if ![info exists ld] then { + set ld [findfile $base_dir/../ld/ld-new $base_dir/../ld/ld-new [transform ld]] +} + +if ![info exists as] then { + set as [findfile $base_dir/../gas/as-new $base_dir/../gas/as-new [transform as]] +} + +remote_exec host "mkdir -p tmpdir" + +# Make symlinks from tmpdir/libctfframe to the linker and assembler in the +# build tree, so that we can use a -B option to gcc to force it to use +# the newly built linker and assembler. +if {![file isdirectory tmpdir/libctfframe]} then { + catch "exec mkdir tmpdir/libctfframe" status + catch "exec ln -s ../../../ld/ld-new tmpdir/libctfframe/ld" status + catch "exec ln -s ld tmpdir/libctfframe/collect-ld" status + catch "exec ln -s ../../../gas/as-new tmpdir/libctfframe/as" status +} +set gcc_B_opt "-B[pwd]/tmpdir/libctfframe/" +set ld_L_opt "" + +if {![info exists CC]} { + set CC gcc +} +if {![info exists CFLAGS]} { + set CFLAGS "-g -O2" +} +if {![info exists CFLAGS_FOR_TARGET]} { + set CFLAGS_FOR_TARGET $CFLAGS +} diff --git a/libctfframe/testsuite/libctfframe.decode/DATA1 b/libctfframe/testsuite/libctfframe.decode/DATA1 new file mode 100644 index 0000000000000000000000000000000000000000..8a6d4a3b68f6be1d67c42b78c3d88807249c3a56 GIT binary patch literal 59 zcmaEKkCBm?fq{{Mfq?~x`GFV&1cCV9`~Ux?!90i@BLg!BBdfp%78ZdIQmh;w0QnIK ACIA2c literal 0 HcmV?d00001 diff --git a/libctfframe/testsuite/libctfframe.decode/DATA2 b/libctfframe/testsuite/libctfframe.decode/DATA2 new file mode 100644 index 0000000000000000000000000000000000000000..71c3be0a8497df2b2055484d45c89d3b0e53e815 GIT binary patch literal 91 zcmaEKkCBm?fq{vEfq?^v<$xFjlz{l!`~Ux?!8`^A79h>|5hx%4WbgwqSb%| S0}G452PsyL4@g{oAQu3xLl8;; literal 0 HcmV?d00001 diff --git a/libctfframe/testsuite/libctfframe.decode/DATA_BIGE b/libctfframe/testsuite/libctfframe.decode/DATA_BIGE new file mode 100644 index 0000000000000000000000000000000000000000..37c3f39a4bad0afccc09d693bf16a8ee6a2d4c50 GIT binary patch literal 59 zcmccjh>?+z0R%uK3lQ^zI6xry|Nr}cKw28i1IjTnFmo`n3VdK;5%?g*%JBgJ_vQ&C literal 0 HcmV?d00001 diff --git a/libctfframe/testsuite/libctfframe.decode/Makefile.am b/libctfframe/testsuite/libctfframe.decode/Makefile.am new file mode 100644 index 00000000000..39b5dbe1460 --- /dev/null +++ b/libctfframe/testsuite/libctfframe.decode/Makefile.am @@ -0,0 +1,14 @@ +check_PROGRAMS = bigendian_data frecnt_1 frecnt_2 + +bigendian_data_SOURCES = bigendian_data.c +bigendian_data_LDADD = ${top_builddir}/libctfframe.la +bigendian_data_CPPFLAGS = -I${top_srcdir}/../include -Wall + +frecnt_1_SOURCES = frecnt_1.c +frecnt_1_LDADD = ${top_builddir}/libctfframe.la +frecnt_1_CPPFLAGS = -I${top_srcdir}/../include -Wall + +frecnt_2_SOURCES = frecnt_2.c +frecnt_2_LDADD = ${top_builddir}/libctfframe.la +frecnt_2_CPPFLAGS = -I${top_srcdir}/../include -Wall + diff --git a/libctfframe/testsuite/libctfframe.decode/Makefile.in b/libctfframe/testsuite/libctfframe.decode/Makefile.in new file mode 100644 index 00000000000..a34cb02191c --- /dev/null +++ b/libctfframe/testsuite/libctfframe.decode/Makefile.in @@ -0,0 +1,661 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = bigendian_data$(EXEEXT) frecnt_1$(EXEEXT) \ + frecnt_2$(EXEEXT) +subdir = testsuite/libctfframe.decode +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/jobserver.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/warnings.m4 \ + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_bigendian_data_OBJECTS = bigendian_data-bigendian_data.$(OBJEXT) +bigendian_data_OBJECTS = $(am_bigendian_data_OBJECTS) +bigendian_data_DEPENDENCIES = ${top_builddir}/libctfframe.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_frecnt_1_OBJECTS = frecnt_1-frecnt_1.$(OBJEXT) +frecnt_1_OBJECTS = $(am_frecnt_1_OBJECTS) +frecnt_1_DEPENDENCIES = ${top_builddir}/libctfframe.la +am_frecnt_2_OBJECTS = frecnt_2-frecnt_2.$(OBJEXT) +frecnt_2_OBJECTS = $(am_frecnt_2_OBJECTS) +frecnt_2_DEPENDENCIES = ${top_builddir}/libctfframe.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/../depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(bigendian_data_SOURCES) $(frecnt_1_SOURCES) \ + $(frecnt_2_SOURCES) +DIST_SOURCES = $(bigendian_data_SOURCES) $(frecnt_1_SOURCES) \ + $(frecnt_2_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/../depcomp \ + $(top_srcdir)/../mkinstalldirs +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_PEDANTIC = @WARN_PEDANTIC@ +WERROR = @WERROR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_libctfframe_warn_cflags = @ac_libctfframe_warn_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +c_warn = @c_warn@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_noncanonical = @host_noncanonical@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +target_noncanonical = @target_noncanonical@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +warn = @warn@ +bigendian_data_SOURCES = bigendian_data.c +bigendian_data_LDADD = ${top_builddir}/libctfframe.la +bigendian_data_CPPFLAGS = -I${top_srcdir}/../include -Wall +frecnt_1_SOURCES = frecnt_1.c +frecnt_1_LDADD = ${top_builddir}/libctfframe.la +frecnt_1_CPPFLAGS = -I${top_srcdir}/../include -Wall +frecnt_2_SOURCES = frecnt_2.c +frecnt_2_LDADD = ${top_builddir}/libctfframe.la +frecnt_2_CPPFLAGS = -I${top_srcdir}/../include -Wall +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/libctfframe.decode/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign testsuite/libctfframe.decode/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +bigendian_data$(EXEEXT): $(bigendian_data_OBJECTS) $(bigendian_data_DEPENDENCIES) $(EXTRA_bigendian_data_DEPENDENCIES) + @rm -f bigendian_data$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bigendian_data_OBJECTS) $(bigendian_data_LDADD) $(LIBS) + +frecnt_1$(EXEEXT): $(frecnt_1_OBJECTS) $(frecnt_1_DEPENDENCIES) $(EXTRA_frecnt_1_DEPENDENCIES) + @rm -f frecnt_1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(frecnt_1_OBJECTS) $(frecnt_1_LDADD) $(LIBS) + +frecnt_2$(EXEEXT): $(frecnt_2_OBJECTS) $(frecnt_2_DEPENDENCIES) $(EXTRA_frecnt_2_DEPENDENCIES) + @rm -f frecnt_2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(frecnt_2_OBJECTS) $(frecnt_2_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigendian_data-bigendian_data.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frecnt_1-frecnt_1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frecnt_2-frecnt_2.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +bigendian_data-bigendian_data.o: bigendian_data.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bigendian_data_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bigendian_data-bigendian_data.o -MD -MP -MF $(DEPDIR)/bigendian_data-bigendian_data.Tpo -c -o bigendian_data-bigendian_data.o `test -f 'bigendian_data.c' || echo '$(srcdir)/'`bigendian_data.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bigendian_data-bigendian_data.Tpo $(DEPDIR)/bigendian_data-bigendian_data.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bigendian_data.c' object='bigendian_data-bigendian_data.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bigendian_data_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bigendian_data-bigendian_data.o `test -f 'bigendian_data.c' || echo '$(srcdir)/'`bigendian_data.c + +bigendian_data-bigendian_data.obj: bigendian_data.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bigendian_data_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bigendian_data-bigendian_data.obj -MD -MP -MF $(DEPDIR)/bigendian_data-bigendian_data.Tpo -c -o bigendian_data-bigendian_data.obj `if test -f 'bigendian_data.c'; then $(CYGPATH_W) 'bigendian_data.c'; else $(CYGPATH_W) '$(srcdir)/bigendian_data.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bigendian_data-bigendian_data.Tpo $(DEPDIR)/bigendian_data-bigendian_data.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bigendian_data.c' object='bigendian_data-bigendian_data.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bigendian_data_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bigendian_data-bigendian_data.obj `if test -f 'bigendian_data.c'; then $(CYGPATH_W) 'bigendian_data.c'; else $(CYGPATH_W) '$(srcdir)/bigendian_data.c'; fi` + +frecnt_1-frecnt_1.o: frecnt_1.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT frecnt_1-frecnt_1.o -MD -MP -MF $(DEPDIR)/frecnt_1-frecnt_1.Tpo -c -o frecnt_1-frecnt_1.o `test -f 'frecnt_1.c' || echo '$(srcdir)/'`frecnt_1.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/frecnt_1-frecnt_1.Tpo $(DEPDIR)/frecnt_1-frecnt_1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='frecnt_1.c' object='frecnt_1-frecnt_1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o frecnt_1-frecnt_1.o `test -f 'frecnt_1.c' || echo '$(srcdir)/'`frecnt_1.c + +frecnt_1-frecnt_1.obj: frecnt_1.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT frecnt_1-frecnt_1.obj -MD -MP -MF $(DEPDIR)/frecnt_1-frecnt_1.Tpo -c -o frecnt_1-frecnt_1.obj `if test -f 'frecnt_1.c'; then $(CYGPATH_W) 'frecnt_1.c'; else $(CYGPATH_W) '$(srcdir)/frecnt_1.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/frecnt_1-frecnt_1.Tpo $(DEPDIR)/frecnt_1-frecnt_1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='frecnt_1.c' object='frecnt_1-frecnt_1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o frecnt_1-frecnt_1.obj `if test -f 'frecnt_1.c'; then $(CYGPATH_W) 'frecnt_1.c'; else $(CYGPATH_W) '$(srcdir)/frecnt_1.c'; fi` + +frecnt_2-frecnt_2.o: frecnt_2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT frecnt_2-frecnt_2.o -MD -MP -MF $(DEPDIR)/frecnt_2-frecnt_2.Tpo -c -o frecnt_2-frecnt_2.o `test -f 'frecnt_2.c' || echo '$(srcdir)/'`frecnt_2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/frecnt_2-frecnt_2.Tpo $(DEPDIR)/frecnt_2-frecnt_2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='frecnt_2.c' object='frecnt_2-frecnt_2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o frecnt_2-frecnt_2.o `test -f 'frecnt_2.c' || echo '$(srcdir)/'`frecnt_2.c + +frecnt_2-frecnt_2.obj: frecnt_2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT frecnt_2-frecnt_2.obj -MD -MP -MF $(DEPDIR)/frecnt_2-frecnt_2.Tpo -c -o frecnt_2-frecnt_2.obj `if test -f 'frecnt_2.c'; then $(CYGPATH_W) 'frecnt_2.c'; else $(CYGPATH_W) '$(srcdir)/frecnt_2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/frecnt_2-frecnt_2.Tpo $(DEPDIR)/frecnt_2-frecnt_2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='frecnt_2.c' object='frecnt_2-frecnt_2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(frecnt_2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o frecnt_2-frecnt_2.obj `if test -f 'frecnt_2.c'; then $(CYGPATH_W) 'frecnt_2.c'; else $(CYGPATH_W) '$(srcdir)/frecnt_2.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libctfframe/testsuite/libctfframe.decode/bigendian_data.c b/libctfframe/testsuite/libctfframe.decode/bigendian_data.c new file mode 100644 index 00000000000..3ef9867e4bf --- /dev/null +++ b/libctfframe/testsuite/libctfframe.decode/bigendian_data.c @@ -0,0 +1,107 @@ +/* bigendian_data.c -- Test for handling different endianness in libctfframe. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "config.h" + +#include +#include +#include + +#include "ctf-frame-api.h" + +/* DejaGnu should not use gnulib's vsnprintf replacement here. */ +#undef vsnprintf +#include + +/* + * CTF Frame info from the following source (1 fde 4 fres): + * static int cnt; + * int main() { cnt++; return (cnt); } + * + * Then its contents are flipped from little-endian to big-endian. + */ +#define DATA "DATA_BIGE" + +int +main () +{ + ctf_frame_decoder_ctx *dctx = NULL; + uint32_t nfres, fsize; + int32_t fstart; + unsigned char finfo; + int err = 0; + FILE *fp; + struct stat st; + char *cf_buf; + size_t cf_size; + +#define TEST(name, cond) \ + do \ + { \ + if (cond) \ + pass (name); \ + else \ + fail (name); \ + } \ + while (0) + + /* Test setup. */ + fp = fopen (DATA, "r"); + if (fp == NULL) + goto setup_fail; + if (fstat (fileno (fp), &st) < 0) + { + perror ("fstat"); + fclose (fp); + goto setup_fail; + } + cf_buf = malloc (st.st_size); + if (cf_buf == NULL) + { + perror ("malloc"); + goto setup_fail; + } + cf_size = fread (cf_buf, 1, st.st_size, fp); + fclose (fp); + if (cf_size == 0) + { + fprintf (stderr, "Decode: Read buffer failed\n"); + goto setup_fail; + } + + /* Execute tests. */ + + /* Call to ctf_frame_decode will endian flip the input buffer and + keep the new copy of buffer internally. */ + dctx = ctf_frame_decode (cf_buf, cf_size, &err); + TEST ("bigendian_data: Decoder setup", dctx != NULL); + + unsigned int fde_cnt = ctf_frame_decoder_get_num_fidx (dctx); + TEST ("bigendian_data: Decoder FDE count", fde_cnt == 1); + + err = ctf_frame_decoder_get_funcdesc (dctx, 0, &nfres, &fsize, &fstart, &finfo); + TEST ("bigendian_data: Decoder get FDE", err == 0); + TEST ("bigendian_data: Decoder FRE count", nfres == 4); + + ctf_frame_decoder_free (&dctx); + return 0; + +setup_fail: + ctf_frame_decoder_free (&dctx); + fail ("bigendian_data: Test setup"); + return 1; +} diff --git a/libctfframe/testsuite/libctfframe.decode/decode.exp b/libctfframe/testsuite/libctfframe.decode/decode.exp new file mode 100644 index 00000000000..ef0cd95f6f9 --- /dev/null +++ b/libctfframe/testsuite/libctfframe.decode/decode.exp @@ -0,0 +1,41 @@ +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +load_lib dejagnu.exp + +catch "exec ln -s $srcdir/../testsuite/libctfframe.decode/DATA1 ." status +catch "exec ln -s $srcdir/../testsuite/libctfframe.decode/DATA2 ." status +catch "exec ln -s $srcdir/../testsuite/libctfframe.decode/DATA_BIGE ." status + +if { [host_execute "libctfframe.decode/bigendian_data"] ne "" } { + fail "bigendian_data" +} + +if { [host_execute "libctfframe.decode/frecnt_1"] ne "" } { + fail "frecnt_1" +} + +if { [host_execute "libctfframe.decode/frecnt_2"] ne "" } { + fail "frecnt_2" +} + +catch "exec rm libctfframe.decode/DATA1" status +catch "exec rm libctfframe.decode/DATA2" status +catch "exec rm libctfframe.decode/DATA_BIGE" status diff --git a/libctfframe/testsuite/libctfframe.decode/frecnt_1.c b/libctfframe/testsuite/libctfframe.decode/frecnt_1.c new file mode 100644 index 00000000000..0e1a1154c85 --- /dev/null +++ b/libctfframe/testsuite/libctfframe.decode/frecnt_1.c @@ -0,0 +1,99 @@ +/* frecnt_1.c -- Test for decoder in libctfframe. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "config.h" + +#include +#include +#include + +#include "ctf-frame-api.h" + +/* DejaGnu should not use gnulib's vsnprintf replacement here. */ +#undef vsnprintf +#include + +/* + * CTF Frame info from the following source (1 fde 4 fres): + * static int cnt; + * int main() { cnt++; return (cnt); } + */ +#define DATA "DATA1" + +int +main () +{ + ctf_frame_decoder_ctx *dctx = NULL; + uint32_t nfres, fsize; + int32_t fstart; + unsigned char finfo; + int err = 0; + FILE *fp; + struct stat st; + char *cf_buf; + size_t cf_size; + +#define TEST(name, cond) \ + do \ + { \ + if (cond) \ + pass (name); \ + else \ + fail (name); \ + } \ + while (0) + + /* Test Setup. */ + fp = fopen (DATA, "r"); + if (fp == NULL) + goto setup_fail; + if (fstat (fileno (fp), &st) < 0) + { + perror ("fstat"); + fclose (fp); + goto setup_fail; + } + cf_buf = malloc (st.st_size); + if (cf_buf == NULL) + { + perror ("malloc"); + goto setup_fail; + } + + /* Execute tests. */ + cf_size = fread (cf_buf, 1, st.st_size, fp); + fclose (fp); + TEST ("frecnt_1: Read section", cf_size != 0); + + dctx = ctf_frame_decode (cf_buf, cf_size, &err); + TEST ("frecnt_1: Decoder setup", dctx != NULL); + + unsigned int fde_cnt = ctf_frame_decoder_get_num_fidx (dctx); + TEST ("frecnt_1: Decoder FDE count", fde_cnt == 1); + + err = ctf_frame_decoder_get_funcdesc (dctx, 0, &nfres, &fsize, &fstart, &finfo); + TEST ("frecnt_1: Decoder get FDE", err == 0); + TEST ("frecnt_1: Decoder FRE count", nfres == 4); + + ctf_frame_decoder_free (&dctx); + return 0; + +setup_fail: + ctf_frame_decoder_free (&dctx); + fail ("frecnt_1: Test setup"); + return 1; +} diff --git a/libctfframe/testsuite/libctfframe.decode/frecnt_2.c b/libctfframe/testsuite/libctfframe.decode/frecnt_2.c new file mode 100644 index 00000000000..eaef2da260f --- /dev/null +++ b/libctfframe/testsuite/libctfframe.decode/frecnt_2.c @@ -0,0 +1,103 @@ +/* frecnt_2.c -- Test for decoder in libctfframe. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "config.h" + +#include +#include +#include + +#include "ctf-frame-api.h" + +/* DejaGnu should not use gnulib's vsnprintf replacement here. */ +#undef vsnprintf +#include + +/* + * CTF Frame info from the following source (2 fde 8 fres): + * static int cnt; + * int foo() { return ++cnt; } + * int main() { return foo(); } + */ +#define DATA "DATA2" + +int +main () +{ + ctf_frame_decoder_ctx *dctx = NULL; + uint32_t nfres, fsize; + int32_t fstart; + unsigned char finfo; + int i, err = 0; + FILE *fp; + struct stat st; + char *cf_buf; + size_t cf_size; + +#define TEST(name, cond) \ + do \ + { \ + if (cond) \ + pass (name); \ + else \ + fail (name); \ + } \ + while (0) + + fp = fopen (DATA, "r"); + if (fp == NULL) + goto setup_fail; + if (fstat (fileno (fp), &st) < 0) + { + perror ("fstat"); + fclose (fp); + goto setup_fail; + } + cf_buf = malloc (st.st_size); + if (cf_buf == NULL) + { + perror ("malloc"); + goto setup_fail; + } + + /* Execute tests. */ + cf_size = fread (cf_buf, 1, st.st_size, fp); + fclose (fp); + TEST ("frecnt_2: Read section", cf_size != 0); + + dctx = ctf_frame_decode (cf_buf, cf_size, &err); + TEST ("frecnt_2: Decode setup", dctx != NULL); + + unsigned int fde_cnt = ctf_frame_decoder_get_num_fidx (dctx); + TEST ("frecnt_2: Decode FDE count", fde_cnt == 2); + + for (i = 0; i < fde_cnt; ++i) + { + err = ctf_frame_decoder_get_funcdesc (dctx, i, &nfres, &fsize, &fstart, + &finfo); + TEST ("frecnt_2: Decode get FDE", err == 0); + TEST ("frecnt_2: Decode get FRE", nfres == 4); + } + + ctf_frame_decoder_free (&dctx); + return 0; + +setup_fail: + ctf_frame_decoder_free (&dctx); + fail ("frecnt_2: Test setup"); + return 1; +} diff --git a/libctfframe/testsuite/libctfframe.encode/Makefile.am b/libctfframe/testsuite/libctfframe.encode/Makefile.am new file mode 100644 index 00000000000..6ee264664a6 --- /dev/null +++ b/libctfframe/testsuite/libctfframe.encode/Makefile.am @@ -0,0 +1,6 @@ +check_PROGRAMS = encode_1 + +encode_1_SOURCES = encode_1.c +encode_1_LDADD = ${top_builddir}/libctfframe.la +encode_1_CPPFLAGS = -I${top_srcdir}/../include -Wall + diff --git a/libctfframe/testsuite/libctfframe.encode/Makefile.in b/libctfframe/testsuite/libctfframe.encode/Makefile.in new file mode 100644 index 00000000000..da8702d30c2 --- /dev/null +++ b/libctfframe/testsuite/libctfframe.encode/Makefile.in @@ -0,0 +1,608 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = encode_1$(EXEEXT) +subdir = testsuite/libctfframe.encode +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/jobserver.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/warnings.m4 \ + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_encode_1_OBJECTS = encode_1-encode_1.$(OBJEXT) +encode_1_OBJECTS = $(am_encode_1_OBJECTS) +encode_1_DEPENDENCIES = ${top_builddir}/libctfframe.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/../depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(encode_1_SOURCES) +DIST_SOURCES = $(encode_1_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/../depcomp \ + $(top_srcdir)/../mkinstalldirs +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_PEDANTIC = @WARN_PEDANTIC@ +WERROR = @WERROR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_libctfframe_warn_cflags = @ac_libctfframe_warn_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +c_warn = @c_warn@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_noncanonical = @host_noncanonical@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +target_noncanonical = @target_noncanonical@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +warn = @warn@ +encode_1_SOURCES = encode_1.c +encode_1_LDADD = ${top_builddir}/libctfframe.la +encode_1_CPPFLAGS = -I${top_srcdir}/../include -Wall +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/libctfframe.encode/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign testsuite/libctfframe.encode/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +encode_1$(EXEEXT): $(encode_1_OBJECTS) $(encode_1_DEPENDENCIES) $(EXTRA_encode_1_DEPENDENCIES) + @rm -f encode_1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(encode_1_OBJECTS) $(encode_1_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encode_1-encode_1.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +encode_1-encode_1.o: encode_1.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(encode_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT encode_1-encode_1.o -MD -MP -MF $(DEPDIR)/encode_1-encode_1.Tpo -c -o encode_1-encode_1.o `test -f 'encode_1.c' || echo '$(srcdir)/'`encode_1.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/encode_1-encode_1.Tpo $(DEPDIR)/encode_1-encode_1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='encode_1.c' object='encode_1-encode_1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(encode_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o encode_1-encode_1.o `test -f 'encode_1.c' || echo '$(srcdir)/'`encode_1.c + +encode_1-encode_1.obj: encode_1.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(encode_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT encode_1-encode_1.obj -MD -MP -MF $(DEPDIR)/encode_1-encode_1.Tpo -c -o encode_1-encode_1.obj `if test -f 'encode_1.c'; then $(CYGPATH_W) 'encode_1.c'; else $(CYGPATH_W) '$(srcdir)/encode_1.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/encode_1-encode_1.Tpo $(DEPDIR)/encode_1-encode_1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='encode_1.c' object='encode_1-encode_1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(encode_1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o encode_1-encode_1.obj `if test -f 'encode_1.c'; then $(CYGPATH_W) 'encode_1.c'; else $(CYGPATH_W) '$(srcdir)/encode_1.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libctfframe/testsuite/libctfframe.encode/encode.exp b/libctfframe/testsuite/libctfframe.encode/encode.exp new file mode 100644 index 00000000000..58a436bd1d1 --- /dev/null +++ b/libctfframe/testsuite/libctfframe.encode/encode.exp @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +load_lib dejagnu.exp + +if { [host_execute "libctfframe.encode/encode_1"] ne "" } { + fail "encode_1" +} diff --git a/libctfframe/testsuite/libctfframe.encode/encode_1.c b/libctfframe/testsuite/libctfframe.encode/encode_1.c new file mode 100644 index 00000000000..2a093b5e08e --- /dev/null +++ b/libctfframe/testsuite/libctfframe.encode/encode_1.c @@ -0,0 +1,182 @@ +/* encode_1.c -- Test for encoder in libctfframe. + + Copyright (C) 2022 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "config.h" + +#include +#include +#include +#include + +#include "ctf-frame-api.h" + +/* DejaGnu should not use gnulib's vsnprintf replacement here. */ +#undef vsnprintf +#include + +static int +add_fde1 (ctf_frame_encoder_ctx *encode, int idx) +{ + int i, err; + /* A contiguous block containing 4 FREs. */ + ctf_frame_row_entry fres[] + = { {0x0, 0x3, {0x8, 0, 0}}, + {0x1, 0x5, {0x10, 0xf0, 0}}, + {0x4, 0x4, {0x10, 0xf0, 0}}, + {0x1a, 0x5, {0x8, 0xf0, 0}} + }; + + unsigned char finfo = ctf_frame_fde_func_info (CTF_FRAME_ROW_ENTRY_TYPE_ADDR1, + CTF_FRAME_FUNC_DESC_ENTRY_TYPE_PCINC); + err = ctf_frame_encoder_add_funcdesc (encode, 0xffffefd6, 0x1b, finfo, 4); + if (err == -1) + return err; + + for (i = 0; i < 4; i++) + if (ctf_frame_encoder_add_fre (encode, idx,fres+i) == CTF_FRAME_ERR) + return -1; + + return 0; +} + +static int +add_fde2 (ctf_frame_encoder_ctx *encode, int idx) +{ + int i, err; + /* A contiguous block containing 4 FREs. */ + ctf_frame_row_entry fres[] + = { {0x0, 0x3, {0x8, 0, 0}}, + {0x1, 0x5, {0x10, 0xf0, 0}}, + {0x4, 0x4, {0x10, 0xf0, 0}}, + {0xf, 0x5, {0x8, 0xf0, 0}} + }; + + unsigned char finfo = ctf_frame_fde_func_info (CTF_FRAME_ROW_ENTRY_TYPE_ADDR1, + CTF_FRAME_FUNC_DESC_ENTRY_TYPE_PCINC); + err = ctf_frame_encoder_add_funcdesc (encode, 0xffffeff1, 0x10, finfo, 4); + if (err == -1) + return err; + + for (i = 0; i < 4; i++) + if (ctf_frame_encoder_add_fre (encode, idx, fres+i) == CTF_FRAME_ERR) + return -1; + + return 0; +} + +/* + * CTF Frame info from the following source (2 fdes, 4 fres in each fde): + * static int cnt; + * int foo() { return ++cnt; } + * int main() { return foo(); } + */ +#define DATA "DATA2" + +static int +data_match (char *ctfp, size_t sz) +{ + FILE *fp; + struct stat st; + char *cf_buf; + size_t cf_size; + int diffs; + + fp = fopen (DATA, "r"); + if (fp == NULL) + return 0; + if (fstat (fileno (fp), &st) < 0) + { + perror ("fstat"); + fclose (fp); + return 0; + } + cf_buf = malloc (st.st_size); + if (cf_buf == NULL) + { + perror ("malloc"); + return 0; + } + cf_size = fread (cf_buf, 1, st.st_size, fp); + fclose (fp); + if (cf_size == 0 || cf_buf == NULL) + { + fprintf (stderr, "Encode: Read section failed\n"); + return 0; + } + if (cf_size != sz) + return 0; + + diffs = memcmp (cf_buf, ctfp, sz); + + free (cf_buf); + return diffs == 0; +} + +int main () +{ + ctf_frame_encoder_ctx *encode; + ctf_frame_row_entry frep; + char *ctfp; + size_t ctf_sz; + int err = 0; + + encode = ctf_frame_encode (CTF_FRAME_VERSION, 0, + CTF_FRAME_ABI_AMD64_ENDIAN_LITTLE, &err); + + if (ctf_frame_encoder_get_num_fidx (encode) != 0) + { + fprintf (stderr, "Encode: incorrect FDEs count\n"); + goto fail; + } + + /* Error test. */ + if (ctf_frame_encoder_add_fre (encode, 1, &frep) != CTF_FRAME_ERR) + { + fprintf (stderr, "Encode: Adding FRE befoer FDE does\n"); + goto fail; + } + + if (add_fde1 (encode, 0) == -1) + { + fprintf (stderr, "Encode: Adding FDE1\n"); + goto fail; + } + if (add_fde2 (encode, 1) == -1) + { + fprintf (stderr, "Encode: Adding FDE2\n"); + goto fail; + } + + if (ctf_frame_encoder_get_num_fidx (encode) != 2) + { + fprintf (stderr, "Encode: Wrong FDE count\n"); + goto fail; + } + + ctfp = ctf_frame_write_encoder (encode, &ctf_sz, &err); + if (err) + return 1; + if (data_match (ctfp, ctf_sz)) + { + ctf_frame_encoder_free (&encode); + pass ("encode test"); + } + +fail: + ctf_frame_encoder_free (&encode); + return 1; +} -- 2.37.1