1From f9b2b1c738576a17460aebd005f511f427aa1974 Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com>
3Date: Sat, 7 Mar 2020 08:34:02 -0800
4Subject: [PATCH] Fix nss multilib build on openSUSE 11.x 32bit
5
6While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will
7fail with error:
8
9* nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled
10
11It caused by the '-m64' option which passed to host gcc.
12
13The nsinstall was built first while nss starting to build, it only runs
14on host to install built files, it doesn't need any cross-compling or
15multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this
16error.
17
18Upstream-Status: Inappropriate [configuration]
19
20Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
21===================================================
22
23---
24 nss/coreconf/nsinstall/Makefile | 7 +++++++
25 1 file changed, 7 insertions(+)
26
27diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile
28index 08dfbc2..e97fb5f 100644
29--- a/nss/coreconf/nsinstall/Makefile
30+++ b/nss/coreconf/nsinstall/Makefile
31@@ -18,6 +18,13 @@ INTERNAL_TOOLS  = 1
32
33 include $(DEPTH)/coreconf/config.mk
34
35+# nsinstall is unfit for cross-compiling/multilib-build since it was
36+# always run on local host to install built files. This change intends
37+# to clean the '-m64' from ARCHFLAG and LDFLAGS.
38+ARCHFLAG =
39+LDFLAGS =
40+# CFLAGS =
41+
42 ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
43 PROGRAM		=
44 TARGETS		=
45