From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 6D3DA3858C00 for ; Mon, 7 Nov 2022 13:50:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6D3DA3858C00 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-ej1-x62f.google.com with SMTP id q9so30381552ejd.0 for ; Mon, 07 Nov 2022 05:50:22 -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=8PvLVCzKtuL8Z7JX2jFNaWrbhq6pdizD9VMUyOU86pA=; b=VdFfHRpxagyt7vgFJjDgjkWegNP8tndsSdnh3xF3ku4DMOyvEypExdqaXBW9yolZ+e ybujhJTrtASTD9JBvf9nAWuVVLxrcrIAqRxtJ86no/TcDCBE6YWssfgae9/mrC/1CDDC K32xeJIIR+lZF91Emr+QBnRPGMptUbIML15zsZpLZODU+HljhjjGem3v7EWR7gsjxbM2 0fDshAHLIAXjcGFXo/NeY5VBF3KE+85fnnmlY5VqWofATDgFme7XdvOZ8NAw73nhPtV3 1LnV1hkAley3rqoUXUqhL48TXFw40ndybSyuHgfHohbKF7cUAiO7OtBUX2zyz6PsGQLw igXQ== 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=8PvLVCzKtuL8Z7JX2jFNaWrbhq6pdizD9VMUyOU86pA=; b=GA7vzGiMsuiyiEoEAgbRyyodK7j3JyUs3FMPIfK3OEunAWL1Vyu38NR4fHF3YnNxAC TTZTxwY4LMWbNntnLTzWuU1cLOJmw8AnqNPZ8XvuqRUYcYhXr3w1vJycaOE4pxzyr5wh iicLpsU0yK7XGG2wYpCp/jCykbW2UZY1mFvZlc2XnADRJ8bQhPzU4hAde15e0AKNQdB9 9g7tnRQacg+S9D1SfM55OuPClT3utbjcUpQ7ao6IWvEwsjepgtbDKapfUxS9pkmZKlOy 4f0cliofouXeiO/iLatTld38pXvNMJh6TaYhZus/KhD5/xIGTShs3iKjOp9g6CTztnuq FwXw== X-Gm-Message-State: ACrzQf2Mhh9K95hTuqHht5WtmzV9IyhX/cLaHj/zpP4SmsjwWU68N1mi PvHzF73bEjwfvwOrx4jqToVVR80YTr4tyA== X-Google-Smtp-Source: AMsMyM5WwNbH+f7va/k1+M6hyvc2CfvxkXTAXPnOTfyRvqX5P2KgHnszpL934uCBe5Umgl+M047Jew== X-Received: by 2002:a17:906:e44:b0:7ae:62b:3088 with SMTP id q4-20020a1709060e4400b007ae062b3088mr28434947eji.28.1667829019946; Mon, 07 Nov 2022 05:50:19 -0800 (PST) Received: from localhost ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id i28-20020a1709067a5c00b0077f20a722dfsm3418035ejo.165.2022.11.07.05.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 05:50:19 -0800 (PST) Date: Mon, 7 Nov 2022 13:50:18 +0000 From: Arnaud Charlet To: Matthias Klose Cc: GCC Patches Subject: Re: [ada, patch] fix libgnat build on x86_64-linux-gnux32 with glibc <= 2.31 Message-ID: <20221107135018.GA1845142@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=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,KAM_SHORT,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > This was introduced with the fix and backports of PR103530 on > x86_64-linux-gnux32 with older glibc versions (checked with 2.31), where > dladdr is still in the libdl.so library, and not included in libc.so as in > newer glibc versions. > Linking of libgnat.so fails with > > [...] > /usr/x86_64-linux-gnux32/bin/ld: s-trasym.o: in function > `system__traceback__symbolic__module_na > me__getXnn': > collect2: error: ld returned 1 exit status > make[8]: *** [gcc-interface/Makefile:677: gnatlib-shared-default] Error 1 > > https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=9d6c63ba490ec92245f04b5cbafc56abd28e8d22 > > -- a/gcc/ada/Makefile.rtl > +++ b/gcc/ada/Makefile.rtl > @@ -2650,13 +2650,18 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) > $(target_os))),) > s-tasinf.adb s-tpopsp.adb s-taspri.ads + $(TRASYM_DWARF_UNIX_PAIRS) \ > + s-tsmona.adb $(ATOMICS_TARGET_PAIRS) \ > $(X86_64_TARGET_PAIRS) \ > + $(GNATRTL_128BIT_PAIRS) \ > system.ads > The addition of s-tsmona.adb reference to dladdr, however not setting MISCLIB to -ldl as on other > architectures > > Proposed patch: > > > PR ada/107475 > * Makefile.rtl: Set MISCLIB for x86_64-linux-gnux32. > > > --- a/gcc/ada/Makefile.rtl > +++ b/gcc/ada/Makefile.rtl > @@ -2584,6 +2584,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) > $(target_os))),) > EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o > EH_MECHANISM=-gcc > THREADSLIB=-lpthread -lrt > + MISCLIB = -ldl > GNATLIB_SHARED=gnatlib-shared-dual > GMEM_LIB = gmemlib > LIBRARY_VERSION := $(LIB_VERSION) > > Ok for the trunk and the branches? Yes, thanks.