Print this page
OS-2559 illumos-extra should provide native node in proto.strap


  37 
  38 AUTOCONF_OPTS += \
  39         --with-ld=/usr/bin/ld \
  40         --without-gnu-ld \
  41         --with-gnu-as \
  42         --with-as=$(DESTDIR)/usr/gnu/bin/gas \
  43         --enable-languages="c,c++" \
  44         --enable-shared \
  45         --disable-nls
  46 
  47 AUTOCONF_ENV += \
  48         DESTDIR=$(DESTDIR) \
  49         MAKE=$(MAKE)
  50 
  51 OVERRIDES += \
  52         $(AUTOCONF_CFLAGS) \
  53         STAGE1_CFLAGS="$(CFLAGS)" \
  54         CFLAGS_FOR_TARGET="$(CFLAGS)"
  55 
  56 #


















  57 # Unlike everything else, gcc is built to be a cross-compiler, really.  It
  58 # never runs on the target system, only the build system.  So it should not
  59 # be using the proto area's headers or libraries.  Its own libraries will be
  60 # built by the new compiler, and generally aren't using system headers anyway.
  61 # This is not really completely true; for example, libstdc++, and this will
  62 # need more work to be really right.  We only deliver the libraries.
  63 #
  64 AUTOCONF_CPPFLAGS =
  65 AUTOCONF_LIBS =
  66 GENLDFLAGS =
  67 
  68 PATCHES =       Patches/*
  69 ALL_TGT =       bootstrap
  70 
  71 include ../Makefile.targ
  72 include ../Makefile.targ.autoconf
  73 
  74 #
  75 # We could use the mpfr and gmp from the build system (since the compiler will
  76 # be run here), but there's no good way to make gcc build itself correctly if


  91 #
  92 $(AUTOCONF_OUT.32): | $(VER.32)/mpfr $(VER.32)/gmp
  93 
  94 $(VER.32)/mpfr: $(MPFR_VER).tar.gz | $(VER.32)
  95         -rm -rf $@
  96         mkdir -p .unpack32
  97         gtar x -C .unpack32 -z --no-same-owner -f $(MPFR_VER).tar.gz
  98         mv -f .unpack32/$(MPFR_VER) ./$@
  99         -rmdir .unpack32
 100         chmod 755 $@/configure
 101         touch $@/configure
 102 
 103 $(VER.32)/gmp: $(GMP_VER).tar.bz2 | $(VER.32)
 104         -rm -rf $@
 105         mkdir -p .unpack32
 106         gtar x -C .unpack32 -j --no-same-owner -f $(GMP_VER).tar.bz2
 107         mv -f .unpack32/$(GMP_VER) ./$@
 108         -rmdir .unpack32
 109         chmod 755 $@/configure
 110         touch $@/configure


















  37 
  38 AUTOCONF_OPTS += \
  39         --with-ld=/usr/bin/ld \
  40         --without-gnu-ld \
  41         --with-gnu-as \
  42         --with-as=$(DESTDIR)/usr/gnu/bin/gas \
  43         --enable-languages="c,c++" \
  44         --enable-shared \
  45         --disable-nls
  46 
  47 AUTOCONF_ENV += \
  48         DESTDIR=$(DESTDIR) \
  49         MAKE=$(MAKE)
  50 
  51 OVERRIDES += \
  52         $(AUTOCONF_CFLAGS) \
  53         STAGE1_CFLAGS="$(CFLAGS)" \
  54         CFLAGS_FOR_TARGET="$(CFLAGS)"
  55 
  56 #
  57 # The runtime libraries that we build into proto.strap should be made to search
  58 # for their dependencies there as well, so that programs built to run on the
  59 # build machine (from proto.strap) find the correct copies of these libraries.
  60 #
  61 ifeq ($(STRAP),strap)
  62         STRAPFIX_LINKS= \
  63                 $(DESTDIR)/lib/64 \
  64                 $(DESTDIR)/usr/lib/64
  65         STRAPFIX_FILES_32 = \
  66                 $(DESTDIR)/usr/lib/libgcc_s.so.1 \
  67                 $(DESTDIR)/usr/lib/libstdc++.so.6
  68         STRAPFIX_FILES_64 = \
  69                 $(DESTDIR)/usr/lib/64/libgcc_s.so.1 \
  70                 $(DESTDIR)/usr/lib/64/libstdc++.so.6
  71         STRAPFIX_FILES = $(STRAPFIX_FILES_32) $(STRAPFIX_FILES_64)
  72 endif
  73 
  74 #
  75 # Unlike everything else, gcc is built to be a cross-compiler, really.  It
  76 # never runs on the target system, only the build system.  So it should not
  77 # be using the proto area's headers or libraries.  Its own libraries will be
  78 # built by the new compiler, and generally aren't using system headers anyway.
  79 # This is not really completely true; for example, libstdc++, and this will
  80 # need more work to be really right.  We only deliver the libraries.
  81 #
  82 AUTOCONF_CPPFLAGS =
  83 AUTOCONF_LIBS =
  84 GENLDFLAGS =
  85 
  86 PATCHES =       Patches/*
  87 ALL_TGT =       bootstrap
  88 
  89 include ../Makefile.targ
  90 include ../Makefile.targ.autoconf
  91 
  92 #
  93 # We could use the mpfr and gmp from the build system (since the compiler will
  94 # be run here), but there's no good way to make gcc build itself correctly if


 109 #
 110 $(AUTOCONF_OUT.32): | $(VER.32)/mpfr $(VER.32)/gmp
 111 
 112 $(VER.32)/mpfr: $(MPFR_VER).tar.gz | $(VER.32)
 113         -rm -rf $@
 114         mkdir -p .unpack32
 115         gtar x -C .unpack32 -z --no-same-owner -f $(MPFR_VER).tar.gz
 116         mv -f .unpack32/$(MPFR_VER) ./$@
 117         -rmdir .unpack32
 118         chmod 755 $@/configure
 119         touch $@/configure
 120 
 121 $(VER.32)/gmp: $(GMP_VER).tar.bz2 | $(VER.32)
 122         -rm -rf $@
 123         mkdir -p .unpack32
 124         gtar x -C .unpack32 -j --no-same-owner -f $(GMP_VER).tar.bz2
 125         mv -f .unpack32/$(GMP_VER) ./$@
 126         -rmdir .unpack32
 127         chmod 755 $@/configure
 128         touch $@/configure
 129 
 130 .PHONY: strapfix
 131 strapfix: $(STRAPFIX_LINKS) $(STRAPFIX_FILES) | install
 132         for f in $(STRAPFIX_FILES_32); do \
 133                 /usr/bin/elfedit -e \
 134                     'dyn:runpath $(DESTDIR)/lib:$(DESTDIR)/usr/lib' \
 135                     $$f; \
 136         done
 137         for f in $(STRAPFIX_FILES_64); do \
 138                 /usr/bin/elfedit -e \
 139                     'dyn:runpath $(DESTDIR)/lib/64:$(DESTDIR)/usr/lib/64' \
 140                     $$f; \
 141         done
 142 
 143 $(STRAPFIX_LINKS):
 144         ln -s amd64 $@