diff options
-rw-r--r-- | gnu/lib/libstdc++-v3/Makefile.common | 9 | ||||
-rw-r--r-- | gnu/usr.bin/cc/Makefile.inc | 7 | ||||
-rw-r--r-- | gnu/usr.bin/cc/c++/Makefile | 13 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc/Makefile | 11 | ||||
-rw-r--r-- | gnu/usr.bin/cc/libobjc/Makefile | 4 |
5 files changed, 36 insertions, 8 deletions
diff --git a/gnu/lib/libstdc++-v3/Makefile.common b/gnu/lib/libstdc++-v3/Makefile.common index 53551158838..77b4e210226 100644 --- a/gnu/lib/libstdc++-v3/Makefile.common +++ b/gnu/lib/libstdc++-v3/Makefile.common @@ -1,4 +1,11 @@ -# $OpenBSD: Makefile.common,v 1.4 2015/05/14 02:56:01 jsg Exp $ +# $OpenBSD: Makefile.common,v 1.5 2017/07/24 19:22:49 robert Exp $ + +.include <bsd.own.mk> + +.if ${COMPILER_VERSION:L} == "clang" +CC= gcc +CXX= g++ +.endif GCCDIR= ${.CURDIR}/../../gcc/gcc GCCLIB= ${GCCDIR}/gcc diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index ba18fb63649..2175463185b 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -1,8 +1,13 @@ # $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.66.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile.inc,v 1.6 2012/09/16 20:46:35 kettenis Exp $ +# $OpenBSD: Makefile.inc,v 1.7 2017/07/24 19:22:49 robert Exp $ .include "../Makefile.inc" +.if ${COMPILER_VERSION:L} == "clang" +CC= gcc +CXX= g++ +.endif + # Sometimes this is .include'd several times... .if !defined(__CC_MAKEFILE_INC__) __CC_MAKEFILE_INC__= ${MFILE} diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile index 9cc438eefd4..b5a33bafa58 100644 --- a/gnu/usr.bin/cc/c++/Makefile +++ b/gnu/usr.bin/cc/c++/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/c++/Makefile,v 1.24.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.1 2009/10/15 20:50:20 robert Exp $ +# $OpenBSD: Makefile,v 1.2 2017/07/24 19:22:49 robert Exp $ .include <bsd.own.mk> @@ -10,10 +10,19 @@ PROG= c++ SRCS+= g++spec.c -LINKS= ${BINDIR}/c++ ${BINDIR}/g++ + +.if ${COMPILER_VERSION:L} == "gcc4" +LINKS= ${BINDIR}/g++ ${BINDIR}/c++ +.endif + NOMAN= Yes DPADD= ${LIBCPP} ${LIBIBERTY} LDADD= ${LIBCPP} ${LIBIBERTY} +realinstall: + ${INSTALL} ${INSTALL_COPY} -S ${INSTALL_STRIP} \ + -o ${BINOWN} -g ${BINGRP} \ + -m ${BINMODE} ${PROG} ${DESTDIR}${BINDIR}/${PROG:S/c/g/g} + .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile index d017212cff7..a4f8590c347 100644 --- a/gnu/usr.bin/cc/cc/Makefile +++ b/gnu/usr.bin/cc/cc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/cc/Makefile,v 1.33.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.7 2016/11/08 17:39:12 tb Exp $ +# $OpenBSD: Makefile,v 1.8 2017/07/24 19:22:49 robert Exp $ .include <bsd.own.mk> @@ -12,13 +12,20 @@ SRCS+= gccspec.c SPECDIR= /usr/lib/gcc-lib/${GCC_TARGET}/${BASEVER} -LINKS= ${BINDIR}/cc ${BINDIR}/gcc +.if ${COMPILER_VERSION:L} == "gcc4" +LINKS= ${BINDIR}/gcc ${BINDIR}/cc +.endif beforeinstall: .for dir in /usr/lib/gcc-lib /usr/lib/gcc-lib/${GCC_TARGET} ${SPECDIR} ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${DIRMODE} ${DESTDIR}${dir} .endfor +realinstall: + ${INSTALL} ${INSTALL_COPY} -S ${INSTALL_STRIP} \ + -o ${BINOWN} -g ${BINGRP} \ + -m ${BINMODE} ${PROG} ${DESTDIR}${BINDIR}/g${PROG} + afterinstall: ${.OBJDIR}/cc -dumpspecs > ${DESTDIR}${SPECDIR}/specs chown ${BINOWN}:${BINGRP} ${DESTDIR}${SPECDIR}/specs diff --git a/gnu/usr.bin/cc/libobjc/Makefile b/gnu/usr.bin/cc/libobjc/Makefile index a371648942f..df06dcdecc3 100644 --- a/gnu/usr.bin/cc/libobjc/Makefile +++ b/gnu/usr.bin/cc/libobjc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libobjc/Makefile,v 1.34.2.1 2009/08/03 08:13:06 kensmith Exp $ -# $OpenBSD: Makefile,v 1.7 2017/07/10 21:30:37 espie Exp $ +# $OpenBSD: Makefile,v 1.8 2017/07/24 19:22:49 robert Exp $ OBJCDIR=${.CURDIR}/../../../gcc/libobjc GCCDIR= ${.CURDIR}/../../../gcc/gcc @@ -57,7 +57,7 @@ BUILDFIRST = ${GENHDRS} .SUFFIXES: .m # ObjC -OBJC?= cc +OBJC?= ${CC} OBJCFLAGS?= ${CFLAGS} ${CPPFLAGS} -Wno-import COMPILE.m?= ${OBJC} ${OBJCFLAGS} -c LINK.m?= ${OBJC} ${OBJCFLAGS} ${LDFLAGS} |