Skip to content

Commit

Permalink
7442 illumos#5969 breaks adjuncts build, tools
Browse files Browse the repository at this point in the history
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gwr@nexenta.com>
  • Loading branch information
rmustacc committed Oct 1, 2016
1 parent 88c1071 commit 259e543
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions usr/src/Makefile.master
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ INS.symlink= $(RM) $@; $(SYMLINK) $(INSLINKTARGET) $@
# files we must make certain to not adjust the mtime of the source
# (.py) file.
#
INS.pyfile= $(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!/usr/bin/python$(PYTHON_VERSION):" < $< > $@; $(CHMOD) $(FILEMODE) $@; $(TOUCH) -r $< $@
INS.pyfile= $(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!$(PYTHON):" < $< > $@; $(CHMOD) $(FILEMODE) $@; $(TOUCH) -r $< $@

# MACH must be set in the shell environment per uname -p on the build host
# More specific architecture variables should be set in lower makefiles.
Expand Down Expand Up @@ -1096,7 +1096,7 @@ PKGPUBLISHER_NONREDIST= on-extra
$(CHMOD) +x $@

.py:
$(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!/usr/bin/python$(PYTHON_VERSION):" < $< > $@; $(CHMOD) +x $@
$(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!$(PYTHON):" < $< > $@; $(CHMOD) +x $@

.py.pyc:
$(RM) $@
Expand Down
11 changes: 10 additions & 1 deletion usr/src/cmd/mdb/Makefile.module
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,23 @@ LINTFILES_proc = $(LINTOBJS)
LINTFILES_raw = $(LINTOBJS)
LINTFILES = $(LINTFILES_$(MDBTGT))

#
# Python specific flags. To try and make life easier for folks how are
# building with an LFS python, we attempt to use -isystem when it's
# available.
#
PYCPPFLAGS = -_gcc=-isystem -_gcc=$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
PYCPPFLAGS += -_cc=-I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
PYLNFLAGS = -I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)

kvm_TGTFLAGS = -D_KERNEL
proc_TGTFLAGS = -D_USER

C99MODE = $(C99_ENABLE)

CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
CPPFLAGS += $($(MDBTGT)_TGTFLAGS) -I../../../common -I/usr/include/python$(PYTHON_VERSION)
CPPFLAGS += $($(MDBTGT)_TGTFLAGS) -I../../../common
LDFLAGS += $(ZTEXT)
LDFLAGS64 += $(ZTEXT)
ASFLAGS += -P
Expand Down
5 changes: 5 additions & 0 deletions usr/src/cmd/mdb/intel/amd64/libpython/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ include ../../../../Makefile.cmd.64
include ../../Makefile.amd64
include ../../../Makefile.module

%.o := CPPFLAGS += $(PYCPPFLAGS)
%.ln := CPPFLAGS += $(PYLNFLAGS)
LINTFLAGS += -erroff=E_MACRO_REDEFINED


dmod/$(MODULE) := LDLIBS += -lproc

%.o: $(MODSRCS_DIR)/%.c
Expand Down
4 changes: 3 additions & 1 deletion usr/src/cmd/mdb/intel/ia32/libpython/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ include ../../../../Makefile.cmd
include ../../Makefile.ia32
include ../../../Makefile.module

%.o := CPPFLAGS += -_gcc=-isystem -_gcc=$(ADJUNCT_PROTO)/usr/include
%.o := CPPFLAGS += $(PYCPPFLAGS)
%.ln := CPPFLAGS += $(PYLNFLAGS)
LINTFLAGS += -erroff=E_MACRO_REDEFINED

dmod/$(MODULE) := LDLIBS += -lproc

Expand Down
4 changes: 4 additions & 0 deletions usr/src/cmd/mdb/sparc/v7/libpython/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ include ../../../../Makefile.cmd
include ../../Makefile.sparcv7
include ../../../Makefile.module

%.o := CPPFLAGS += $(PYCPPFLAGS)
%.ln := CPPFLAGS += $(PYLNFLAGS)
LINTFLAGS += -erroff=E_MACRO_REDEFINED

dmod/$(MODULE) := LDLIBS += -lproc

%.o: $(MODSRCS_DIR)/%.c
Expand Down
4 changes: 4 additions & 0 deletions usr/src/cmd/mdb/sparc/v9/libpython/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ include ../../../../Makefile.cmd.64
include ../../Makefile.sparcv9
include ../../../Makefile.module

%.o := CPPFLAGS += $(PYCPPFLAGS)
%.ln := CPPFLAGS += $(PYLNFLAGS)
LINTFLAGS += -erroff=E_MACRO_REDEFINED

dmod/$(MODULE) := LDLIBS += -lproc

%.o: $(MODSRCS_DIR)/%.c
Expand Down

0 comments on commit 259e543

Please sign in to comment.