3c8a07
From f42b57f2c3da86a0e3aa8e2f6f09994b8a0c7334 Mon Sep 17 00:00:00 2001
3c8a07
From: Wangyang Guo <wangyang.guo@intel.com>
3c8a07
Date: Mon, 15 Nov 2021 05:28:29 +0000
3c8a07
Subject: [PATCH] pack up patches
3c8a07
3c8a07
---
3c8a07
 crypt/Makefile                  | 2 ++
3c8a07
 math/Makefile                   | 2 ++
3c8a07
 math/w_sqrt_compat.c            | 1 +
3c8a07
 nss/nss_files/files-XXX.c       | 4 ++++
3c8a07
 sysdeps/ieee754/dbl-64/e_exp.c  | 1 +
3c8a07
 sysdeps/ieee754/dbl-64/e_exp2.c | 1 +
3c8a07
 sysdeps/x86_64/fpu/Makefile     | 7 +++++++
3c8a07
 timezone/tzselect.ksh           | 2 +-
3c8a07
 8 files changed, 19 insertions(+), 1 deletion(-)
3c8a07
3c8a07
diff --git a/crypt/Makefile b/crypt/Makefile
3c8a07
index 3811b6e2..34fd5306 100644
3c8a07
--- a/crypt/Makefile
3c8a07
+++ b/crypt/Makefile
3c8a07
@@ -22,6 +22,8 @@ subdir	:= crypt
3c8a07
 
3c8a07
 include ../Makeconfig
3c8a07
 
3c8a07
+CFLAGS-.o += -flto -ffat-lto-objects -fno-stack-protector
3c8a07
+
3c8a07
 headers := crypt.h
3c8a07
 
3c8a07
 extra-libs := libcrypt
3c8a07
diff --git a/math/Makefile b/math/Makefile
3c8a07
index df73d708..e1826330 100644
3c8a07
--- a/math/Makefile
3c8a07
+++ b/math/Makefile
3c8a07
@@ -21,6 +21,8 @@ subdir		:= math
3c8a07
 
3c8a07
 include ../Makeconfig
3c8a07
 
3c8a07
+CFLAGS-.o += -fno-stack-protector  -falign-functions=32
3c8a07
+
3c8a07
 # Installed header files.
3c8a07
 headers		:= math.h bits/mathcalls.h bits/mathinline.h \
3c8a07
 		   fpu_control.h complex.h bits/cmathcalls.h fenv.h \
3c8a07
diff --git a/math/w_sqrt_compat.c b/math/w_sqrt_compat.c
3c8a07
index e76a8079..889ab39a 100644
3c8a07
--- a/math/w_sqrt_compat.c
3c8a07
+++ b/math/w_sqrt_compat.c
3c8a07
@@ -26,6 +26,7 @@
3c8a07
 #if LIBM_SVID_COMPAT
3c8a07
 /* wrapper sqrt */
3c8a07
 double
3c8a07
+__attribute__((aligned(64)))
3c8a07
 __sqrt (double x)
3c8a07
 {
3c8a07
   if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
3c8a07
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
3c8a07
index 37a3ce27..056ec6cc 100644
3c8a07
--- a/nss/nss_files/files-XXX.c
3c8a07
+++ b/nss/nss_files/files-XXX.c
3c8a07
@@ -40,6 +40,7 @@
3c8a07
 #define ENTNAME_r	CONCAT(ENTNAME,_r)
3c8a07
 
3c8a07
 #define DATAFILE	"/etc/" DATABASE
3c8a07
+#define ALTDATAFILE	"/usr/share/defaults/etc/" DATABASE
3c8a07
 
3c8a07
 #ifdef NEED_H_ERRNO
3c8a07
 # include <netdb.h>
3c8a07
@@ -77,6 +78,9 @@ internal_setent (FILE **stream)
3c8a07
     {
3c8a07
       *stream = __nss_files_fopen (DATAFILE);
3c8a07
 
3c8a07
+      if (*stream == NULL)
3c8a07
+           *stream = fopen(ALTDATAFILE, "rce");
3c8a07
+
3c8a07
       if (*stream == NULL)
3c8a07
 	status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
3c8a07
     }
3c8a07
diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c
3c8a07
index ddd2bcb1..3c693d78 100644
3c8a07
--- a/sysdeps/ieee754/dbl-64/e_exp.c
3c8a07
+++ b/sysdeps/ieee754/dbl-64/e_exp.c
3c8a07
@@ -49,6 +49,7 @@
3c8a07
 
3c8a07
 double
3c8a07
 SECTION
3c8a07
+__attribute__((aligned(64)))
3c8a07
 __ieee754_exp (double x)
3c8a07
 {
3c8a07
   double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
3c8a07
diff --git a/sysdeps/ieee754/dbl-64/e_exp2.c b/sysdeps/ieee754/dbl-64/e_exp2.c
3c8a07
index c45bb447..a30d5a2e 100644
3c8a07
--- a/sysdeps/ieee754/dbl-64/e_exp2.c
3c8a07
+++ b/sysdeps/ieee754/dbl-64/e_exp2.c
3c8a07
@@ -39,6 +39,7 @@ static const double TWO1023 = 8.988465674311579539e+307;
3c8a07
 static const double TWOM1000 = 9.3326361850321887899e-302;
3c8a07
 
3c8a07
 double
3c8a07
+__attribute__((aligned(64)))
3c8a07
 __ieee754_exp2 (double x)
3c8a07
 {
3c8a07
   static const double himark = (double) DBL_MAX_EXP;
3c8a07
diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile
3c8a07
index 2b7d69bb..bba4a1de 100644
3c8a07
--- a/sysdeps/x86_64/fpu/Makefile
3c8a07
+++ b/sysdeps/x86_64/fpu/Makefile
3c8a07
@@ -237,3 +237,10 @@ CFLAGS-test-float-libmvec-sincosf-avx512.c = -DREQUIRE_AVX512F
3c8a07
 CFLAGS-test-float-libmvec-sincosf-avx512-main.c = $(libmvec-sincos-cflags) $(float-vlen16-arch-ext-cflags)
3c8a07
 endif
3c8a07
 endif
3c8a07
+
3c8a07
+ifeq ($(subdir),math)
3c8a07
+CFLAGS-branred.c = -mprefer-vector-width=128 -fno-tree-vectorize
3c8a07
+CFLAGS-s_sincos.c = -mprefer-vector-width=256 -fno-tree-vectorize
3c8a07
+CFLAGS-e_exp.c = -mprefer-vector-width=128 -fno-tree-vectorize
3c8a07
+CFLAGS-e_exp2.c = -mprefer-vector-width=128 -fno-tree-vectorize
3c8a07
+endif
3c8a07
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
3c8a07
index d2c3a6d1..5c69e579 100755
3c8a07
--- a/timezone/tzselect.ksh
3c8a07
+++ b/timezone/tzselect.ksh
3c8a07
@@ -52,7 +52,7 @@ say() {
3c8a07
 
3c8a07
 coord=
3c8a07
 location_limit=10
3c8a07
-zonetabtype=zone1970
3c8a07
+zonetabtype=zone
3c8a07
 
3c8a07
 usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]
3c8a07
 Select a time zone interactively.
3c8a07
-- 
3c8a07
2.27.0
3c8a07