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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 08A033858D35 for ; Fri, 14 Jan 2022 12:40:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 08A033858D35 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-378-TIw7qHRCNM2-M1dLrFM9Qg-1; Fri, 14 Jan 2022 07:40:06 -0500 X-MC-Unique: TIw7qHRCNM2-M1dLrFM9Qg-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 9962C84BA40; Fri, 14 Jan 2022 12:40:05 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AD367CD6B; Fri, 14 Jan 2022 12:40:03 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Cc: "H.J. Lu" , Stefan Liebler , Tulio Magno Quites Machado Filho Subject: [PATCH 0/7] Reliable CPU compatibility diagnostics in ld.so X-From-Line: 201e517c6a751bebe505af99e35a9f8643066f31 Mon Sep 17 00:00:00 2001 Message-Id: Date: Fri, 14 Jan 2022 13:40:02 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 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 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2022 12:40:18 -0000 This series enables reliable CPU compatibility diagnostics by building the early parts of the dynamic loader with an older ISA level than the rest of glibc. I tested this with our POWER9 build flags (running on POWER8), and with -march=x86-64-v4 on a x86-64-v3 system. In both cases, an accurate erorr is printed. Also built with build-many-glibcs.py, and tested on i686-linux-gnu and x86_64-linux-gnu,. Florian Weimer (7): x86: HAVE_X86_LAHF_SAHF, HAVE_X86_MOVBE and -march=x86-64-vN (bug 28782) Generate gcc-macros.h elf: Split dl-printf.c from dl-misc.c Add --early-cflags configure option powerpc64le: Use in early HWCAP check x86: Add x86-64-vN check to early startup s390x: Use in early HWCAP check Makeconfig | 9 + config.make.in | 1 + configure | 13 + configure.ac | 6 + elf/Makefile | 10 +- elf/dl-misc.c | 281 +---------------- elf/dl-printf.c | 292 ++++++++++++++++++ manual/install.texi | 7 + sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h | 9 +- sysdeps/s390/s390-64/dl-hwcap-check.h | 5 +- sysdeps/x86/Makefile | 1 + sysdeps/x86/configure | 4 +- sysdeps/x86/configure.ac | 4 +- sysdeps/x86/dl-get-cpu-features.c | 31 +- 14 files changed, 384 insertions(+), 289 deletions(-) create mode 100644 elf/dl-printf.c base-commit: 4997a533ae4b51ef66a6b68862b7578a7acb82df -- 2.34.1