From patchwork Fri Oct 20 12:37:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw (lists)" X-Patchwork-Id: 828646 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-464625-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XsRYoqFw"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yJQKt6T9Vz9t5x for ; Fri, 20 Oct 2017 23:37:22 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=hsM/IrVwhkU+bASUPr1lMn7rmO9ydRMnhs7PI9HCibzETgj7c8 D+8wS832Y8lgD6/SPYvWwaCajiUWFTQAn+E/o6W+jp0T/SgS4ZPM2zWGmXBrC5/v PBP5PCKFZ7STRTw6CjEz7kGw2jNeCogVTFfLJGqftElUwiEWn1Up9MlsM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=EDkJKBe8CYlRMHubZks1KbpOgk4=; b=XsRYoqFwKP4BbkwFDBdr gLTWMBs2fDm9cbQyrbl3Hn1umc7m7OeAyFRLK2bqZZ57/Q2IBwHs+/MvcFD+v0Q+ AKhoBAbRnZ5b8eYkYLPRYmIVvje04GslLh2bT8/aK/P8UCBghvXVo/WCXe/XoPdC yaWvj6o4sD3Pmt0jD54qqyw= Received: (qmail 56039 invoked by alias); 20 Oct 2017 12:37:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 56025 invoked by uid 89); 20 Oct 2017 12:37:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=s X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Oct 2017 12:37:11 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B775F; Fri, 20 Oct 2017 05:37:10 -0700 (PDT) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B9C103F25D; Fri, 20 Oct 2017 05:37:09 -0700 (PDT) To: gcc-patches From: "Richard Earnshaw (lists)" Subject: [arm] Fix architecture selection when building libatomic with automatic FPU selection Message-ID: Date: Fri, 20 Oct 2017 13:37:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Libatomic builds a few functions for Arm with an explicit -march option. This option does not specify an FPU, which can lead to problems when targeting a hard-float or softfp environment since the architecture appears to be incompatible with the selected ABI. This is some fallout from the move to making the FPU be automatically detected from the CPU/architecture. The fix is simple enough, just add +fp (the minimum floating point option) to the architecture. We don't use anything from the FP architecture, so it shouldn't really change anything; and if we are building for -mfloat-abi=soft the canonicalization process will remove the unnecessary fp attributes anyway. +fp is essentially the same as the previous default behaviour of defaulting to the base FP architecture in these circumstances. * Makefile.am: (IFUNC_OPTIONS): Set the architecture to -march=armv7-a+fp on Linux/Arm. * Makefile.in: Regenerated. Committed to trunk. diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am index d731406..9c45700 100644 --- a/libatomic/Makefile.am +++ b/libatomic/Makefile.am @@ -123,7 +123,7 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS))) ## On a target-specific basis, include alternates to be selected by IFUNC. if HAVE_IFUNC if ARCH_ARM_LINUX -IFUNC_OPTIONS = -march=armv7-a -DHAVE_KERNEL64 +IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) libatomic_la_LIBADD += $(addsuffix _8_2_.lo,$(SIZEOBJS)) endif diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in index f6eeab3..0f0382e 100644 --- a/libatomic/Makefile.in +++ b/libatomic/Makefile.in @@ -346,7 +346,7 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ $(am__append_3) -@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a -DHAVE_KERNEL64 +@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES)