From patchwork Sun Feb 28 16:41:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nix X-Patchwork-Id: 589578 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 A3852140A98 for ; Mon, 29 Feb 2016 03:43:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=c9ojdLAR; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=MIUMGjTCuxm/Rfs0iUuoycZ2zX2InY7 oW7HRRvSOZWJld7MUPShoMVHyA13pm1gxSb7ecFw0KaVLEk2BVjfukcJrpL5nXtt sfnc7wycLxVIckp05/z5awYZYmkvWpQcz3KtRtRJ8Kd2v7RoA/JGRzbiiijkmpEI ThcjTiD4fwLY= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=f8+aRYj41uK5CQb4sH6sQ3VTYgE=; b=c9ojd LAR+8RMFoMGJEv4NVfct9kjGdFIxiGC1MJNOPEpml9Lthan4R3Vm6SmD8KjYezkv dccJwgoMm60tQuBsXsfDCxnbAa88VRO0Q/YMGEUbstunIyvnGOJx0GBP9hBKeCPK HnTdu62nk4UMUzo0UkuLaVCHONqiZt8im5ZM+8= Received: (qmail 85561 invoked by alias); 28 Feb 2016 16:42:02 -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 85500 invoked by uid 89); 28 Feb 2016 16:42:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=547, UD:7.0.198.g6dd47b6, UD:2.7.0.198.g6dd47b6, sk:2.7.0.1 X-HELO: mail.esperi.org.uk From: Nix To: libc-alpha@sourceware.org Subject: [PATCH 06/16] Allow overriding of CFLAGS as well as CPPFLAGS for rtld. Date: Sun, 28 Feb 2016 16:41:25 +0000 Message-Id: <1456677695-29778-7-git-send-email-nix@esperi.org.uk> In-Reply-To: <1456677695-29778-1-git-send-email-nix@esperi.org.uk> References: <1456677695-29778-1-git-send-email-nix@esperi.org.uk> X-DCC-URT-Metrics: spindle 1060; Body=1 Fuz1=1 Fuz2=32 From: Nick Alcock We need this to pass -fno-stack-protector to all the pieces of rtld in non-elf/ directories. --- elf/rtld-Rules | 2 +- scripts/sysd-rules.awk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/rtld-Rules b/elf/rtld-Rules index 94ca39b..c1bb506 100644 --- a/elf/rtld-Rules +++ b/elf/rtld-Rules @@ -90,7 +90,7 @@ else rtld-compile-command.S = $(compile-command.S) $(rtld-CPPFLAGS) rtld-compile-command.s = $(compile-command.s) $(rtld-CPPFLAGS) -rtld-compile-command.c = $(compile-command.c) $(rtld-CPPFLAGS) +rtld-compile-command.c = $(compile-command.c) $(rtld-CPPFLAGS) $(rtld-CFLAGS) # These are the basic compilation rules corresponding to the Makerules ones. # The sysd-rules generated makefile already defines pattern rules for rtld-% diff --git a/scripts/sysd-rules.awk b/scripts/sysd-rules.awk index cebc9d3..69af400 100644 --- a/scripts/sysd-rules.awk +++ b/scripts/sysd-rules.awk @@ -54,7 +54,7 @@ BEGIN { command_suffix = ""; } else { prefix = gensub(/%/, "", 1, target_pattern); - command_suffix = " $(" prefix "CPPFLAGS)"; + command_suffix = " $(" prefix "CPPFLAGS)" " $(" prefix "CFLAGS)"; } target = "$(objpfx)" target_pattern o ":"; if (asm_rules) {