From patchwork Mon Jun 11 10:28:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Trofimovich X-Patchwork-Id: 27737 Received: (qmail 18547 invoked by alias); 11 Jun 2018 10:28:32 -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 18534 invoked by uid 89); 11 Jun 2018 10:28:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f68.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0DG0CsIaUi9SyYS6vhQU0MDyPIXqusihpUOhCcngRg4=; b=JUF71aAW5hmMARnHbE0I3QwhHIyqDUxWliO9z/4YibaBWuyehN28DnaRfjTZPXATbH XOu36Oe4aetqDSRO+jsriHuTunTrylrFXUTK7GR33KIHmx3aYo/z/eOv+gyWfmfq5Lka 0/Dhf4kZv6d2UOb3+jlh+oz2MBPLdiHVLgp7cIylhTXm+IEEbHY32rzluede9gFpL5ve uFTOE6Z9IRDxfU/WzKW+XBdbg2LQc0053TrKLUVdohj63y0dqUvQpBppjy6Qfgra9Ydr PJBuSHJYdXKnEzw6xGQVeOx6/aB/cfu+FKJ5XTUd28rh/tgwKsTCbiaCjAYRm205hnm7 P1CA== X-Gm-Message-State: APt69E1adIu8+Et47nrwXtKGEu2IZG/vkgYk+k0SUHQ3p1/mqH6Y6cmW +dIc3eUbOvVdIiPKjBUmSWk= X-Google-Smtp-Source: ADUXVKJzH0851XVh/veccl8fb/RL71JR/ziNqHGYrv4JVh0LyixkTGQ0OQQ84YXClcluayxLAQF0NA== X-Received: by 2002:a1c:7113:: with SMTP id m19-v6mr7834066wmc.150.1528712907639; Mon, 11 Jun 2018 03:28:27 -0700 (PDT) From: Sergei Trofimovich To: libc-alpha@sourceware.org Cc: Adhemerval Zanella , Sergei Trofimovich Subject: [PATCH] Makerules: pass CFLAGS when building .S files, BZ #23273 Date: Mon, 11 Jun 2018 11:28:15 +0100 Message-Id: <20180611102815.12982-1-slyich@gmail.com> From: Sergei Trofimovich When glibc is built on armv7 with CFLAGS="-pipe -march=armv7-a -O2 -mfpu=neon" rtld fails to link due to missing memcpy symbol. This happens because .c files are built with -mfpu=neon flag but .S/.s files are built without it. Among other things -mfpu=neon defines __ARM_NEON__. To fix this mismatch CFLAGS should be passed consistently to .c and .S files. Bug: https://sourceware.org/PR23273 Signed-off-by: Sergei Trofimovich --- Makerules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makerules b/Makerules index b2c2724fcb..ddf72b3723 100644 --- a/Makerules +++ b/Makerules @@ -510,10 +510,10 @@ native-compile-mkdep-flags = -MMD -MP -MF $@.dt -MT $@ # GCC can grok options after the file name, and it looks nicer that way. compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS) -compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \ +compile.S = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) $(S-CPPFLAGS) \ $(ASFLAGS) $(ASFLAGS-$(suffix $@)) COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS) -COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \ +COMPILE.S = $(CC) -c $(CFLAGS) $(CPPFLAGS) $(S-CPPFLAGS) \ $(ASFLAGS) $(ASFLAGS-$(suffix $@)) # We need this for the output to go in the right place. It will default to