Replace cc, c++ & cpp with symlinks
In case of installation of both clang and GCC, we want to be able to switch which one is the default by adapting the cc, c++ & cpp symlinks. The default behaviour implemented here is to prefer clang over gcc if they are both installed. Change-Id: Ic14720cd876d2bf934d345a955cb5789378209e6
This commit is contained in:
parent
b811a43401
commit
4359ff87e0
5 changed files with 33 additions and 0 deletions
|
@ -234,10 +234,12 @@
|
|||
./usr/bin/bzip2 minix-sys
|
||||
./usr/bin/bzip2recover minix-sys
|
||||
./usr/bin/c++ minix-sys gcccmds
|
||||
./usr/bin/c++ minix-sys llvm
|
||||
./usr/bin/cal minix-sys
|
||||
./usr/bin/calendar minix-sys
|
||||
./usr/bin/cawf minix-sys
|
||||
./usr/bin/cc minix-sys gcccmds
|
||||
./usr/bin/cc minix-sys llvm
|
||||
./usr/bin/cc1 minix-sys gcccmds
|
||||
./usr/bin/cc1obj minix-sys gcccmds
|
||||
./usr/bin/cc1plus minix-sys gcccmds
|
||||
|
@ -266,6 +268,7 @@
|
|||
./usr/bin/compress minix-sys
|
||||
./usr/bin/cpio minix-sys
|
||||
./usr/bin/cpp minix-sys gcccmds
|
||||
./usr/bin/cpp minix-sys llvm
|
||||
./usr/bin/cprofalyze minix-sys
|
||||
./usr/bin/crc minix-sys
|
||||
./usr/bin/cron minix-sys
|
||||
|
|
6
external/bsd/llvm/bin/clang/Makefile
vendored
6
external/bsd/llvm/bin/clang/Makefile
vendored
|
@ -6,6 +6,12 @@ NOMAN= yes
|
|||
.if !defined(HOSTPROG)
|
||||
SYMLINKS+= clang ${BINDIR}/clang++
|
||||
SYMLINKS+= clang ${BINDIR}/clang-cpp
|
||||
|
||||
# if defined(__MINIX)
|
||||
SYMLINKS+= clang ${BINDIR}/cc
|
||||
SYMLINKS+= clang ${BINDIR}/c++
|
||||
SYMLINKS+= clang ${BINDIR}/cpp
|
||||
# endif # defined(__MINIX)
|
||||
.endif
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
|
12
external/gpl3/gcc/usr.bin/cpp/Makefile
vendored
12
external/gpl3/gcc/usr.bin/cpp/Makefile
vendored
|
@ -3,7 +3,13 @@
|
|||
# For ../Makefile.inc and bsd.own.mk
|
||||
.include <bsd.init.mk>
|
||||
|
||||
.if defined(__MINIX)
|
||||
# In case of installation of both clang and GCC, we want to be able to
|
||||
# switch which one is the default by adapting the cc, c++ & cpp symlinks
|
||||
PROG= gcpp
|
||||
.else
|
||||
PROG= cpp
|
||||
.endif # defined(__MINIX)
|
||||
SRCS= gcc.c cppspec.c prefix.c version.c
|
||||
|
||||
# XXX
|
||||
|
@ -26,7 +32,13 @@ CPPFLAGS.gcc.c+= -I${GCCARCH} -I${BACKENDOBJ} -I. \
|
|||
-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
|
||||
-DCONFIGURE_SPECS="\"\""
|
||||
|
||||
.if defined(__MINIX)
|
||||
.if ${HAVE_LLVM:Uno} == "no"
|
||||
SYMLINKS= gcpp ${BINDIR}/cpp
|
||||
.endif # ${HAVE_LLVM:Uno} == "no"
|
||||
.else
|
||||
LINKS= ${BINDIR}/cpp ${BINDIR}/gcpp
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
TEXINFO= cpp.texi
|
||||
INFOFLAGS= -I${DIST}/gcc/doc -I${DIST}/gcc/doc/include -I.
|
||||
|
|
6
external/gpl3/gcc/usr.bin/g++/Makefile
vendored
6
external/gpl3/gcc/usr.bin/g++/Makefile
vendored
|
@ -10,7 +10,13 @@ NOMAN= # defined
|
|||
|
||||
CPPFLAGS+= -I${BACKENDOBJ}
|
||||
|
||||
.if defined(__MINIX)
|
||||
.if ${HAVE_LLVM:Uno} == "no"
|
||||
SYMLINKS+= g++ ${BINDIR}/c++
|
||||
.endif # ${HAVE_LLVM:Uno} == "no"
|
||||
.else
|
||||
LINKS+= ${BINDIR}/g++ ${BINDIR}/c++
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
.include "../Makefile.frontend"
|
||||
|
||||
|
|
6
external/gpl3/gcc/usr.bin/gcc/Makefile
vendored
6
external/gpl3/gcc/usr.bin/gcc/Makefile
vendored
|
@ -7,7 +7,13 @@ SRCS= gccspec.c
|
|||
|
||||
CPPFLAGS+= -I${BACKENDOBJ}
|
||||
|
||||
.if defined(__MINIX)
|
||||
.if ${HAVE_LLVM:Uno} == "no"
|
||||
SYMLINKS+= gcc ${BINDIR}/cc
|
||||
.endif # ${HAVE_LLVM:Uno} == "no"
|
||||
.else
|
||||
LINKS+= ${BINDIR}/gcc ${BINDIR}/cc
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
MAN= gcc.1
|
||||
MLINKS= gcc.1 cc.1 gcc.1 g++.1 gcc.1 c++.1
|
||||
|
|
Loading…
Reference in a new issue