From: H.J. Lu Date: Mon, 28 Jul 2025 19:15:30 +0000 (-0700) Subject: i386: Consolidate subdirectory check on elf and csu X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf91048748408f81566ead5b9498744100aa589c;p=thirdparty%2Fglibc.git i386: Consolidate subdirectory check on elf and csu Consolidate subdirectory check on elf and csu to avoid checking them more than once. Signed-off-by: H.J. Lu Reviewed-by: Sam James --- diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index ee6470d78e..74068ea80c 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -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))