From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 09:30:21 2024 Received: (at submit) by debbugs.gnu.org; 2 Jun 2024 13:30:21 +0000 Received: from localhost ([127.0.0.1]:58096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDlHw-00045W-Rb for submit@debbugs.gnu.org; Sun, 02 Jun 2024 09:30:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:59546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDlHt-00045M-Kk for submit@debbugs.gnu.org; Sun, 02 Jun 2024 09:30:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDlHg-0000Ei-S2 for bug-guix@gnu.org; Sun, 02 Jun 2024 09:30:05 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDlHe-0005Dy-FX for bug-guix@gnu.org; Sun, 02 Jun 2024 09:30:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-23sep; t=1717334994; bh=81xlZQeE1hdwKLQdEfZWyaNvotN2IifT8x5U4I8gobY=; h=Message-ID:Date:User-Agent:To:Content-Language:From:Subject: Content-Type:From; b=YRXlY8JZ0aZTaPcgLpDlT01/Ew7LTXgcc/9Nl37hEp1U+2nr86LGLKWrXxs+OV7kD B5+i1wVd2wNuz62Q9EPkY9MVn4b/ognF6EsZQjjDwFrlyWV21RjZ9k5+AcyA9kUwlT 0fMqEyw0x8QYwuOGkbXqxnS6JKt0pG5aYr7PdF5A= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4Vsd4y4Xw7z1yCm for ; Sun, 2 Jun 2024 13:29:54 +0000 (UTC) Received: from [10.11.12.13] (aftr-62-216-210-34.dynamic.mnet-online.de [62.216.210.34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4Vsd4t2w8SzMkrt for ; Sun, 2 Jun 2024 13:29:47 +0000 (UTC) Message-ID: Date: Sun, 2 Jun 2024 15:29:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: bug-guix@gnu.org Content-Language: en-US From: Stefan Subject: ld-wrapper does not handle all possibilities to specify libraries and their search paths Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-purgate-type: clean X-purgate: clean X-purgate-size: 810 X-purgate-ID: 155817::1717334990-6D7F8BA7-E56B13F3/0/0 Received-SPF: pass client-ip=145.253.228.166; envelope-from=stefan-guix@vodafonemail.de; helo=mr6.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi! Beside using an absolute path, the ld of Binutils has eight ways¹ to pass a library like libfoo.so via options: -lfoo -l foo -library=foo --library=foo -l:libfoo.so -l :libfoo.so -library=:libfoo.so --library=:libfoo.so The ld-wrapper however only supports one of these possibilities, which is the most common: -lfoo. GCC itself does not support the -[-]library= variants. Similarly there are four ways to specify a library search path /bar for ld: -L/bar -L /bar -library-path=/bar --library-path=/bar The ld-wrapper only supports the first two. GCC itself does not support the -[-]library-path= variant. The lld form the LLVM project supports all these different options as well. Bye Stefan ¹