Print this page
10593 illumos build should not use kernel modules as link-editor input

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/genunix/Makefile
          +++ new/usr/src/uts/intel/genunix/Makefile
↓ open down ↓ 148 lines elided ↑ open up ↑
 149  149  clobber:        $(CLOBBER_DEPS)
 150  150  
 151  151  lint:           $(LINT_DEPS)
 152  152  
 153  153  modlintlib:     $(MODLINTLIB_DEPS)
 154  154  
 155  155  clean.lint:     $(CLEAN_LINT_DEPS)
 156  156  
 157  157  install:        $(INSTALL_DEPS)
 158  158  
 159      -$(LIBGEN):      $(GENUNIX) $(LIBSTUBS)
 160      -        $(BUILD.SO) $(GENUNIX) $(LIBSTUBS)
      159 +# Due to what seems to be an issue in GCC 4 generated DWARF containing
      160 +# symbolic relocations against non-allocatable .debug sections, libgenunix.so
      161 +# must be built from a stripped object, thus we create an intermediary
      162 +# libgenunix.o we can safely strip.
      163 +LIBGENUNIX_O = $(OBJS_DIR)/libgenunix.o
      164 +CLEANFILES += $(LIBGENUNIX_O)
      165 +
      166 +$(LIBGENUNIX_O): $(OBJECTS)
      167 +        $(LD) -r -o $(OBJS_DIR)/libgenunix.o $(OBJECTS)
      168 +        $(STRIP) -x $(OBJS_DIR)/libgenunix.o
      169 +
      170 +$(LIBGEN):      $(LIBGENUNIX_O) $(LIBSTUBS)
      171 +        $(BUILD.SO) $(LIBGENUNIX_O) $(LIBSTUBS)
 161  172  
 162  173  $(IPCTF_TARGET) ipctf_target: FRC
 163  174          @cd $(IPDRV_DIR); pwd; $(MAKE) ipctf.$(OBJS_DIR)
 164  175          @pwd
 165  176  
 166  177  $(GENUNIX): $(IPCTF_TARGET) $(OBJECTS)
 167  178          $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS)
 168  179          $(CTFMERGE_GENUNIX_MERGE)
 169  180          $(POST_PROCESS)
 170  181  
↓ open down ↓ 16 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX