Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

OS-1639 illumos-extra should build with -zassert-deflib

OS-1640 illumos-extra is missing some dependencies
OS-1641 1-extra-stamp build erroneously uses bootstrap build
  • Loading branch information...
commit 6938e49df98462c6c15273dec1469b81271c52d4 1 parent a9d0a82
Robert Mustacchi rmustacc authored
16 Makefile
View
@@ -93,7 +93,9 @@ strap: $(STRAP_SUBDIRS)
curl: libz openssl
gzip: libz
-node.js: openssl
+node.js: openssl libm
+ncurses: libm
+dialog: ncurses
#
# pkg-config may be installed. This will actually only hurt us rather than help
@@ -106,16 +108,22 @@ node.js: openssl
$(DESTDIR)/usr/gnu/bin/gas: FRC
(cd binutils && \
- PKG_CONFIG_LIBDIR="" $(MAKE) DESTDIR=$(DESTDIR) install)
+ PKG_CONFIG_LIBDIR="" \
+ STRAP=$(STRAP) \
+ $(MAKE) DESTDIR=$(DESTDIR) install)
$(DESTDIR)/usr/bin/gcc: $(DESTDIR)/usr/gnu/bin/gas
(cd gcc4 && \
- PKG_CONFIG_LIBDIR="" $(MAKE) DESTDIR=$(DESTDIR) install)
+ PKG_CONFIG_LIBDIR="" \
+ STRAP=$(STRAP) \
+ $(MAKE) DESTDIR=$(DESTDIR) install)
$(SUBDIRS): $(DESTDIR)/usr/bin/gcc
(cd $@ && \
- PKG_CONFIG_LIBDIR="" $(MAKE) DESTDIR=$(DESTDIR) install)
+ PKG_CONFIG_LIBDIR="" \
+ STRAP=$(STRAP) \
+ $(MAKE) DESTDIR=$(DESTDIR) install)
install: $(SUBDIRS) gcc4 binutils
18 Makefile.defs
View
@@ -23,8 +23,8 @@
BASE = $(PWD)
DESTDIR = $(BASE)/../proto
-VER.32 = $(VER)-32
-VER.64 = $(VER)-64
+VER.32 = $(VER)-32$(STRAP)
+VER.64 = $(VER)-64$(STRAP)
PATH = $(DESTDIR)/usr/bin:/usr/bin:/usr/sbin:/sbin:/opt/local/bin
@@ -43,8 +43,18 @@ BUILD32 = yes
BUILD64 =
CPPFLAGS = $(SYSINCDIRS:%=-isystem $(DESTDIR)/%)
-LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
-LDFLAGS.64 = $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
+
+#
+# Because of bugs in ntp, we need to be able to refer to the target specific
+# flags as well as the generic flags later on.
+#
+ifneq ($(STRAP),strap)
+ GENLDFLAGS = -Wl,-zassert-deflib -Wl,-zfatal-warnings
+endif
+T32_LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
+T64_LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
+LDFLAGS = $(T32_LDFLAGS) $(GENLDFLAGS)
+LDFLAGS.64 = $(T64_LDFLAGS) $(GENLDFLAGS)
AUTOCONF_CC = CC="$(GCC)"
AUTOCONF_CXX = CXX="$(GXX)"
3  Makefile.targ
View
@@ -76,4 +76,5 @@ $(VER.64)/$(UNPACK_SENTINEL): $(TARBALL)
touch $(VER.64)/$(UNPACK_SENTINEL)
clean:
- -rm -rf $(VER) $(VER.32) $(VER.64) .unpack32 .unpack64 $(CLEANFILES)
+ -rm -rf $(VER) $(VER.32) $(VER.64) .unpack32 .unpack64 $(CLEANFILES) \
+ $(VER.32)strap $(VER.64)strap
2  binutils/Makefile
View
@@ -32,7 +32,7 @@ AUTOCONF_OPTS = \
--enable-64-bit-bfd \
--program-prefix=g
-AUTOCONF_ENV = \
+AUTOCONF_ENV += \
CC=gcc \
CXX=g++ \
DESTDIR=$(DESTDIR) \
13 bzip2/Makefile
View
@@ -22,14 +22,15 @@
# Copyright (c) 2012, Joyent Inc. All rights reserved.
#
-VER = bzip2-1.0.6
+BVER = bzip2-1.0.6
+VER = $(BVER)$(STRAP)
include ../Makefile.defs
OVERRIDES += CC="$(GCC)"
OVERRIDES.64 += CC="$(GCC.64)"
-CLEANFILES += bzgrep.tmp
+CLEANFILES += bzgrep.tmp $(VER)strap
include ../Makefile.targ
@@ -46,8 +47,12 @@ all_64: $(VER)/amd64/Makefile
install: all
/usr/bin/ksh93 ./install-bzip2 $(PWD)/$(VER)
-$(VER)/Makefile.dist: $(VER).tar.gz
- gzip -dc $(VER).tar.gz | tar xopf -
+$(VER)/Makefile.dist: $(BVER).tar.gz
+ -rm -rf $(VER)
+ mkdir -p .unpack
+ gtar x -C .unpack -z --no-same-owner -f $(BVER).tar.gz
+ mv -f .unpack/$(BVER) $(VER)
+ -rmdir .unpack
(cd $(VER); gpatch -p1 < ../bzip2.patch)
cp $(VER)/Makefile $(VER)/Makefile.dist
8 bzip2/Makefile.com
View
@@ -45,10 +45,16 @@ bzip2recover_OBJECTS = \
LDFLAGS += -Wl,-Bdirect -Wl,-zdefs -Wl,-ztext -Wl,-zcombreloc
LDFLAGS += -Wl,-M../../mapfile -Wl,-h,$(DYNLIB)
LDFLAGS += -L. -L$(DESTDIR)/usr/lib -L$(DESTDIR)/lib
+ifneq ($(STRAP),strap)
+ LDFLAGS += $(GENLDFLAGS)
+endif
LDLIBS += -lc
PROGS = bzip2 bzip2recover
-PROG_LDFLAGS += -Wl,-Bdirect -L.
+PROG_LDFLAGS += -Wl,-Bdirect -L.
+ifneq ($(STRAP),strap)
+ PROG_LDFLAGS += $(GENLDFLAGS)
+endif
bzip2_LDLIBS += -lbz2
# --- Generic ---
23 cpp/Makefile
View
@@ -23,15 +23,15 @@
include ../Makefile.defs
-PROG = cpp
+PROG = cpp$(STRAP)
PROGDIR = /usr/lib
OBJS = \
- cpp.o \
- y.tab.o
+ cpp.o$(STRAP) \
+ y.tab.o$(STRAP)
CLEANFILES += \
- y.tab.c
+ y.tab.c$(STRAP)
CFLAGS += -O2
LD = $(GCC)
@@ -45,17 +45,28 @@ all: $(PROG)
install: $(PROTOFILES)
clean:
- -rm -f $(OBJS) $(CLEANFILES) $(PROG)
+ -rm -f $(OBJS) $(CLEANFILES) $(PROG) *strap
$(PROG): $(OBJS)
$(LINK.prog)
-%.o: %.c
+%.o$(STRAP): %.c
$(COMPILE.c)
+#
+# We need to distinguish between the cpp build in the bootstrap and the cpp
+# built normally. However, when we install it, they need to have the same name.
+# To handle this we add a small bit of shell logic. Note that the mv bit is
+# explicitly ignored and instead we do a final check to make sure we have
+# something called cpp at the very end which will either be because of install
+# or because of the later mv.
+#
$(DESTDIR)$(PROGDIR)/%: %
mkdir -p $(DESTDIR)$(PROGDIR)
/usr/sbin/install -m 0755 -f $(DESTDIR)$(PROGDIR) $(PROG)
+ -[ "$(PROG)" == "cppstrap" ] && mv -f $(DESTDIR)$(PROGDIR)/$(PROG) \
+ $(DESTDIR)$(PROGDIR)/cpp
+ [ -f "$(DESTDIR)$(PROGDIR)/cpp" ]
y.tab.c: cpy.y
$(YACC) cpy.y
20 libxml/Makefile
View
@@ -30,10 +30,14 @@
# build system.
#
-VER=libxml2-2.7.6
+BVER=libxml2-2.7.6
+VER=$(BVER)$(STRAP)
VER64=$(VER)-64
LDFLAGS= -z defs -z text -z combreloc -lpthread -lc -nodefaultlibs
+ifneq ($(STRAP),strap)
+ LDFLAGS += $(GENLDFLAGS)
+endif
LARGEFILES= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-fno-builtin
@@ -101,15 +105,15 @@ $(VER64)/config.status: $(VER64)/configure
cp mapfile $(VER64)/libxml2.syms
patch -N $(VER64)/libtool < libtool.patch
-$(VER)/configure: $(VER).tar.gz
- mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
- mv tmp/$(VER) $(VER); rmdir tmp
+$(VER)/configure: $(BVER).tar.gz
+ mkdir -p tmp; gzip -dc $(BVER).tar.gz | (cd tmp; tar xopf -)
+ mv tmp/$(BVER) $(VER); rmdir tmp
touch $(VER)/configure
-$(VER64)/configure: $(VER).tar.gz
- mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
- mv tmp/$(VER) $(VER64); rmdir tmp
+$(VER64)/configure: $(BVER).tar.gz
+ mkdir -p tmp; gzip -dc $(BVER).tar.gz | (cd tmp; tar xopf -)
+ mv tmp/$(BVER) $(VER64); rmdir tmp
touch $(VER64)/configure
clean:
- -rm -rf $(VER) $(VER64)
+ -rm -rf $(VER) $(VER64) $(VER)strap $(VER64)strap
4 libz/Makefile
View
@@ -55,6 +55,10 @@ LDSHARED_FLAGS = \
-Wl,-zcombreloc \
-Wl,-M,../mapfile
+ifneq ($(STRAP),strap)
+ LDSHARED_FLAGS += $(GENLDFLAGS)
+endif
+
LDSHARED_FLAGS.32 = $(LDSHARED_FLAGS) $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
LDSHARED_FLAGS.64 = $(LDSHARED_FLAGS) $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
LDSHARED_LIBS = -lc
14 ntp/Makefile
View
@@ -46,6 +46,20 @@ AUTOCONF_OPTS += \
CFLAGS += -O2
+#
+# ntp unfortunately shares a symbol name with libc and generates a warning that
+# would normally be fatal:
+# ld: warning: symbol 'monitor' has differing types:
+# (file ../libntp/libntp.a(audio.o) type=OBJT; file
+# .../proto/usr/lib/libc.so type=FUNC);
+# ../libntp/libntp.a(audio.o) definition taken
+#
+# Until such a time as this is fixed, we instead ignore -zfatal-warnings and
+# just add -zassert-deflib. Unfortunately we don't have a programatic way to
+# check it currently, but this will have to do for now.
+#
+LDFLAGS = $(T32_LDFLAGS) -zassert-deflib
+
AUTOCONF_ENV += \
LD_OPTIONS="$(LDFLAGS)" \
DESTDIR="$(DESTDIR)" \
8 openssl/Makefile
View
@@ -37,11 +37,13 @@ all: all32 all64
all32: $(VER)/$(CONFIG_STATUS)
cd $(VER); env - PATH=$(PATH) \
"CFLAGS=$(CFLAGS)" \
+ "LDFLAGS=$(LDFLAGS)" \
gmake
all64: $(VER64)/$(CONFIG_STATUS)
cd $(VER64); env - PATH=$(PATH) \
"CFLAGS=$(CFLAGS)" \
+ "LDFLAGS=$(LDFLAGS)" \
gmake
# opensslconf.h is patched to ensure suitability for both 64bit and 32bit
@@ -67,8 +69,8 @@ install64: all64
MACH64=amd64 VERDIR=$(VER64) BASE=$(BASE) DESTDIR=$(DESTDIR) \
VERSION=$(VERSION) ksh93 ./install-sfw-64
-$(VER)/configure: $(VER)-src
- cp -r $(VER)-src $(VER)
+$(VER)/configure: $(BVER)-src
+ cp -r $(BVER)-src $(VER)
( cd $(VER) ; gpatch -p1 < ../configure.patch )
( cd $(VER) ; gpatch -p1 < ../aesni.patch )
cp engine_pkcs11/* $(VER)/crypto/engine/
@@ -76,4 +78,4 @@ $(VER)/configure: $(VER)-src
cp -r $(VER) $(VER64)
clean:
- -rm -rf $(VER) $(VER64)
+ -rm -rf $(VER) $(VER64) $(VER)strap $(VER64)strap
7 openssl/Makefile.com
View
@@ -28,7 +28,8 @@
METAINFO_FILE = ../METADATA
-VER = openssl-0.9.8x
+BVER = openssl-0.9.8x
+VER = $(BVER)$(STRAP)
VER64 =$(VER)-64
TARBALL = $(VER).tar.gz
@@ -39,6 +40,10 @@ PKCS11_LIB64 = /usr/lib/64/libpkcs11.so.1
CFLAGS = -DSOLARIS_OPENSSL -DNO_WINDOWS_BRAINDEATH
CFLAGS64 = $(CFLAGS)
+ifneq ($(STRAP),strap)
+ LDFLAGS += $(GENLDFLAGS)
+endif
+
GENERIC_CONFIGURE_OPTIONS = \
$(CFLAGS) \
--openssldir=/etc/openssl \
Please sign in to comment.
Something went wrong with that request. Please try again.