Message ID | c12f3e33-3ccc-4c78-20b1-6e64049d74dc@ubuntu.com |
---|---|
State | Corrupt patch |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2380324wru; Mon, 31 Oct 2022 08:34:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM71bcy5fspy+L14C3AUzRa3wsgZd1rTp/V6ZxfbaB90bVqInXTjkRSllazIfIvEoJMyTLGP X-Received: by 2002:a17:907:6297:b0:72f:9aad:fcb with SMTP id nd23-20020a170907629700b0072f9aad0fcbmr13310184ejc.161.1667230453878; Mon, 31 Oct 2022 08:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667230453; cv=none; d=google.com; s=arc-20160816; b=UCG8lRi+pG8yGu6//o9i38vCyPvYY/KzOCziecijqscS1NDWpQKNIU4ulRY55240MP Ae0BKdxy4dRZ3Dn4hFVd79S0SMP20KDEgDyhrLARODl73ncywUJNybtj8KJTc5RzICI8 cDDQ2s0vtxrTuLyoCVH+OgENEkscTjG1cZReTSA3ynr4GyzEj4eEXR+f6m0y2JaRqKzt DiJgT6TUwNkRs0W1pjnzKLQJYQQVjPX7+NKIVTlkeYOjZfc+2+4StqcO5lvVNxVR/KeH mjI78lJMDYNgpBM51up1QQGV9mnC6DXInVwwO7mL+yB2e5zH8WeSzgzWlTXgUizKqQOj SveQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :subject:from:to:content-language:user-agent:mime-version:date :message-id:dmarc-filter:delivered-to; bh=rNK3oq0Y7JTA6Cgw47b3Ga47MRNj4AKscwZSjKujLgQ=; b=OTrMNNjw+SarheFQAndExe74uLbtMkDsa78XKpcdyRk3LSkaeHIPTH11FR5HZynbg8 zZIdVjzBcn7G6ltAa2lt/6MNpBXtf+jO9sBFEUDRjJsY9031sdFzG+1jywJBOMfRah9G onLRj6TtFVwy7X3Z+wci1hl1+UBQZJaifSD55ZJY3GXymJk7rgQKrk9DjF3QVd0hViBG CTbi0088z/W+YDMrzT2aMZcp8OmF2P1zmztk3VYgnugglaE0NP1iTC3+G1uwzbrha8Wn 3mcfisJibmzfuZMVHtET732WhPAkD06DfC/ByOlC9XDbjOp9OMoaciiOioOaMrhPfM0R TqNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id sg18-20020a170907a41200b007adc5c4626bsi5809802ejc.50.2022.10.31.08.34.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 08:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 107813853579 for <ouuuleilei@gmail.com>; Mon, 31 Oct 2022 15:34:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from einhorn-mail-out.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by sourceware.org (Postfix) with ESMTPS id 8A3B13853835 for <gcc-patches@gcc.gnu.org>; Mon, 31 Oct 2022 15:33:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8A3B13853835 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ubuntu.com X-Envelope-From: doko@ubuntu.com X-Envelope-To: <gcc-patches@gcc.gnu.org> Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 29VFXgjU271924 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Mon, 31 Oct 2022 16:33:42 +0100 Message-ID: <c12f3e33-3ccc-4c78-20b1-6e64049d74dc@ubuntu.com> Date: Mon, 31 Oct 2022 16:33:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: GCC Patches <gcc-patches@gcc.gnu.org> From: Matthias Klose <doko@ubuntu.com> Subject: [ada, patch] fix libgnat build on x86_64-linux-gnux32 with glibc <= 2.31 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, JMQ_SPF_ALL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, KAM_SHORT, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748217840685448017?= X-GMAIL-MSGID: =?utf-8?q?1748217840685448017?= |
Series |
[ada] fix libgnat build on x86_64-linux-gnux32 with glibc <= 2.31
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Matthias Klose
Oct. 31, 2022, 3:33 p.m. UTC
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<libgnarl/s-tasinf__linux.adb \ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ s-taspri.ads<libgnarl/s-taspri__posix.ads \ + $(TRASYM_DWARF_UNIX_PAIRS) \ + s-tsmona.adb<libgnat/s-tsmona__linux.adb \ $(ATOMICS_TARGET_PAIRS) \ $(X86_64_TARGET_PAIRS) \ + $(GNATRTL_128BIT_PAIRS) \ system.ads<libgnat/system-linux-x86.ads The addition of s-tsmona.adb<libgnat/s-tsmona__linux.adb pulls in the 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. LIBRARY_VERSION := $(LIB_VERSION) Ok for the trunk and the branches? Matthias
Comments
> 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<libgnarl/s-tasinf__linux.adb \ > s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ > s-taspri.ads<libgnarl/s-taspri__posix.ads \ > + $(TRASYM_DWARF_UNIX_PAIRS) \ > + s-tsmona.adb<libgnat/s-tsmona__linux.adb \ > $(ATOMICS_TARGET_PAIRS) \ > $(X86_64_TARGET_PAIRS) \ > + $(GNATRTL_128BIT_PAIRS) \ > system.ads<libgnat/system-linux-x86.ads > > The addition of s-tsmona.adb<libgnat/s-tsmona__linux.adb pulls in the > 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.
--- 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