1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 22 # 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 27 # 28 #ident "@(#)Makefile.sfw 1.15 09/05/15 SMI" 29 # 30 31 VER=gcc-3.4.3 32 33 include ../Makefile.cmd 34 35 SFW_PATH="$(SPRO_VROOT)/bin:/usr/sfw/bin:/usr/bin:/usr/ccs/bin" 36 37 all: $(VER)-$(MACH)-build/config.status 38 (cd $(VER)-$(MACH)-build; env - \ 39 CC=$(CC) \ 40 CFLAGS="$(CFLAGS)" \ 41 DESTDIR=$(ROOT) \ 42 STAGE1_CFLAGS="$(CFLAGS)" \ 43 CFLAGS_FOR_TARGET="-g -O2" \ 44 PATH=$(SFW_PATH) \ 45 LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \ 46 MAKE=$(GMAKE) $(GMAKE) \ 47 CFLAGS="$(CFLAGS)" \ 48 STAGE1_CFLAGS="$(CFLAGS)" \ 49 CFLAGS_FOR_TARGET="-g -O2" bootstrap) 50 51 CC=$(GCC) 52 CFLAGS=-g -O2 53 54 install: all 55 (cd $(VER)-$(MACH)-build; env - \ 56 CC=$(CC) \ 57 CFLAGS="$(CFLAGS)" \ 58 STAGE1_CFLAGS="$(CFLAGS)" \ 59 CFLAGS_FOR_TARGET="-g -O2" \ 60 DESTDIR=$(ROOT) \ 61 PATH=$(SFW_PATH) \ 62 LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \ 63 MAKE=$(GMAKE) $(GMAKE) \ 64 CFLAGS="$(CFLAGS)" \ 65 STAGE1_CFLAGS="$(CFLAGS)" \ 66 CFLAGS_FOR_TARGET="-g -O2" install) 67 MACH=$(MACH) $(SH) ./install-sfw 68 69 $(VER)-sparc-build/config.status: $(VER)-sparc-build $(VER)/configure 70 (cd $(VER)-sparc-build; env - \ 71 CC=$(CC) \ 72 CFLAGS="$(CFLAGS)" \ 73 DESTDIR=$(ROOT) \ 74 PATH=$(SFW_PATH) \ 75 MAKE=$(GMAKE) \ 76 $(SRC)/cmd/gcc/$(VER)/configure \ 77 --prefix=/usr/sfw \ 78 --with-as=/usr/ccs/bin/as \ 79 --without-gnu-as \ 80 --with-ld=/usr/ccs/bin/ld \ 81 --without-gnu-ld \ 82 --enable-languages="c,c++,f77,objc" \ 83 --enable-shared) 84 85 $(VER)-i386-build/config.status: $(VER)-i386-build $(VER)/configure 86 (cd $(VER)-i386-build; env - \ 87 CC=$(CC) \ 88 CFLAGS="$(CFLAGS)" \ 89 DESTDIR=$(ROOT) \ 90 PATH=$(SFW_PATH) \ 91 MAKE=$(GMAKE) \ 92 $(SRC)/cmd/gcc/$(VER)/configure \ 93 --prefix=/usr/sfw \ 94 --with-as=/usr/sfw/bin/gas \ 95 --with-gnu-as \ 96 --with-ld=/usr/ccs/bin/ld \ 97 --without-gnu-ld \ 98 --enable-languages="c,c++,f77,objc" \ 99 --enable-shared) 100 101 $(VER)/configure: $(VER).tar.gz 102 /usr/bin/gzip -dc $(VER).tar.gz | $(GTAR) xpf - --no-same-owner 103 gpatch -p0 < patch 104 gpatch -p0 < patch.gcc.makefile.in 105 gpatch -p0 < patch.gcc.configure 106 gpatch -p0 < patch.intl.configure 107 gpatch -p0 < patch.sol2.h 108 gpatch -p0 < patch.sparc.sol2-bi.h 109 gpatch -p0 < patch.i386.sol2-10.h 110 gpatch -p0 < patch.g++spec.c 111 touch $(VER)/configure 112 113 $(VER)-$(MACH)-build: 114 mkdir -p $@ 115 clean: 116 -rm -rf $(VER) $(VER)-$(MACH)-build 117 118 include ../Makefile.targ 119 120 FRC: 121