From patchwork Sun Apr 3 04:55:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 11606 Received: (qmail 108989 invoked by alias); 3 Apr 2016 04:55:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 108962 invoked by uid 89); 3 Apr 2016 04:55:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=objpfx, H*Ad:D*gentoo.org X-HELO: mail-pf0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5z1VloJp2eYOfOS+Wh/bulDgADWhStJVFN6AjzAd3wI=; b=fn6fEZCS53V2CNB4mpv7fRObo8c7MNsCd+vqkGUG66KcjX+AA906DPsTrS3CuibaQp qryKxHTarUXY2LIjaDV8/KmjqO3xCEPr35vYngd8jaIix2EeEMNQXbxiTrSO7w8tsy1y sG1erXMFVW03HGtOyP/kJD6KXT4qCNKI6vU+kLhuNqBCoaBrBMSulYLF09xKNjBPSde5 F6+nhEJgIsXCFE7IP+rusA7yZiZMLYU87oLYTltFL1Y91eBs8QAW5x3k+MvNii7I5bHn I+FBxkx8v+MulegxZnSE0alEXtuJ3kNg5zDrU3cLl0FOKj7ObeAUhCWRAsdrpXF4eoD8 pRVw== X-Gm-Message-State: AD7BkJIpRu2RKnp1zGPZe+fOCo72wSbAaBaXfK7MMHaLDkJbkw15ni3I+TCvDmgY/smI7Q== X-Received: by 10.98.93.1 with SMTP id r1mr10495141pfb.57.1459659332619; Sat, 02 Apr 2016 21:55:32 -0700 (PDT) From: Khem Raj To: libc-alpha@sourceware.org Cc: vapier@gentoo.org, Khem Raj Subject: [PATCH V4] When disabling SSE, make sure -fpmath is not set to use SSE either Date: Sat, 2 Apr 2016 21:55:25 -0700 Message-Id: <1459659325-22288-1-git-send-email-raj.khem@gmail.com> This fixes errors when we inject sse options through CFLAGS and now that we have -Werror turned on by default this warning turns to become error on x86 gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S -mno-sse -mno-mmx generates warning /dev/null:1:0: warning: SSE instruction set disabled, using 387 arithmetics where as gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S -mno-sse -mno-mmx -mfpmath=387 Generates no warnings Signed-off-by: Khem Raj --- Changes since v1: - Add BZ enry to ChangeLog and commit message Changes since v2: - Add commentary in makefile, describing why the change is needed Changes since v3: - Make commentary in makefile to be precise ChangeLog | 6 ++++++ sysdeps/i386/Makefile | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4fc73b1..6d2fd80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-03-31 Khem Raj + + [BZ #17950] + * sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os): + Add -mfpmath=387. + 2016-03-31 Adhemerval Zanella * elf/tst-dlsym-error.c: Include for strchrnul. diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index 168512f..6c91842 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -88,8 +88,9 @@ ifeq ($(subdir),elf) # Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters # which must be preserved. +# With SSE disabled, ensure -fpmath is not set to use sse either. CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ - -mno-sse -mno-mmx) + -mno-sse -mno-mmx -mfpmath=387) tests-special += $(objpfx)tst-ld-sse-use.out $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so