summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/lib/libc/Makefile.targ20
-rw-r--r--usr/src/lib/libc/amd64/Makefile16
-rw-r--r--usr/src/lib/libc/i386/Makefile.com14
-rw-r--r--usr/src/lib/libc/sparc/Makefile.com12
-rw-r--r--usr/src/lib/libc/sparcv9/Makefile.com12
5 files changed, 24 insertions, 50 deletions
diff --git a/usr/src/lib/libc/Makefile.targ b/usr/src/lib/libc/Makefile.targ
index 31992a9ee8..8721e8ec21 100644
--- a/usr/src/lib/libc/Makefile.targ
+++ b/usr/src/lib/libc/Makefile.targ
@@ -21,7 +21,7 @@
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
-# Copyright 2016 Joyent, Inc.
+# Copyright 2018 Joyent, Inc.
#
#
@@ -318,4 +318,22 @@ pics/%.o: $(LIBCBASE)/../port/threads/%.d $(THREADSOBJS:%=pics/%)
$(COMPILE.d) -C -xlazyload -s $< -o $@ $(THREADSOBJS:%=pics/%)
$(POST_PROCESS_O)
+# assym rules
+
+#
+# genassym is a funny fish: it's run on the build machine, so should use the
+# native compilers, but its job is to reflect the proto area header definitions,
+# so we need to use $(CPPFLAGS) not $(CPPFLAGS.native) to make sure we pick up
+# those headers.
+#
+genassym: $(GENASSYM_C)
+ $(NATIVECC) $(NATIVE_CFLAGS) $(CPPFLAGS) -o $@ $(GENASSYM_C)
+
+# shared between 32- and 64-bit
+OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
+
+assym.h: $(OFFSETS) genassym
+ $(OFFSETS_CREATE) <$(OFFSETS) >$@
+ ./genassym >>$@
+
include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index 9b57d2517e..f5c4224338 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -21,10 +21,10 @@
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2017, Joyent, Inc.
# Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2013 Garrett D'Amore <garrett@damore.org>
# Copyright 2018 Nexenta Systems, Inc.
+# Copyright 2018 Joyent, Inc.
#
LIBCBASE= .
@@ -1258,19 +1258,7 @@ ASSYMDEP_OBJS= \
$(ASSYMDEP_OBJS:%=pics/%): assym.h
-# assym.h build rules
-
-GENASSYM_C = genassym.c
-
-genassym: $(GENASSYM_C)
- $(NATIVECC) $(NATIVE_CFLAGS) -Iinc -I$(LIBCDIR)/inc $(CPPFLAGS.native) \
- -o $@ $(GENASSYM_C)
-
-OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
-
-assym.h: $(OFFSETS) genassym
- $(OFFSETS_CREATE) <$(OFFSETS) >$@
- ./genassym >>$@
+GENASSYM_C = $(LIBCDIR)/$(MACH64)/genassym.c
# derived C source and related explicit dependencies
$(LIBCDIR)/port/gen/errlst.c + \
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index dd647b2811..e9343c2f15 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -21,10 +21,10 @@
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2017, Joyent, Inc.
# Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2013 Garrett D'Amore <garrett@damore.org>
# Copyright 2018 Nexenta Systems, Inc.
+# Copyright 2018 Joyent, Inc.
#
LIBCDIR= $(SRC)/lib/libc
@@ -1339,20 +1339,8 @@ $(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I.
$(ASSYMDEP_OBJS:%=pics/%): assym.h
-# assym.h build rules
-
GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
-genassym: $(GENASSYM_C)
- $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
- -D__EXTENSIONS__ $(CPPFLAGS.native) -o $@ $(GENASSYM_C)
-
-OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
-
-assym.h: $(OFFSETS) genassym
- $(OFFSETS_CREATE) <$(OFFSETS) >$@
- ./genassym >>$@
-
# derived C source and related explicit dependencies
$(LIBCDIR)/port/gen/errlst.c + \
$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk
diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com
index 20a4e0fd4e..4e09e44571 100644
--- a/usr/src/lib/libc/sparc/Makefile.com
+++ b/usr/src/lib/libc/sparc/Makefile.com
@@ -21,10 +21,10 @@
#
# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2016 Joyent, Inc.
# Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2013 Garrett D'Amore <garrett@damore.org>
# Copyright 2018 Nexenta Systems, Inc.
+# Copyright 2018 Joyent, Inc.
#
LIBCDIR= $(SRC)/lib/libc
@@ -1413,16 +1413,6 @@ assym.h := CFLAGS += -g
GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
-genassym: $(GENASSYM_C)
- $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
- $(CPPFLAGS.native) -o $@ $(GENASSYM_C)
-
-OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
-
-assym.h: $(OFFSETS) genassym
- $(OFFSETS_CREATE) <$(OFFSETS) >$@
- ./genassym >>$@
-
# derived C source and related explicit dependencies
$(LIBCDIR)/port/gen/errlst.c + \
$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk
diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com
index 8e8fc96f16..240ecef7db 100644
--- a/usr/src/lib/libc/sparcv9/Makefile.com
+++ b/usr/src/lib/libc/sparcv9/Makefile.com
@@ -22,10 +22,10 @@
#
# Copyright 2016 Gary Mills
# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2015, Joyent, Inc. All rights reserved.
# Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2013 Garrett D'Amore <garrett@damore.org>
# Copyright 2018 Nexenta Systems, Inc.
+# Copyright 2018 Joyent, Inc.
#
LIBCDIR= $(SRC)/lib/libc
@@ -1327,16 +1327,6 @@ assym.h := CFLAGS64 += -g
GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
-genassym: $(GENASSYM_C)
- $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
- $(CPPFLAGS.native) -o $@ $(GENASSYM_C)
-
-OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
-
-assym.h: $(OFFSETS) genassym
- $(OFFSETS_CREATE) <$(OFFSETS) >$@
- ./genassym >>$@
-
# derived C source and related explicit dependencies
$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk
cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist