summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/Makefile.targ
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libc/Makefile.targ')
-rw-r--r--usr/src/lib/libc/Makefile.targ20
1 files changed, 19 insertions, 1 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