]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
i386: Consolidate subdirectory check on elf and csu
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 28 Jul 2025 19:15:30 +0000 (12:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 1 Aug 2025 12:51:28 +0000 (05:51 -0700)
Consolidate subdirectory check on elf and csu to avoid checking them
more than once.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/i386/Makefile

index ee6470d78e856315d3f7c52f7b7dd62ab3d87e59..74068ea80c5766657a32e91d3a74677d4b988ff2 100644 (file)
@@ -17,19 +17,22 @@ ifeq ($(subdir),gmon)
 sysdep_routines += i386-mcount
 endif
 
-ifeq ($(subdir),elf)
-CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
-CFLAGS-dl-load.c += -Wno-unused
-CFLAGS-dl-reloc.c += -Wno-unused
-endif
-
 ifeq ($(subdir),csu)
 gen-as-const-headers += link-defines.sym
+gen-as-const-headers += tlsdesc.sym
 else
 stack-align-test-flags += -malign-double
 endif
 
+# Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
+# the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
+# which must be preserved.
+# With SSE disabled, ensure -fpmath is not set to use sse either.
+rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387
 ifeq ($(subdir),elf)
+CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
+CFLAGS-dl-load.c += -Wno-unused
+CFLAGS-dl-reloc.c += -Wno-unused
 sysdep-dl-routines += \
   dl-tls-get-addr \
 # sysdep-dl-routines
@@ -40,18 +43,6 @@ modules-names += tst-auditmod3a tst-auditmod3b
 $(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
 $(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
 tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
-endif
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tlsdesc.sym
-endif
-
-# Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
-# the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
-# which must be preserved.
-# With SSE disabled, ensure -fpmath is not set to use sse either.
-rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387
-ifeq ($(subdir),elf)
 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
                   $(rtld-CFLAGS))