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: 116490 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1640234qgn; Fri, 20 Oct 2017 05:37:26 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RPXBVPyACqMn8ZV8oQ+feVcCFWBU+8nxCmv3ohEdu5PcBcTXn+YWVOjP1Uwhzd+MDetd0y X-Received: by 10.84.131.40 with SMTP id 37mr4072824pld.185.1508503046399; Fri, 20 Oct 2017 05:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508503046; cv=none; d=google.com; s=arc-20160816; b=g8cYzI/AR5qO4bUu09bZ6cev9gf1RCYdGX09Usaws/MAOV4k08PhBVM44otvGku7Vr Fccu6BjkbAyNAe3IdmQ4EEmEKn4ccrg/41EELZ9LVxdhD31B2xyX5K7zTy5djr/Suqgh TycPvV0JclG6gcgD8RNYlvkgMQVlI4xF09N08qOQvfEA9gIRxxli73Dh7XvHo+MdGAUV jSvOkkcMRhoQNPRzotWNBxciTHVuaIHAzgcmBYpoNh6uzFO07x0kUN9R4f2iKRP6PKNP yRTGSaVtaotQFXOcrIthuX1l1dA3/W9Xddxmq0R3lwBdhlT85ToCZMSaY4BKy0wH9NBx 9YjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:date:message-id:subject:from:to :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=rcv8YDMKc/xXPS4srOxnjaCt1/z1dVb1Cw73Q//nH+U=; b=LrYhz7aPo1QCorPf3Vw8whEscflMRMli46SPPYF+wJAP5rFwTH1rojdltlZhwRX0Pf qaN4wHCmrc7LtaHyHKd/4jJIUZTXVmCK/ruTlcbTY6NDOYRQRUgDNipri8qjCGrY9bn9 laOWbX2AX+yTr8/nYfauPOVef5ld5mL4dlTxRKXsBZcWmQJKayzupUfyW8PWm8bHeago msi/g4Enw8ubOVdbBer8b4Au80HqybqZfgxoENC5Bmfa0q+9ti3STAqP+7xNGfpGMDeT TmY63sK1RnKSxmbHlwiFD3AJoP7eYU1fxYL3uEEZn7qLQoYUr0dpM/fPCw6zp2WvSSsz xJ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=M6S72VOS; spf=pass (google.com: domain of gcc-patches-return-464625-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-464625-patch=linaro.org@gcc.gnu.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id v187si742506pfv.301.2017.10.20.05.37.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2017 05:37:26 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-464625-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=M6S72VOS; spf=pass (google.com: domain of gcc-patches-return-464625-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-464625-patch=linaro.org@gcc.gnu.org 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=fpKAkH9vpnFnDCUK0KJkN85QcTEu8tZa1mrGICfuK0Y7yUI/Jg 1Cnl+WCR/OYVj4RPjl5Y0xgbeqGROainP6i/fSRmpslfik7ZajJ/TZdFQee6eGF9 hJEaZD7PPkfc1kAOKzlgHrXzwbTP/vEtbSrRcnT0CW8R/Bi4nIo4E5l0o= 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=M6S72VOS9VEz1EqDjd/O 8GB0BSvp5QiFY8rKUsMXvsDc+NWHsm7l+YRyS4vOPDTv3r/HySPqYBWLaDncyoKW M3lv6giGI7DnzhbeWr+5vVqGasdwWWgwxzjKZDz5MHQL5CrJfSyWj6lz2cvh1Mgo 7t/bBasOexi8qlXRRgv/a0Y= 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)