Permalink
Browse files

OS-825 build everything in illumos-extra out of the gcc in the proto …

…area

OS-842 parallelize illumos-extra
OS-716 platform build depends on Sun Studio
  • Loading branch information...
1 parent 83bcbe9 commit 070825b87750ba23ead6d854772cc23e66e4cf87 @JohnSonnenschein JohnSonnenschein committed Feb 22, 2012
View
@@ -23,13 +23,15 @@
# To build everything just run 'gmake' in this directory.
#
-PATH=/sbin:/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/opt/local/bin
BASE=$(PWD)
DESTDIR=$(BASE)/proto
-SUBDIRS= bash bzip2 curl dialog g11n gcc gcc4 gnupg gtar gzip less libexpat \
+PATH=$(DESTDIR)/usr/sfw/bin:/usr/sfw/bin:/usr/gnu/bin:/opt/local/bin:/sbin:/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/opt/local/bin
+SUBDIRS= bash bzip2 curl dialog g11n gnupg gtar gzip less libexpat \
libidn libm libxml libz ncurses node.js nss-nspr ntp openldap openssl \
perl rsync screen socat uuid vim wget
+PARALLEL=-j128
+
NAME=illumos-extra
AWK=$(shell (which gawk 2>/dev/null | grep -v "^no ") || which awk)
@@ -42,7 +44,7 @@ endif
GITDESCRIBE=g$(shell git describe --all --long | $(AWK) -F'-g' '{print $$NF}')
TARBALL=$(NAME)-$(BRANCH)-$(TIMESTAMP)-$(GITDESCRIBE).tgz
--include Makefile.inc
+all: $(SUBDIRS)
#
# pkg-config may be installed. This will actually only hurt us rather than help
@@ -52,13 +54,16 @@ TARBALL=$(NAME)-$(BRANCH)-$(TIMESTAMP)-$(GITDESCRIBE).tgz
# environment variable nulls out the search path. Other vars just control what
# gets appended.
#
-$(SUBDIRS): FRC
- cd $@; PKG_CONFIG_LIBDIR="" $(MAKE) DESTDIR=$(DESTDIR) install
+$(DESTDIR)/usr/sfw/bin/gcc: FRC
+ cd gcc4; PKG_CONFIG_LIBDIR="" $(MAKE) PARALLEL=$(PARALLEL) DESTDIR=$(DESTDIR) install
+
+$(SUBDIRS): $(DESTDIR)/usr/sfw/bin/gcc
+ cd $@; PKG_CONFIG_LIBDIR="" $(MAKE) PARALLEL=$(PARALLEL) DESTDIR=$(DESTDIR) install
-install: $(SUBDIRS)
+install: $(SUBDIRS) gcc4
clean:
- -for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) DESTDIR=$(DESTDIR) clean); done
+ -for dir in $(SUBDIRS) gcc4; do (cd $$dir; $(MAKE) DESTDIR=$(DESTDIR) clean); done
-rm -rf proto
manifest:
View
@@ -18,13 +18,13 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010 Joyent Inc.
+# Copyright (c) 2012 Joyent Inc.
#
VER=bash-4.1
BASE=$(PWD)
DESTDIR=$(BASE)/../proto
-MAKE=gmake
+MAKE="gmake $(PARALLEL)"
-include ../Makefile.inc
View
@@ -21,7 +21,7 @@
#
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
#
-# Copyright (c) 2010 Joyent Inc.
+# Copyright (c) 2012 Joyent Inc.
#
# This makefile is unusual, because it builds both 32 and 64 bit
@@ -30,6 +30,7 @@
VER=bzip2-1.0.6
VER64=$(VER)-64
+GCC=$(DESTDIR)/usr/sfw/bin/gcc
all: real-all
@@ -38,13 +39,11 @@ all: real-all
all32: $(VER)/Makefile
(cd $(VER); env \
- "MAKE=/usr/ccs/bin/make" \
- /usr/ccs/bin/make)
+ CC=$(GCC) gmake)
all64: $(VER64)/Makefile
(cd $(VER64); env \
- "MAKE=/usr/ccs/bin/make" \
- /usr/ccs/bin/make)
+ CC="$(GCC) -m64 -fPIC" gmake)
install: all
/usr/bin/ksh93 ./install-bzip2 $(VER)
View
@@ -25,7 +25,7 @@
# Copyright (c) 2010 Joyent Inc.
#
-CFLAGS = -KPIC -D_FILE_OFFSET_BITS=64
+CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64
OBJS= blocksort.o \
huffman.o \
@@ -35,18 +35,18 @@ OBJS= blocksort.o \
decompress.o \
bzlib.o
-all: libbz2.so .WAIT bzip2 bzip2recover
+all: libbz2.so bzip2 bzip2recover
bzip2: libbz2.so bzip2.o
- /opt/SUNWspro/bin/cc $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2
+ gcc $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2
bzip2recover: bzip2recover.o
- /opt/SUNWspro/bin/cc $(CFLAGS) -o bzip2recover bzip2recover.o
+ gcc $(CFLAGS) -o bzip2recover bzip2recover.o
libbz2.so: $(OBJS)
rm -f libbz2.so libbz2.so.1
- /opt/SUNWspro/bin/cc $(CFLAGS) $(XREGSFLAG) -G -h libbz2.so.1 -o libbz2.so.1 \
- -z defs -z text -zcombreloc $(OBJS) -M ../mapfile -L. \
+ gcc $(CFLAGS) $(XREGSFLAG) -shared -o libbz2.so.1 \
+ -Wl,-z,defs,-z,text,-zcombreloc $(OBJS) -Wl,-M,../mapfile -L. \
-L$(DESTDIR)/usr/lib -lc
ln -s libbz2.so.1 libbz2.so
@@ -68,4 +68,4 @@ test: bzip2
blocksort.o: blocksort.c
@cat words0
- /opt/SUNWspro/bin/cc $(CFLAGS) -c blocksort.c
+ gcc $(CFLAGS) -c blocksort.c
View
@@ -22,10 +22,10 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright (c) 2010 Joyent Inc.
+# Copyright (c) 2012 Joyent Inc.
#
-CFLAGS64 = -m64 -KPIC -D_FILE_OFFSET_BITS=64
+CFLAGS64 = -m64 -fPIC -D_FILE_OFFSET_BITS=64
BLOBJ= blocksort.o
@@ -41,18 +41,18 @@ BZOBJS= \
bzip2.o \
bzip2recover.o
-all: libbz2.so .WAIT bzip2 bzip2recover
+all: libbz2.so bzip2 bzip2recover
bzip2: libbz2.so bzip2.o
- /opt/SUNWspro/bin/cc $(CFLAGS64) -o bzip2 bzip2.o -L. -lbz2
+ gcc $(CFLAGS64) -o bzip2 bzip2.o -L. -lbz2
bzip2recover: bzip2recover.o
- /opt/SUNWspro/bin/cc $(CFLAGS64) -o bzip2recover bzip2recover.o
+ gcc $(CFLAGS64) -o bzip2recover bzip2recover.o
libbz2.so: $(BLOBJ) $(OBJS)
rm -f libbz2.so libbz2.so.1
- /opt/SUNWspro/bin/cc $(CFLAGS64) $(XREGSFLAG64) -G -h libbz2.so.1 -o libbz2.so.1 \
- -z defs -z text -zcombreloc $(BLOBJ) $(OBJS) -M ../mapfile -L. \
+ gcc $(CFLAGS64) $(XREGSFLAG64) -shared -o libbz2.so.1 \
+ -Wl,-z,defs,-z,text,-zcombreloc,$(BLOBJ) $(OBJS) -Wl,-M,../mapfile -L. \
-L$(DESTDIR)/usr/lib -lc
ln -s libbz2.so.1 libbz2.so
@@ -74,7 +74,7 @@ test: bzip2
blocksort.o: blocksort.c
@cat words0
- /opt/SUNWspro/bin/cc $(CFLAGS64) $(XREGSFLAG64) -c blocksort.c
+ gcc $(CFLAGS64) $(XREGSFLAG64) -c blocksort.c
-$(OBJS) $(BZOBJS):
- /opt/SUNWspro/bin/cc $(CFLAGS64) $(XREGSFLAG64) -c $<
+#$(OBJS) $(BZOBJS):
+# gcc $(CFLAGS64) $(XREGSFLAG64) -c $<
View
@@ -18,25 +18,25 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010 Joyent Inc.
+# Copyright (c) 2012 Joyent Inc.
#
VER=curl-7.21.2
BASE=$(PWD)
DESTDIR=$(BASE)/../proto
-GCC=/usr/bin/gcc
+GCC=$(DESTDIR)/usr/sfw/bin/gcc
-include ../Makefile.inc
all: $(VER)/config.status
( cd $(VER); \
- gmake CC=$(GCC))
+ gmake $(PARALLEL) CC=$(GCC))
install: all
mkdir -p $(DESTDIR)
( cd $(VER); \
- gmake CC=/usr/bin/gcc DESTDIR=$(DESTDIR) install)
+ gmake $(PARALLEL) CC=$(GCC) DESTDIR=$(DESTDIR) install)
clean:
rm -rf $(VER)
View
@@ -29,20 +29,23 @@ VER=dialog-1.1-20111020
BASE=$(PWD)
DESTDIR=$(BASE)/../proto
+GCC=$(DESTDIR)/usr/sfw/bin/gcc
+GXX=$(DESTDIR)/usr/sfw/bin/g++
+
all: $(VER)/src/auto/config.status
(cd $(VER); env \
- "CC=gcc" "CXX=g++" \
+ "CC=$(GCC)" "CXX=$(GXX)" \
make -e)
install: all
(cd $(VER); env \
- "CC=gcc" "CXX=g++" \
+ "CC=$(GCC)" "CXX=$(GXX)" \
DESTDIR=$(DESTDIR) \
make -e install)
$(VER)/src/auto/config.status: $(VER)/configure
(cd $(VER); env \
- "CC=gcc" "CXX=g++" \
+ "CC=$(GCC)" "CXX=$(GXX)" \
./configure --prefix=/usr \
--mandir=/usr/share/man \
--disable-Xdialog )
View
@@ -1,100 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Copyright 2011 Joyent Inc.
-#
-
-VER=gcc-3.4.3
-
-SFW_PATH="/usr/sfw/bin:/usr/bin:/usr/ccs/bin:/opt/local/bin"
-
-BASE=$(PWD)
-DESTDIR=$(BASE)/../proto
-
-all: $(VER)-i386-build/config.status
- (cd $(VER)-i386-build; env - \
- CC=gcc \
- CFLAGS="-g -O2" \
- DESTDIR=$(DESTDIR) \
- STAGE1_CFLAGS="-g -O2" \
- CFLAGS_FOR_TARGET="-g -O2" \
- PATH=$(SFW_PATH) \
- MAKE=gmake gmake \
- CFLAGS="-g -O2" \
- STAGE1_CFLAGS="-g -O2" \
- CFLAGS_FOR_TARGET="-g -O2" bootstrap)
-
-install: all
- (cd $(VER)-i386-build; env - \
- CC=gcc \
- CFLAGS="-g -O2" \
- STAGE1_CFLAGS="-g -O2" \
- CFLAGS_FOR_TARGET="-g -O2" \
- DESTDIR=$(DESTDIR) \
- PATH=$(SFW_PATH) \
- MAKE=gmake gmake \
- CFLAGS="-g -O2" \
- STAGE1_CFLAGS="-g -O2" \
- CFLAGS_FOR_TARGET="-g -O2" install)
- ROOT=$(DESTDIR) ksh93 ./install-sfw
-
-$(VER)-i386-build/config.status: clean $(VER)-i386-build $(VER)/configure
- (cd $(VER)-i386-build; env - \
- CC=gcc \
- CFLAGS="-g -O2" \
- DESTDIR=$(DESTDIR) \
- PATH=$(SFW_PATH) \
- MAKE=gmake \
- ../$(VER)/configure \
- --prefix=/usr/sfw \
- --with-as=/usr/sfw/bin/gas \
- --with-gnu-as \
- --with-ld=/usr/ccs/bin/ld \
- --without-gnu-ld \
- --enable-languages="c,c++,f77,objc" \
- --enable-shared)
-
-$(VER)/configure: $(VER).tar.gz
- /usr/bin/gzip -dc $(VER).tar.gz | gtar xpf - --no-same-owner
- gpatch -p0 < patch
- gpatch -p0 < patch.gcc.makefile.in
- gpatch -p0 < patch.gcc.configure
- gpatch -p0 < patch.intl.configure
- gpatch -p0 < patch.sol2.h
- gpatch -p0 < patch.i386.sol2-10.h
- gpatch -p0 < patch.g++spec.c
- gpatch -p0 < patch.c-parse.in
- touch $(VER)/configure
-
-$(VER)-i386-build:
- mkdir -p $@
-
-clean:
- -rm -rf $(VER) $(VER)-i386-build
-
-
-FRC:
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 070825b

Please sign in to comment.