From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 862593881D1E for ; Wed, 8 Feb 2023 11:12:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 862593881D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x434.google.com with SMTP id o18so16372618wrj.3 for ; Wed, 08 Feb 2023 03:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FRdSgsZCRQdqSTw9FVKUU86GdAfWDtx5dXJKzuCWF/I=; b=Oa3P8scv13hL80cA5Sjoy5IB025jxNj9W29mcNv/BeWgvGhI1a3JPeJYZxehmjeBBu dCCJMy7vbScBYMxdbamkpUyw9mGYB+o4Iazu0WikAQzScU4qHvpeCnmQc5cSbqAuvn/w 4GGDufCgyfwLzBko/dthYQGfG2f0frJmq9dRpA7I12cfETc1Sx6hD6VmPrwHGKWCmCPS MDLQpTtZxC5fhFY4xwmKE9hdJ/iPOxonLvmwqIUztEz01mn+xh/bFEfIfWyEkL9KREgm WENRrr82r2qmhkIiGPqIwhXSKa5y4oUZPpiCpqZfUXAdMJvmn3ADvxxGDJ9LaTU4E/dy kyDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FRdSgsZCRQdqSTw9FVKUU86GdAfWDtx5dXJKzuCWF/I=; b=rSW9Z03/VFZ+1guv7px8nnsyC37bD/0HcNGy8XQW5XGBQOxHm1wzZMrFx/3KaDJFCs 3BE2ez4echdyZqSqs/wyDPZCra3cA9GVJuIvnzVv7k2awUf0jhykTCwO2PLRtEaYzapa Zwbkuf8n7Dl1k1Mtc2NdlJhlvP+yGM/GakzrZ5fyCXKMV7V+u//MYOjZH4gaCl3/aFVh qlYj1ACvtUgbDaj9HV6MZY7mwlFRq42YiTJO17FkhOgNisZh99aoidgvE+TWH9exBrNW zWYKSAhlasPS0s9+K16/CdZ5MCzHSFJjGqVH8EfMBdJKp+MbaaCJYDljQIkfOUsLyNed 8LOw== X-Gm-Message-State: AO0yUKVNTCWX63Hf6cRZFo147yCYu0cOJXq41vd0PKaqK1hFHJslphCQ sRD/Stc8uWhMlQTvSd34ekNaTo8x3dSbjIljA2c= X-Google-Smtp-Source: AK7set/+F3NFiEs9JOLdB7fAy6s6sremoppILjk29Egq79mMCzlO4GGZ7lYCwjklwwuYSztppXoeew== X-Received: by 2002:a5d:6791:0:b0:2c3:f00c:ebaa with SMTP id v17-20020a5d6791000000b002c3f00cebaamr6264338wru.4.1675854758186; Wed, 08 Feb 2023 03:12:38 -0800 (PST) Received: from localhost ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id o7-20020a05600002c700b002be5bdbe40csm14399491wry.27.2023.02.08.03.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 03:12:37 -0800 (PST) Date: Wed, 8 Feb 2023 11:12:37 +0000 From: Arnaud Charlet To: ????????? Cc: Eric Botcazou , Marc Poulhi??s , gcc-patches@gcc.gnu.org, Arnaud Charlet Subject: Re: [PATCH] ada: Fix musl build on Linux Message-ID: <20230208111237.GA2248480@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,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 List-Id: > The commit "ada: Add PIE support to backtraces on Linux" [1] use > _r_debug under Linux unconditionally. It is incorrect since musl[2] > libc not defined _r_debug like glibc [3]: > > extern struct r_debug _r_debug; > > As far as I know, only glibc and uClibc [4] define the global variable > _r_debug. > > > [1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=f2b30a724e6bf7ff8e591b176967d596cee7648e;hp=83e8d37fe39d7c1afce19b61bbc2dd828fa37c6f > [2] https://git.musl-libc.org/cgit/musl/tree/include/link.h#n39 > [3] https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/link.h;h=3b5954d9818e8ea9f35638c55961f861f6ae6057;hb=HEAD#l66 > [4] https://git.uclibc.org/uClibc/tree/include/link.h#n71 > > OK? Bootstrapped and tested on aarch64-linux-(gnu|musl), > riscv64-linux-(gnu|musl) and x86_64-linux-(gnu|musl) with no regressions. OK, thanks, > gcc/ada/ > > * adaint.c [Linux]: Include . > (__gnat_get_executable_load_address) [Linux]: Enable only for glibc & uClibc > on Linux.