From patchwork Tue Mar 8 13:50:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nix X-Patchwork-Id: 11259 Received: (qmail 30455 invoked by alias); 8 Mar 2016 13:54:00 -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 30405 invoked by uid 89); 8 Mar 2016 13:54:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL, BAYES_40, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:1468, Hx-spam-relays-external:sk:mail.es, H*RU:sk:mail.es, H*r:sk:mail.es X-HELO: mail.esperi.org.uk From: Nix To: libc-alpha@sourceware.org Subject: [PATCH 06/18] Allow overriding of CFLAGS as well as CPPFLAGS for rtld. Date: Tue, 8 Mar 2016 13:50:52 +0000 Message-Id: <1457445064-7107-7-git-send-email-nix@esperi.org.uk> In-Reply-To: <1457445064-7107-1-git-send-email-nix@esperi.org.uk> References: <1457445064-7107-1-git-send-email-nix@esperi.org.uk> X-DCC--Metrics: spindle 1282; Body=2 Fuz1=2 Fuz2=2 From: Nick Alcock We need this to pass -fno-stack-protector to all the pieces of rtld in non-elf/ directories. * elf/rtld-Rules (rtld-compile-command.c): Add $(rtld-CFLAGS). * scripts/sysd-rules.awk: Substitute in $(CFLAGS) as well as $(CPPFLAGS). --- 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) {