From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 4239638708B9 for ; Tue, 13 Oct 2020 17:26:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4239638708B9 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-32-6uszZka_NfqhTwkicH5TOw-1; Tue, 13 Oct 2020 13:26:52 -0400 X-MC-Unique: 6uszZka_NfqhTwkicH5TOw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 340698D2077 for ; Tue, 13 Oct 2020 17:26:23 +0000 (UTC) Received: from blade.nx (ovpn-115-18.ams2.redhat.com [10.36.115.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 047AE183AB for ; Tue, 13 Oct 2020 17:26:23 +0000 (UTC) Received: from blade.com (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 28D1C816CD2E for ; Tue, 13 Oct 2020 18:26:22 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 0/2] Fix gdb.base/print-file-var.exp with Clang Date: Tue, 13 Oct 2020 18:26:16 +0100 Message-Id: <1602609978-28112-1-git-send-email-gbenson@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 17:26:55 -0000 Hi all, The C++ parts of gdb.base/print-file-var.exp failed to build with Clang because the "-x c++" option added by gdb_compile caused the compiler to attempt to parse .so files as C++. Not only did this fail to compile, it also resulted in a MAHOOSSIVE gdb.log of over 100Mb for that single test, as Clang happily dumped the "lines" of the binary file it felt violated the C++ standard. The first patch of this series adds code to gdb_compile to detect this situation and report an error. The second patch is the actual fix: it separates the options for the compiler and linker into two lists, and uses build_executable_from_specs to perform the build as it can handle this separation. Checked on Fedora 32 x86_64, with GCC and Clang. Is this ok to commit? Cheers, Gary -- Gary Benson - he / him / his Principal Software Engineer, Red Hat