Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
  • Loading branch information...
commit c0d6d32ce859812319c251402b37440ccba5b412 1 parent 16e0376
@jclulow jclulow authored
View
3  Makefile
@@ -74,6 +74,7 @@ STRAP_SUBDIRS = \
libxml \
libz \
make \
+ node.js \
nss-nspr \
openssl1x \
perl
@@ -128,7 +129,7 @@ $(DESTDIR)/usr/bin/gcc: $(DESTDIR)/usr/gnu/bin/gas
(cd gcc4 && \
PKG_CONFIG_LIBDIR="" \
STRAP=$(STRAP) \
- $(MAKE) DESTDIR=$(DESTDIR) install)
+ $(MAKE) DESTDIR=$(DESTDIR) install strapfix)
$(SUBDIRS): $(DESTDIR)/usr/bin/gcc
(cd $@ && \
View
35 gcc4/Makefile
@@ -54,6 +54,24 @@ OVERRIDES += \
CFLAGS_FOR_TARGET="$(CFLAGS)"
#
+# The runtime libraries that we build into proto.strap should be made to search
+# for their dependencies there as well, so that programs built to run on the
+# build machine (from proto.strap) find the correct copies of these libraries.
+#
+ifeq ($(STRAP),strap)
+ STRAPFIX_LINKS= \
+ $(DESTDIR)/lib/64 \
+ $(DESTDIR)/usr/lib/64
+ STRAPFIX_FILES_32 = \
+ $(DESTDIR)/usr/lib/libgcc_s.so.1 \
+ $(DESTDIR)/usr/lib/libstdc++.so.6
+ STRAPFIX_FILES_64 = \
+ $(DESTDIR)/usr/lib/64/libgcc_s.so.1 \
+ $(DESTDIR)/usr/lib/64/libstdc++.so.6
+ STRAPFIX_FILES = $(STRAPFIX_FILES_32) $(STRAPFIX_FILES_64)
+endif
+
+#
# Unlike everything else, gcc is built to be a cross-compiler, really. It
# never runs on the target system, only the build system. So it should not
# be using the proto area's headers or libraries. Its own libraries will be
@@ -108,3 +126,20 @@ $(VER.32)/gmp: $(GMP_VER).tar.bz2 | $(VER.32)
-rmdir .unpack32
chmod 755 $@/configure
touch $@/configure
+
+.PHONY: strapfix
+strapfix: $(STRAPFIX_LINKS) $(STRAPFIX_FILES) | install
+ for f in $(STRAPFIX_FILES_32); do \
+ /usr/bin/elfedit -e \
+ 'dyn:runpath $(DESTDIR)/lib:$(DESTDIR)/usr/lib' \
+ $$f; \
+ done
+ for f in $(STRAPFIX_FILES_64); do \
+ /usr/bin/elfedit -e \
+ 'dyn:runpath $(DESTDIR)/lib/64:$(DESTDIR)/usr/lib/64' \
+ $$f; \
+ done
+
+$(STRAPFIX_LINKS):
+ mkdir -p `dirname $@`
+ ln -s amd64 $@
View
5 libz/Makefile
@@ -63,6 +63,11 @@ LDSHARED_FLAGS.32 = $(LDSHARED_FLAGS) $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
LDSHARED_FLAGS.64 = $(LDSHARED_FLAGS) $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
LDSHARED_LIBS = -lc
+ifeq ($(STRAP),strap)
+ LDSHARED_FLAGS.32 += $(SYSLIBDIRS:%=-R$(DESTDIR)/%)
+ LDSHARED_FLAGS.64 += $(SYSLIBDIRS:%=-R$(DESTDIR)/%/64)
+endif
+
LDFLAGS += -L. -lz -lc
LDFLAGS.64 += -L. -lz -lc
View
6 node.js/Makefile
@@ -22,7 +22,7 @@
#
MAJOR_VER = 0.8
-VER = node-v0.8.20
+VER = node-v0.8.20
include ../Makefile.defs
@@ -46,6 +46,10 @@ CFLAGS += -Wno-unknown-pragmas
#
LDFLAGS += -lumem
+ifeq ($(STRAP),strap)
+ LDFLAGS += $(SYSLIBDIRS:%=-R$(DESTDIR)/%)
+endif
+
AUTOCONF_OPTS += \
--with-dtrace \
--openssl-use-sys \
View
5 openssl1x/Makefile
@@ -83,6 +83,11 @@ CFLAGS.64 += \
LIBS += -lsocket -lnsl
+ifeq ($(STRAP),strap)
+ LDFLAGS += $(SYSLIBDIRS:%=-R$(DESTDIR)/%)
+ LDFLAGS.64 += $(SYSLIBDIRS:%=-R$(DESTDIR)/%/64)
+endif
+
PATCHES = Patches/*
AUTOCONF_ENV =
Please sign in to comment.
Something went wrong with that request. Please try again.