Skip to content

Commit

Permalink
OS-825 build everything in illumos-extra out of the gcc in the proto …
Browse files Browse the repository at this point in the history
…area

OS-842 parallelize illumos-extra
OS-716 platform build depends on Sun Studio
  • Loading branch information
JohnSonnenschein committed Feb 14, 2012
1 parent 5674ac8 commit 5ee0fb0
Show file tree
Hide file tree
Showing 45 changed files with 330 additions and 1,928 deletions.
19 changes: 12 additions & 7 deletions Makefile
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions bash/Makefile
Expand Up @@ -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

Expand Down
9 changes: 4 additions & 5 deletions bzip2/Makefile
Expand Up @@ -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
Expand All @@ -30,6 +30,7 @@

VER=bzip2-1.0.6
VER64=$(VER)-64
GCC=$(DESTDIR)/usr/sfw/bin/gcc

all: real-all

Expand 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)
Expand Down
14 changes: 7 additions & 7 deletions bzip2/makefile.build
Expand Up @@ -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 \
Expand All @@ -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

Expand All @@ -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
20 changes: 10 additions & 10 deletions bzip2/makefile.build.64
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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 $<
8 changes: 4 additions & 4 deletions curl/Makefile
Expand Up @@ -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)
Expand Down
9 changes: 6 additions & 3 deletions dialog/Makefile
Expand Up @@ -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 )
Expand Down
100 changes: 0 additions & 100 deletions gcc/Makefile

This file was deleted.

Binary file removed gcc/gcc-3.4.3.tar.gz
Binary file not shown.

0 comments on commit 5ee0fb0

Please sign in to comment.