From patchwork Sat Jan 7 10:53:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 62831 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF5123858414 for ; Sat, 7 Jan 2023 10:54:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF5123858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673088861; bh=J8BTyZ8zrruwgA19Vx7fK1hs6Tybxn5NCwcgPpEqBCs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=UbPmMGzA/QhuiGwh06wLEjugMaacRHRkjlgrTpd78/vrqEvV8RW1ihaWO3C5ugxCq sEsjbLVXD3aAbsvXUisKOdUrpX1tWEVZX15sPnFjz7IljSoDSWWWnhasj9p/bgTQmx jQ1PX+8yCFtzLC6RvsRRN2WhznvuWwx0UpGviKvE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 7E4CE3858D33 for ; Sat, 7 Jan 2023 10:53:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E4CE3858D33 Received: by mail-wr1-x430.google.com with SMTP id w1so3420547wrt.8 for ; Sat, 07 Jan 2023 02:53:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=J8BTyZ8zrruwgA19Vx7fK1hs6Tybxn5NCwcgPpEqBCs=; b=GSS67h2WAaFfhr6VuBQiVOT2vqsCFZ8SdB189O8YmmDEgApusTvqLOdBPDNLu2f1tZ Ks0cMbdMbfLPDaxVM5GoY7E8iYhR1gaw6J9E33cT8HhaqdSizQQ7jFG4bBb2hx43JgW6 iZ2qco6pDTpHJdEUa7pISUUCybtU2/V8tR9sys16cheprAnyHjsl5u8luZ5MLbhXYhDu z3/FAKCPGGi5WISRu0rV2QwscCsuIAyUgIHeLrKtIKZPfuKxjNevyRNe8WRmPDF/Xkps 5QqRg15SFp846pPIxzwNoAjoU6mnZD5fGKx4TsIeIt/3Kzcu34Qnd4kTULPxOJyTQbth 95/w== X-Gm-Message-State: AFqh2koZAxH85Ngh3m9Cb+nl1oZQlEIMpNdNAGEOMzVSR9AFd3zhTqL/ oYDzYZ4OvP+P6CFvmp94pq99FBGuFQ4= X-Google-Smtp-Source: AMrXdXu0Qdyr49vt0YxFTXIIVcAuOzQvBJxOgYNlkcW6HB+xGP6Al+pMWjCGgVso5UlAjxMlY/nevQ== X-Received: by 2002:a5d:44c9:0:b0:2bb:dc8e:3d5f with SMTP id z9-20020a5d44c9000000b002bbdc8e3d5fmr118771wrr.67.1673088831080; Sat, 07 Jan 2023 02:53:51 -0800 (PST) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id m7-20020adffe47000000b002b880b6ef19sm3484055wrs.66.2023.01.07.02.53.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 07 Jan 2023 02:53:50 -0800 (PST) X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [PATCH] modula-2, driver: Do not add extra '-L' options that shadow $libdir. Date: Sat, 7 Jan 2023 10:53:49 +0000 Message-Id: <20230107105349.92210-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) MIME-Version: 1.0 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Sandoe via Gcc-patches From: Iain Sandoe Reply-To: iain@sandoe.co.uk Cc: Iain Sandoe , gaiusmod2@gmail.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" tested on x86_64-linux-gnu, i686, powerpc, x86_64 darwin, note that this patch does expose PR108261 (but that is a separate issue). OK for trunk? thanks Iain --- 8< --- The driver is adding one '-L' option for each path to libm2xxx.a which is shadowing $libpath where the shared libraries are installed. This prevents the shared libraries from being found (there are also convenience libs in $libdir, so the additional -L options are not needed). gcc/m2/ChangeLog: * gm2spec.cc (add_default_combination): Do not add extra library paths for the libm2xxx.a libraries. --- gcc/m2/gm2spec.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/m2/gm2spec.cc b/gcc/m2/gm2spec.cc index dbfd1cacccc..f6d216269c1 100644 --- a/gcc/m2/gm2spec.cc +++ b/gcc/m2/gm2spec.cc @@ -289,7 +289,6 @@ add_default_combination (const char *libpath, const char *library) { if (library != NULL) { - append_option (OPT_L, build_archive_path (libpath, library), 1); append_option (OPT_l, safe_strdup (library), 1); return true; }