From patchwork Thu Jan 11 18:30:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Frager X-Patchwork-Id: 761864 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2542963wrz; Thu, 11 Jan 2024 10:30:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IECAM2hoVwSEWelyr1nKsi9QUzk6/wUqY0epOPxQZIGWVQ2kZpoulGx/0mi0KDnig7whpSU X-Received: by 2002:a05:6122:3a16:b0:4b6:c7e6:c669 with SMTP id fp22-20020a0561223a1600b004b6c7e6c669mr260218vkb.17.1704997847447; Thu, 11 Jan 2024 10:30:47 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1704997847; cv=pass; d=google.com; s=arc-20160816; b=aep4bcn+id85X5yrFIFlyqhbC4SulWIRnK8/Ai+L4QIV3RwL5uwJDOo1avM1leSvc9 nxJdlT6LAqJahuLsrfkTjgsfDigx4LJj0O8j1X0tsLeP/hW1F+qlt/AajlMp0g2aD4Ql POED+jXaLZWloiyaT/tWsdL8B5yf+KP/pIt3GKgyubpVqtwl1y7xydrGlIFbqiZxwjmI 6DmgeQsN1Psh2pRhnUYjS1jOANIKn6uZYr+BcGWt0QAatHCy3oEetXY06bG8MZJC4wBw UyD+9lLLjycUAgP8fY/N2OOai+xenp24jBrHpe+PSBxBvcpcqOl0W1TNsqqqxWpQRdwf 2N/g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=FycWC45T3i07PYBvnQ5injtUceXIvEMMDsH5USuGSCM=; fh=dMMjN8OkhEbItmK/06e6vZFez8Z1bHHCGE5GZX5+7Vk=; b=EFvoLA43iY7Mlc3+H+cPOe5cwS45c+MkM4IHbNLq0pilSN1QIkDVxdeILVH1MaZCiG hkjBQ9rN7/U2BQBJ6QqW7eRktS7c5UxQKNyp5DCiIhUMWFGNCnNraTwZdFFFXntpVePt hPhCIJJSqsJSgOYe39jf2NiAvWUOeMKIoKM6hGjQjMwqCzXEBJM7WGaeSbBb2BdWkvIo Q0HH2l2c4/JKz+e9OsomXft5u1zbzWlYoQPXuXTPu2eWqI9EvShBygY79v/XaH9p2M31 YZfyMazb1K7j6jWpHO6CIgt31yFw3kcmyUyKfHYb62B4fPPKKT5dJfyfzKLJ/pe6eI1j +Eig== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=XLTlD3+m; arc=pass (i=2); spf=pass (google.com: domain of newlib-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="newlib-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id o26-20020a05620a229a00b007833cd0673dsi1315038qkh.630.2024.01.11.10.30.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 10:30:47 -0800 (PST) Received-SPF: pass (google.com: domain of newlib-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=XLTlD3+m; arc=pass (i=2); spf=pass (google.com: domain of newlib-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="newlib-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 13A1D386F438 for ; Thu, 11 Jan 2024 18:30:47 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2044.outbound.protection.outlook.com [40.107.92.44]) by sourceware.org (Postfix) with ESMTPS id 648243861012 for ; Thu, 11 Jan 2024 18:30:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 648243861012 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 648243861012 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.92.44 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704997838; cv=pass; b=MuC7LqIjge7q5InQxp/2qFwj6To/rk0AC5lTUbgBZf4AZpIg6oT/63wCLeWYiyGF/Hs5GWIPrQfBNj9axklTkqQHjeJPI4p88dGNAOChZSg3rqadHgPPlJlIHCQeTqkk9OqjGMjggUNqDoa3i91R4WdElSlDoetcaBzZ2ortZzc= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704997838; c=relaxed/simple; bh=rAS1XZVg2fV3w1057ja91LEXuq0zJX2lwIs/ce0ja9M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qU1BEJyvDkRIpfth3YnB4IgFuBTCiYSj+obf4iWtLT2cJwpSbO8bKHbpvYK1V1F9rTbknFMMez862HQP6JmiX6LVlEdA4Lbvi2TgrURV1U2FSeuxiv2pUdiLUo67hA9X3D+QzKoE9sT0Q2u1AJBshKTaPGx+WClcsii453R7iBE= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NKq+vjprEnWGoB5MSI3TVHdwyLo6YzwJQ+B21pSKkGUYj9CshPmnguZuH5kbzwZvF6qWo2F4QzvhNXeW7hVqJBzRQ25DDYDJMm5yqIJt6Q750iIAs4pUy39oi3V1y++/hkXjFxhU+C9uoH+B/MgiyUInF1+1+2muJNAPI9L2KWvCQg1aZDJYxBonxpSAgYRuU/jlRIzS51eLhoJyTFlK+jdQGhnEbP0FubwrEcsLj6FIf3dKju8WqySfoxk+aIi0hRQ9BfW4Qxk9qnmsWc4i6YMvIwKx06j6ToBH4cblAQqlG1lHe+5xXoroLX2D6loY1VqN2I8sSRiTA4mE7S630A== 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=FycWC45T3i07PYBvnQ5injtUceXIvEMMDsH5USuGSCM=; b=eWKUTZ3KBMKDF9oGzRk3446lA91rzWMN7s20mElK6wKev12ISEuY+leVHahiXFL3Q88LdV/ensbgl6wWYEvE9omw7UbTUg1pDZ5empNQk3eCNrEbAmSqnEEYYugnE+jXpNNFjAWrl9s31PyLhk7p7UBOAOL8/B8C2EK9CJZ5svLv0vniieIa6tx7uXXRnjktfQwco4TaI+wJfwRMLnUt/aTDsqaq/xP7be/GfPSzEb4w8aQTrlYbXRtPJK3V4DsOfgBf/Ce7Z/3R+9rc2FqIMioc8pevHQURwMWaUDQ271LcJOdQ86cR2vxhPwVFXcxA75twT3MoIQCpzjMMGyD+WA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FycWC45T3i07PYBvnQ5injtUceXIvEMMDsH5USuGSCM=; b=XLTlD3+mrBmGnRs1apbQfjSl3UXAQ5/pfQ6swZckGTkRyNsPcSg/1NWcAXCdIWB1HwdtD0/K62DwwFE13t0xvPOeuCHfEKUSGeEH1Nng5dV6s8l/wgVYYDjA7U0epjCzCHcTwrxYxyxEE4lzhCiS2j14kUj7OOJSHpzciXpbkzI= Received: from BYAPR05CA0062.namprd05.prod.outlook.com (2603:10b6:a03:74::39) by DM6PR12MB4330.namprd12.prod.outlook.com (2603:10b6:5:21d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Thu, 11 Jan 2024 18:30:30 +0000 Received: from DS3PEPF000099DC.namprd04.prod.outlook.com (2603:10b6:a03:74:cafe::78) by BYAPR05CA0062.outlook.office365.com (2603:10b6:a03:74::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.13 via Frontend Transport; Thu, 11 Jan 2024 18:30:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS3PEPF000099DC.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7181.14 via Frontend Transport; Thu, 11 Jan 2024 18:30:30 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 11 Jan 2024 12:30:29 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 11 Jan 2024 10:30:29 -0800 Received: from xirengwts09.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Thu, 11 Jan 2024 12:30:28 -0600 From: Neal Frager To: CC: , , , , Neal Frager Subject: [PATCH v5 1/1] configure.ac: configurable tooldir install path Date: Thu, 11 Jan 2024 18:30:19 +0000 Message-ID: <20240111183019.121397-1-neal.frager@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DC:EE_|DM6PR12MB4330:EE_ X-MS-Office365-Filtering-Correlation-Id: 54c891db-2aa8-412c-21fe-08dc12d363cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rzcndB9N7R0EVpySOUOqnkL7XMCTc+zEOWuAYXZfSkOX+Zn6r7WtZ62mqudB/KzSZdRMVB/zCfqa33FYo6S+vdlQTMcSWZ5v2GkhsYduxwNK8Xx4x+nr0EGQv8mm6jZFbEGIgrX1WUa0ml1qtNNEfgsFIZds9N3iPtmBjmr8yCQGVn9s6k24BmBwJzmMXpEVL0zV/McfkycW/9wmOCUyq01yjeNOwi6wsxQrs4gScghXqE5x5zcYcx5riTXgJCP257bJTVoKmXzHZuLLd0rr/4GbyK1lvEP80NWseafovvFPzqw724wHHFwh39eDYar+HmeOutkj7LWrYC6P1xbJK84DxVIkIvFXwQOO8hKIrTQlFIv2lh7qs34UpG5lkcps4rNOtSRJAPOdXDGFyTwrGa82OxKgiCoGnpNdgSGkg7fInn7Gyt8Fje8Q4hkcrFj+ARw1F75nTc+rOSry3G41HSm9Oqs2GQWcqFs6w6o8cQita2SrC+RXFhat/FHI7TaaS/m9HyU6JbDhuyFE969oIUcnBrqrKVk+ibpa7dkvh+KjD2i8N9rlvaMMG1QjYJs1exdndK3vZFG9saLUzHz3a+m73ZUd3umtTZWjxJADQ8dGBr7N467GJw+H5y7TwqZ/GZNDPTPmED1nuNQGFp5OyRQnw60uuuNPwpUGeGgOp5Kooyg/MeaBe6EyE4jgJ71Y/8qGlstu2l3VL7oWNOPty/rgQi3yF6W4j2j7y8ixlhXX0umXJ7hEY0ryv6Ryzf91jB7yPG+bfGmW3nt16sL/FQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(82310400011)(64100799003)(1800799012)(451199024)(186009)(36840700001)(40470700004)(46966006)(40480700001)(40460700003)(2906002)(5660300002)(478600001)(356005)(81166007)(44832011)(6916009)(4326008)(41300700001)(54906003)(8936002)(8676002)(82740400003)(1076003)(36756003)(316002)(70206006)(86362001)(6666004)(2616005)(336012)(83380400001)(426003)(26005)(47076005)(36860700001)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2024 18:30:30.0773 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 54c891db-2aa8-412c-21fe-08dc12d363cd X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4330 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces+patch=linaro.org@sourceware.org This patch is required to fix how the newlib headers are installed when using a sysroot install directory. The cross compiler expects headers to be in .../host/usr/arm-none-eabi/sysroot/usr/include/newlib.h by default newlib installed the headers into .../host/usr/arm-none-eabi/sysroot/usr/arm-none-eabi/include/newlib.h ${exec_prefix} provides the .../host/usr/arm-none-eabi/sysroot path ${target_noncanonical} provides an extra arm-none-eabi/ that must be removed. With this patch, users can specify the tooldir path that is needed. Signed-off-by: Neal Frager Co-developed-by: Chris Wardman --- V1->V2: - migrated patch to configure.ac - changed option name to --with-tooldir=PATH V2->V3: - removed quotes around ${with_tooldir} V3->V4: - migrated case to AS_CASE - migrated AC_MSG_WARN to AC_MSG_ERROR V4->V5: - remove unnecessary with_tooldir clear when erroring out --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f1bb72100..0badf1d30 100644 --- a/configure.ac +++ b/configure.ac @@ -2599,7 +2599,15 @@ esac # Some systems (e.g., one of the i386-aix systems the gas testers are # using) don't handle "\$" correctly, so don't use it here. -tooldir='${exec_prefix}'/${target_noncanonical} +AC_ARG_WITH([tooldir], + [AS_HELP_STRING([--with-tooldir=PATH], + [use given path to install target tools after build])], + [AS_CASE([x"$withval"], + [x/*],, + [AC_MSG_ERROR([argument to --with-tooldir must be an absolute path])]) + ], + [with_tooldir='${exec_prefix}'/${target_noncanonical}]) +tooldir=${with_tooldir} build_tooldir=${tooldir} # Create a .gdbinit file which runs the one in srcdir