From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80731 invoked by alias); 17 Jan 2019 13:51:49 -0000 Mailing-List: contact libabigail-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Id: List-Subscribe: Sender: libabigail-owner@sourceware.org Received: (qmail 80710 invoked by uid 89); 17 Jan 2019 13:51:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*mark, Dodji, dodji X-Spam-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: relay3-d.mail.gandi.net Received: from relay3-d.mail.gandi.net (HELO relay3-d.mail.gandi.net) (217.70.183.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Jan 2019 13:51:45 +0000 X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodj@seketeli.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A9FE160008; Thu, 17 Jan 2019 13:51:41 +0000 (UTC) Received: by localhost (Postfix, from userid 1001) id 370611A061E; Thu, 17 Jan 2019 14:51:40 +0100 (CET) From: Dodji Seketeli To: Mark Wielaard Cc: libabigail@sourceware.org Subject: Re: Buildbot failure in Wildebeest Builder on whole buildset Organization: Me, myself and I References: <20190117100851.0E597800729@builder.wildebeest.org> X-Operating-System: Red Hat Enterprise Linux Server 7.6 X-URL: http://www.seketeli.net/~dodji Date: Tue, 01 Jan 2019 00:00:00 -0000 In-Reply-To: (Mark Wielaard's message of "Thu, 17 Jan 2019 11:21:31 +0100") Message-ID: <86tvi7bdeb.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-q1/txt/msg00004.txt.bz2 Hello Mark Mark Wielaard a =C3=A9crit: > From: Mark Wielaard > Date: Thu, 17 Jan 2019 11:19:02 +0100 > Subject: [PATCH] Define DW_LANG_C_plus_plus_02 and DW_LANG_Rust when unkn= own. > > Older elfutils (pre-0.170) don't define these constants in dwarf.h. > > * src/abg-dwarf-reader.cc: Define DW_LANG_C_plus_plus_03 > and DW_LANG_Rust when undefined. Thanks for the patch! I have ended adds support for DW_LANG_Rust and DW_LANG_C_plus_plus_03 in there. Pff, and I totally forgot about these pesky old systems (:->-> > Signed-off-by: Mark Wielaard > --- > src/abg-dwarf-reader.cc | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc > index c9cffc3..aed79f1 100644 > --- a/src/abg-dwarf-reader.cc > +++ b/src/abg-dwarf-reader.cc > @@ -66,6 +66,15 @@ ABG_END_EXPORT_DECLARATIONS > #define UINT64_MAX 0xffffffffffffffff > #endif >=20=20 > +/* Older elfutils dwarf.h might not define these language constants. */ > +#ifndef DW_LANG_C_plus_plus_03 > +#define DW_LANG_C_plus_plus_03 0x0019 > +#endif > + > +#ifndef DW_LANG_Rust > +#define DW_LANG_Rust 0x001c > +#endif > + So, in that same file, in the function dwarf_language_to_tu_language, the was we handle all "new" language enumerators (i.e, the DW_LANG_something enumerators) is by guarding their use with #ifdef DW_LANG_something, rather than defining them as you are proposing here. So, at least for the sake of consistency, I'd rather handle these two new language enumerators in a similar way. So, below is what I have committed to master. Thanks again for taking time to send a patch for this. Cheers, commit 2366dca947478b0e69841337fcfec619a5edc0d9 Author: Mark Wielaard Date: Thu Jan 17 11:19:02 2019 +0100 Conditionalize the use of DW_LANG_C_plus_plus_03 and DW_LANG_Rust =20=20=20=20 Older elfutils (pre-0.170) don't define these constants in dwarf.h so don't use them in that case. =20=20=20=20 * include/abg-ir.h (LANG_C_plus_plus_03): Add this new language enum to "enum translation_unit::language". * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Do not use DW_LANG_Rust or DW_LANG_C_plus_plus_03 if these are not defined. (get_default_array_lower_bound): Handle the new translation_unit::LANG_C_plus_plus_03 enumerator. =20=20=20=20 Signed-off-by: Mark Wielaard Signed-off-by: Dodji Seketeli diff --git a/include/abg-ir.h b/include/abg-ir.h index 49910e8..c0b5e7b 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -537,6 +537,7 @@ public: LANG_C99, LANG_C11, LANG_C, + LANG_C_plus_plus_03, LANG_C_plus_plus_11, LANG_C_plus_plus_14, LANG_C_plus_plus, diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index c9cffc3..aa9d147 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -12199,9 +12199,6 @@ dwarf_language_to_tu_language(size_t l) case DW_LANG_Ada83: return translation_unit::LANG_Ada83; case DW_LANG_C_plus_plus: - case DW_LANG_C_plus_plus_03: - case DW_LANG_C_plus_plus_11: - case DW_LANG_C_plus_plus_14: return translation_unit::LANG_C_plus_plus; case DW_LANG_Cobol74: return translation_unit::LANG_Cobol74; @@ -12229,7 +12226,9 @@ dwarf_language_to_tu_language(size_t l) return translation_unit::LANG_ObjC; case DW_LANG_ObjC_plus_plus: return translation_unit::LANG_ObjC_plus_plus; +#ifdef DW_LANG_Rust case DW_LANG_Rust: +#endif return translation_unit::LANG_Rust; #ifdef DW_LANG_UPC case DW_LANG_UPC: @@ -12251,6 +12250,11 @@ dwarf_language_to_tu_language(size_t l) return translation_unit::LANG_Go; #endif =20 +#ifdef DW_LANG_C_plus_plus_03 + case DW_LANG_C_plus_plus_03: + return translation_unit::LANG_C_plus_plus_03; +#endif + #ifdef DW_LANG_C_plus_plus_11 case DW_LANG_C_plus_plus_11: return translation_unit::LANG_C_plus_plus_11; @@ -12300,6 +12304,7 @@ get_default_array_lower_bound(translation_unit::lan= guage l) case translation_unit::LANG_C99: case translation_unit::LANG_C11: case translation_unit::LANG_C: + case translation_unit::LANG_C_plus_plus_03: case translation_unit::LANG_C_plus_plus_11: case translation_unit::LANG_C_plus_plus_14: case translation_unit::LANG_C_plus_plus: --=20 Dodji