make/solaris/makefiles/dtrace.make

Print this page




 107 XLIBJVM_DTRACE_DIZ         = 64/$(LIBJVM_DTRACE_DIZ)
 108 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO)
 109 XLIBJVM_DTRACE_G_DIZ       = 64/$(LIBJVM_DTRACE_G_DIZ)
 110 
 111 $(XLIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
 112         @echo Making $@
 113         $(QUIETLY) mkdir -p 64/ ; \
 114         $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \
 115                 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
 116         [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); }
 117 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 118 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
 119 # Clear the SHF_ALLOC flag (if set) from empty section headers.
 120 # An empty section header has sh_addr == 0 and sh_size == 0.
 121 # This problem has only been seen on Solaris X64, but we call this tool
 122 # on all Solaris builds just in case.
 123         $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
 124         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO)
 125 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
 126 # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
 127 #       $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@
 128         $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(XLIBJVM_DB_DEBUGINFO) $@






 129   ifeq ($(STRIP_POLICY),all_strip)
 130         $(QUIETLY) $(STRIP) $@
 131   else
 132     ifeq ($(STRIP_POLICY),min_strip)
 133         $(QUIETLY) $(STRIP) -x $@
 134     # implied else here is no stripping at all
 135     endif
 136   endif
 137         [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO); }
 138   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 139         $(ZIPEXE) -q -y $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO)





 140         $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO)
 141         [ -f $(XLIBJVM_DB_G_DIZ) ] || { ln -s $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_G_DIZ); }
 142   endif
 143 endif
 144 
 145 $(XLIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
 146         @echo Making $@
 147         $(QUIETLY) mkdir -p 64/ ; \
 148         $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \
 149                 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
 150         [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); }
 151 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 152 # Clear the SHF_ALLOC flag (if set) from empty section headers.
 153         $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
 154         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO)
 155 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
 156 #       $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@
 157         $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(XLIBJVM_DTRACE_DEBUGINFO) $@






 158   ifeq ($(STRIP_POLICY),all_strip)
 159         $(QUIETLY) $(STRIP) $@
 160   else
 161     ifeq ($(STRIP_POLICY),min_strip)
 162         $(QUIETLY) $(STRIP) -x $@
 163     # implied else here is no stripping at all
 164     endif
 165   endif
 166         [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO); }
 167   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 168         $(ZIPEXE) -q -y $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO)





 169         $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO)
 170         [ -f $(XLIBJVM_DTRACE_G_DIZ) ] || { ln -s $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_G_DIZ); }
 171   endif
 172 endif
 173 
 174 endif # ifneq ("${ISA}","${BUILDARCH}")
 175 
 176 ifdef USE_GCC
 177 LFLAGS_GENOFFS += -D_REENTRANT
 178 else
 179 LFLAGS_GENOFFS += -mt -xnolib -norunpath
 180 endif
 181 
 182 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
 183                   $(LIBJVM.o)
 184         $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
 185                  $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc
 186 
 187 $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).so
 188         $(QUIETLY) $(LINK.CXX) -z nodefs -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \




 107 XLIBJVM_DTRACE_DIZ         = 64/$(LIBJVM_DTRACE_DIZ)
 108 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO)
 109 XLIBJVM_DTRACE_G_DIZ       = 64/$(LIBJVM_DTRACE_G_DIZ)
 110 
 111 $(XLIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
 112         @echo Making $@
 113         $(QUIETLY) mkdir -p 64/ ; \
 114         $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \
 115                 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
 116         [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); }
 117 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 118 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
 119 # Clear the SHF_ALLOC flag (if set) from empty section headers.
 120 # An empty section header has sh_addr == 0 and sh_size == 0.
 121 # This problem has only been seen on Solaris X64, but we call this tool
 122 # on all Solaris builds just in case.
 123         $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
 124         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO)
 125 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
 126 # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
 127 #         $(QUIETLY) $(OBJCOPY) 
 128 #           --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB) ;
 129 # Do this part in the '64' subdir so '64/' is not in the link name:
 130         ( set -e ; \
 131           cd 64 ; \
 132           $(QUIETLY) $(ADD_GNU_DEBUGLINK) \
 133             $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB) ; \
 134         )
 135   ifeq ($(STRIP_POLICY),all_strip)
 136         $(QUIETLY) $(STRIP) $@
 137   else
 138     ifeq ($(STRIP_POLICY),min_strip)
 139         $(QUIETLY) $(STRIP) -x $@
 140     # implied else here is no stripping at all
 141     endif
 142   endif
 143         [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO); }
 144   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 145 # Do this part in the '64' subdir so '64/' is not in the archived name:
 146         ( set -e ; \
 147           cd 64 ; \
 148           $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) \
 149             $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) ; \
 150         )
 151         $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO)
 152         [ -f $(XLIBJVM_DB_G_DIZ) ] || { ln -s $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_G_DIZ); }
 153   endif
 154 endif
 155 
 156 $(XLIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
 157         @echo Making $@
 158         $(QUIETLY) mkdir -p 64/ ; \
 159         $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \
 160                 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
 161         [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); }
 162 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 163 # Clear the SHF_ALLOC flag (if set) from empty section headers.
 164         $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
 165         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO)
 166 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
 167 #         $(QUIETLY) $(OBJCOPY) 
 168 #           --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE) ;
 169 # Do this part in the '64' subdir so '64/' is not in the link name:
 170         ( set -e ; \
 171           cd 64 ; \
 172           $(QUIETLY) $(ADD_GNU_DEBUGLINK) \
 173             $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE) ; \
 174         )
 175   ifeq ($(STRIP_POLICY),all_strip)
 176         $(QUIETLY) $(STRIP) $@
 177   else
 178     ifeq ($(STRIP_POLICY),min_strip)
 179         $(QUIETLY) $(STRIP) -x $@
 180     # implied else here is no stripping at all
 181     endif
 182   endif
 183         [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO); }
 184   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 185 # Do this part in the '64' subdir so '64/' is not in the archived name:
 186         ( set -e ; \
 187           cd 64 ; \
 188           $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) \
 189             $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO) ; \
 190         )
 191         $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO)
 192         [ -f $(XLIBJVM_DTRACE_G_DIZ) ] || { ln -s $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_G_DIZ); }
 193   endif
 194 endif
 195 
 196 endif # ifneq ("${ISA}","${BUILDARCH}")
 197 
 198 ifdef USE_GCC
 199 LFLAGS_GENOFFS += -D_REENTRANT
 200 else
 201 LFLAGS_GENOFFS += -mt -xnolib -norunpath
 202 endif
 203 
 204 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
 205                   $(LIBJVM.o)
 206         $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
 207                  $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc
 208 
 209 $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).so
 210         $(QUIETLY) $(LINK.CXX) -z nodefs -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \