From patchwork Tue May 22 08:19:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 918079 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=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-92651-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="csq1buoP"; 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 40qpVF0KMbz9s5w for ; Tue, 22 May 2018 18:20:04 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= gOkDIL79L9kRQaSCfX1Nb64H2zhv+1M37kOyPHzje5pwwkoGCdtB54GFuSzYdT0b 2ym/vEv+dtB8stZmlvms8mWM5CNVvA+Z00w74prZvQSDq0BGFkU4/N2NqlKthVmp v5lESMHWnXqrgUTJ395nIn8VzAPo9SDhGjfQFrDCP38= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=FqaPbn Ys9pqGdkh3IZxoM2CtqJI=; b=csq1buoPi8SatIleaIDtsdSQA4oNiSEovYSKz9 PGnZDxepxQX2rqfo9rMthM0mWC8kEVD7RWApGH76pb9Wv3GKpvyQwfxxSxTSzgtS iaZyG2noVijfuvVTo+0Snm3kIulhfJoSWXhGA+DGvryg5uRFvrlR+o8MvMkumuf8 pG2Ag= Received: (qmail 43621 invoked by alias); 22 May 2018 08:19:57 -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 43304 invoked by uid 89); 22 May 2018 08:19:31 -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, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Date: Tue, 22 May 2018 10:19:27 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] i386: Do not attempt to change stack alignment User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20180522081927.7608F416529F7@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) All supported GCC versions handle stack alignment as expected. 2018-05-22 Florian Weimer i386: Do not attempt to change stack alignment. All supported GCC versions handle stack alignment as expected. * sysdeps/i386/Makefile [$(subdir) == math] (sysdep-CFLAGS): Do not add -mpreferred-stack-boundary=4. [$(subdir) == csu] (sysdep-CFLAGS): Likewise. (stack-align-test-flags): Likewise. [$(subdir) == stdlib] (CFLAGS-exit.c, CFLAGS-cxa_finalize.c): Likewise. [$(subdir) == elf] (CFLAGS-dl-init.c, CFLAGS-dl-fini.c) (CFLAGS-dl-open.c, CFLAGS-dl-close.c, CFLAGS-dl-error.c): Likewise. [$(subdir) == dlfcn] (CFLAGS-dlopen.c, CFLAGS-dlopenold.c) (CFLAGS-dlclose.c, CFLAGS-dlerror.c): Likewise. * sysdeps/i386/nptl/Makefile [$(subdir) == nptl] (CFLAGS-pthread_create.c, CFLAGS-tst-align.c) (CFLAGS-tst-align2.c): Likewise. diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index a1500454e5..1682394e76 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -19,46 +19,10 @@ CFLAGS-dl-load.c += -Wno-unused CFLAGS-dl-reloc.c += -Wno-unused endif -# Most of the glibc routines don't ever call user defined callbacks -# nor use any FPU or SSE* and as such don't need bigger %esp alignment -# than 4 bytes. -# Lots of routines in math will use FPU, so make math subdir an exception -# here. -# In gcc 4.6 (and maybe earlier?) giving -mpreferred-stack-boundary=2 is -# an error, so don't try to reduce it here like we used to. We still -# explicit set -mpreferred-stack-boundary=4 the places where it matters, -# in case an older compiler defaulted to 2. -ifeq ($(subdir),math) -sysdep-CFLAGS += -mpreferred-stack-boundary=4 -else ifeq ($(subdir),csu) -sysdep-CFLAGS += -mpreferred-stack-boundary=4 gen-as-const-headers += link-defines.sym else -# Likewise, any function which calls user callbacks -uses-callbacks += -mpreferred-stack-boundary=4 -# Likewise, any stack alignment tests -stack-align-test-flags += -malign-double -mpreferred-stack-boundary=4 -endif -endif - -# And a couple of other routines -ifeq ($(subdir),stdlib) -CFLAGS-exit.c += -mpreferred-stack-boundary=4 -CFLAGS-cxa_finalize.c += -mpreferred-stack-boundary=4 -endif -ifeq ($(subdir),elf) -CFLAGS-dl-init.c += -mpreferred-stack-boundary=4 -CFLAGS-dl-fini.c += -mpreferred-stack-boundary=4 -CFLAGS-dl-open.c += -mpreferred-stack-boundary=4 -CFLAGS-dl-close.c += -mpreferred-stack-boundary=4 -CFLAGS-dl-error.c += -mpreferred-stack-boundary=4 -endif -ifeq ($(subdir),dlfcn) -CFLAGS-dlopen.c += -mpreferred-stack-boundary=4 -CFLAGS-dlopenold.c += -mpreferred-stack-boundary=4 -CFLAGS-dlclose.c += -mpreferred-stack-boundary=4 -CFLAGS-dlerror.c += -mpreferred-stack-boundary=4 +stack-align-test-flags += -malign-double endif ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS))) diff --git a/sysdeps/i386/nptl/Makefile b/sysdeps/i386/nptl/Makefile index 93a6d30b44..73024033ee 100644 --- a/sysdeps/i386/nptl/Makefile +++ b/sysdeps/i386/nptl/Makefile @@ -18,9 +18,3 @@ ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym endif - -ifeq ($(subdir),nptl) -CFLAGS-pthread_create.c += -mpreferred-stack-boundary=4 -CFLAGS-tst-align.c += -mpreferred-stack-boundary=4 -CFLAGS-tst-align2.c += -mpreferred-stack-boundary=4 -endif