From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5171 invoked from network); 13 Mar 2023 05:17:39 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2023 05:17:39 -0000 Received: (qmail 24182 invoked by uid 550); 13 Mar 2023 05:17:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 24147 invoked from network); 13 Mar 2023 05:17:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678684632; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=wtoYYaWUw6uEjfy3Ha0Igeu17hNzT2wg8djiD12F5Ck=; b=IzmsbI5O70pofgM4vJ1FAszlF0v2vemeiBMB1MgUCVPb5NYVDa4X5QCRQUeqGVt3So 0SkZue1uKAitHDhTzNHewNzzF6Ov1GSuM7rPydmMwaHotj8sL6wm3fmvgQfR8sO5zWdK qUVDNk3AAU7gSpoYMknWjUn4c9l+1pBJBS7lhZq2RP3b7M9OVjOeZg/jEK1yAXwvTHuZ osBkipu4tjk6cLzFCygf0fxhl38M5urGIGN0SBnDDflPxqi1c3MpVVtJsVvBpM3BBv2F xoXyreiecGngvitVXk35EHQ8abS7+6+lrJCkV/9JKNi9cnh4g6KsSdhhfI/lMfrF9nVr Aqhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678684632; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wtoYYaWUw6uEjfy3Ha0Igeu17hNzT2wg8djiD12F5Ck=; b=4CCvmqECP6o/tsML7dAqeVK3QX6Tws+lNpLZtGEok0g+2cCBPRwcUZ1ZtwTPyWsJPE 52CALUj0UoIzdEfa0aQQZasEmaoaFaqn++7n/QNKqes8wVrqm8+ozVwJ2yTZSHOji8W8 D6Ie4hwKEkScpcmmk8YhZOtx2cdTIiR3SK8GdNsIDdR1S8tG2VDY4hyBT3cJ7+pjfxW1 Wm88rUifSVE4D5yK5IVNi/0lc26ol4j7VXMMYOIHYBcWbT7eYvNus5ysmMCWdCdQJCHF 3Vw4NNifXLXXJyoqwvoQJbu5P9FFQoG5fcgUl+So79E8zsWi6bEu7FjTPfZni1yTSf5S 7JBg== X-Gm-Message-State: AO0yUKViE35HNZbpkukxOhZf/e/NOffajgwjoe6gbDKE8QI/Xkvhzkux pbaxuEeq51Hj9lmaMuapcxc= X-Google-Smtp-Source: AK7set+gkA1X6aoIcFW8HOYdnb80cJmLyKhDH/q5p2WP+Ma/NGuOsujgBJHM8GICNsdbqW7f2KUyoQ== X-Received: by 2002:a17:907:6d86:b0:879:ab3:2864 with SMTP id sb6-20020a1709076d8600b008790ab32864mr38959090ejc.24.1678684631993; Sun, 12 Mar 2023 22:17:11 -0700 (PDT) From: Lukas Bulwahn To: Rich Felker , musl@lists.openwall.com Cc: Lukas Bulwahn Date: Mon, 13 Mar 2023 06:17:04 +0100 Message-Id: <20230313051705.2843-2-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230313051705.2843-1-lukas.bulwahn@gmail.com> References: <20230313051705.2843-1-lukas.bulwahn@gmail.com> Subject: [musl] [PATCH 1/2] avoid passing -fno-stack-protector twice for LDSO_OBJS 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 build.log.new | 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)) $(MEMOPS_OBJS) $(MEMOPS_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_MEMOPS) -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)) -$(NOSSP_OBJS) $(NOSSP_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP) +$(NOSSP_OBJS) $(NOSSP_OBJS:%.o=%.lo) $(LDSO_OBJS): CFLAGS_ALL += $(CFLAGS_NOSSP) $(CRT_OBJS): CFLAGS_ALL += -DCRT -- 2.17.1