From 445e45c0d2aab1ff59062ad0c7b345a78814164a Mon Sep 17 00:00:00 2001
From: Dan McDonald <danmcd@mnx.io>
Date: Thu, 16 Feb 2023 10:55:57 -0500
Subject: [PATCH] SmartOS adjustments for 15374 (no more aw(1onbld))

---
 usr/src/lib/brand/lx/lx_brand/Makefile.com                 | 6 ++++--
 usr/src/lib/brand/lx/lx_brand/amd64/{lx_crt.s => lx_crt.S} | 0
 .../brand/lx/lx_brand/amd64/{lx_handler.s => lx_handler.S} | 0
 usr/src/lib/brand/lx/lx_brand/i386/{lx_crt.s => lx_crt.S}  | 0
 .../brand/lx/lx_brand/i386/{lx_handler.s => lx_handler.S}  | 0
 usr/src/lib/brand/lx/lx_vdso/Makefile.com                  | 7 ++++---
 .../brand/lx/lx_vdso/amd64/{vdso_subr.s => vdso_subr.S}    | 0
 .../lib/brand/lx/lx_vdso/i386/{vdso_subr.s => vdso_subr.S} | 0
 8 files changed, 8 insertions(+), 5 deletions(-)
 rename usr/src/lib/brand/lx/lx_brand/amd64/{lx_crt.s => lx_crt.S} (100%)
 rename usr/src/lib/brand/lx/lx_brand/amd64/{lx_handler.s => lx_handler.S} (100%)
 rename usr/src/lib/brand/lx/lx_brand/i386/{lx_crt.s => lx_crt.S} (100%)
 rename usr/src/lib/brand/lx/lx_brand/i386/{lx_handler.s => lx_handler.S} (100%)
 rename usr/src/lib/brand/lx/lx_vdso/amd64/{vdso_subr.s => vdso_subr.S} (100%)
 rename usr/src/lib/brand/lx/lx_vdso/i386/{vdso_subr.s => vdso_subr.S} (100%)

diff --git a/usr/src/lib/brand/lx/lx_brand/Makefile.com b/usr/src/lib/brand/lx/lx_brand/Makefile.com
index dd457ab2ae..b441375984 100644
--- a/usr/src/lib/brand/lx/lx_brand/Makefile.com
+++ b/usr/src/lib/brand/lx/lx_brand/Makefile.com
@@ -74,7 +74,9 @@ DYNFLAGS +=	$(DYNFLAGS_$(CLASS))
 DYNFLAGS +=	$(BLOCAL) $(ZNOVERSION) -Wl,-e_start
 CFLAGS +=	$(CCVERBOSE)
 CPPFLAGS +=	-D_REENTRANT -I. -I../ -I$(UTSBASE)/common/brand/lx -I$(LX_CMN)
-ASFLAGS =	-P $(ASFLAGS_$(CURTYPE)) -D_ASM -I../	\
+ASFLAGS +=	$(ASFLAGS_$(CURTYPE)) -D_ASM -I../	\
+			-I$(UTSBASE)/common/brand/lx
+ASFLAGS64 +=	$(ASFLAGS_$(CURTYPE)) -D_ASM -I../	\
 			-I$(UTSBASE)/common/brand/lx
 
 ZGUIDANCE =	-Wl,-zguidance=nounused
@@ -94,7 +96,7 @@ lint: lintcheck
 include ../../../../Makefile.targ
 include ../../../../Makefile.usdt
 
-pics/%.o: $(ISASRCDIR)/%.s
+pics/%.o: $(ISASRCDIR)/%.S
 	$(COMPILE.s) -o $@ $<
 	$(POST_PROCESS_S_O)
 
diff --git a/usr/src/lib/brand/lx/lx_brand/amd64/lx_crt.s b/usr/src/lib/brand/lx/lx_brand/amd64/lx_crt.S
similarity index 100%
rename from usr/src/lib/brand/lx/lx_brand/amd64/lx_crt.s
rename to usr/src/lib/brand/lx/lx_brand/amd64/lx_crt.S
diff --git a/usr/src/lib/brand/lx/lx_brand/amd64/lx_handler.s b/usr/src/lib/brand/lx/lx_brand/amd64/lx_handler.S
similarity index 100%
rename from usr/src/lib/brand/lx/lx_brand/amd64/lx_handler.s
rename to usr/src/lib/brand/lx/lx_brand/amd64/lx_handler.S
diff --git a/usr/src/lib/brand/lx/lx_brand/i386/lx_crt.s b/usr/src/lib/brand/lx/lx_brand/i386/lx_crt.S
similarity index 100%
rename from usr/src/lib/brand/lx/lx_brand/i386/lx_crt.s
rename to usr/src/lib/brand/lx/lx_brand/i386/lx_crt.S
diff --git a/usr/src/lib/brand/lx/lx_brand/i386/lx_handler.s b/usr/src/lib/brand/lx/lx_brand/i386/lx_handler.S
similarity index 100%
rename from usr/src/lib/brand/lx/lx_brand/i386/lx_handler.s
rename to usr/src/lib/brand/lx/lx_brand/i386/lx_handler.S
diff --git a/usr/src/lib/brand/lx/lx_vdso/Makefile.com b/usr/src/lib/brand/lx/lx_vdso/Makefile.com
index ebc4d71042..ab63a60df7 100644
--- a/usr/src/lib/brand/lx/lx_vdso/Makefile.com
+++ b/usr/src/lib/brand/lx/lx_vdso/Makefile.com
@@ -47,7 +47,8 @@ LIBS =		$(DYNLIB)
 DYNFLAGS +=	$(DYNFLAGS_$(CLASS))
 DYNFLAGS +=	$(MAPOPTS)
 LDLIBS +=
-ASFLAGS =	-P $(ASFLAGS_$(CURTYPE)) -D_ASM
+ASFLAGS +=	$(ASFLAGS_$(CURTYPE)) -D_ASM
+ASFLAGS64 +=	$(ASFLAGS_$(CURTYPE)) -D_ASM
 
 
 LIBS =		$(DYNLIB)
@@ -77,9 +78,9 @@ lint: $(LINTLIB) lintcheck
 include ../../../../Makefile.targ
 include $(SRC)/lib/commpage/Makefile.shared.targ
 
-pics/%.o: $(ISASRCDIR)/%.s
+pics/%.o: $(ISASRCDIR)/%.S
 	$(COMPILE.s) -o $@ $<
 	$(POST_PROCESS_S_O)
 
 pics/vdso_main.o := CPPFLAGS += $(COMMPAGE_CPPFLAGS) -I$(SRCDIR)
-pics/vdso_subr.o := ASFLAGS += -I$(SRC)/uts/common/brand/lx -I$(SRCDIR)
+pics/vdso_subr.o := AS_CPPFLAGS += -I$(SRC)/uts/common/brand/lx -I$(SRCDIR)
diff --git a/usr/src/lib/brand/lx/lx_vdso/amd64/vdso_subr.s b/usr/src/lib/brand/lx/lx_vdso/amd64/vdso_subr.S
similarity index 100%
rename from usr/src/lib/brand/lx/lx_vdso/amd64/vdso_subr.s
rename to usr/src/lib/brand/lx/lx_vdso/amd64/vdso_subr.S
diff --git a/usr/src/lib/brand/lx/lx_vdso/i386/vdso_subr.s b/usr/src/lib/brand/lx/lx_vdso/i386/vdso_subr.S
similarity index 100%
rename from usr/src/lib/brand/lx/lx_vdso/i386/vdso_subr.s
rename to usr/src/lib/brand/lx/lx_vdso/i386/vdso_subr.S
-- 
2.34.1

