mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Lukas Bulwahn <>
To: Rich Felker <>,
Cc: Lukas Bulwahn <>
Subject: [musl] [PATCH 1/2] avoid passing -fno-stack-protector twice for LDSO_OBJS
Date: Mon, 13 Mar 2023 06:17:04 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

By definition of LDSO_OBJS, the files in $(LDSO_OBJS) already have a .lo
suffix. So, when $(LDSO_OBJS) are added to NOSSP_OBJS, they appear twice in
the list $(NOSSP_OBJS) $(NOSSP_OBJS:%.o=%.lo), and the flag $(CFLAGS_NOSSP)
is hence added twice. This effectively results in adding the
'-fno-stack-protector' option twice.

The effect of this change is quickly validated with:

  diff -u0 build.log.original | diff-highlight

where build.log is just the console output from make.

Just clean up passing a duplicated option to the compiler.
No actual functional change to CFLAGS options of any file.
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index e8cc4436..fd45c118 100644
--- a/Makefile
+++ b/Makefile
@@ -121,11 +121,11 @@ $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo):
 MEMOPS_OBJS = $(filter %/memcpy.o %/memmove.o %/memcmp.o %/memset.o, $(LIBC_OBJS))
-NOSSP_OBJS = $(CRT_OBJS) $(LDSO_OBJS) $(filter \
+NOSSP_OBJS = $(CRT_OBJS) $(filter \
 	%/__libc_start_main.o %/__init_tls.o %/__stack_chk_fail.o \
 	%/__set_thread_area.o %/memset.o %/memcpy.o \
 	, $(LIBC_OBJS))

  reply	other threads:[~2023-03-13  5:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13  5:17 [musl] [PATCH 0/2] Minor stylistic clean-up in musl Makefile Lukas Bulwahn
2023-03-13  5:17 ` Lukas Bulwahn [this message]
2023-03-13  5:17 ` [musl] [PATCH 2/2] drop adding -DCRT to CFLAGS in the Makefile Lukas Bulwahn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).