1 # bsd.gcc.df.mk - Reaction to USE_GCC on DragonFly
3 # The primary base compiler is used is possible, otherwise the ports default
4 # is used unless there's a hard specification.
6 # For DragonFly 4.1+, the primary base compiler is gcc50 and for earlier
7 # releases, the primary base compiler is gcc47. The avoidance of the use of
8 # the alternate compiler is intentional.
10 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
15 .if ${DFLYVERSION} < 400105
16 . if ${USE_GCC} == 4.8 || ${USE_GCC} == 4.8+
18 . elif ${USE_GCC} == 4.9 || ${USE_GCC} == 4.9+
20 . elif ${USE_GCC} == DEFAULT_NOT5
21 PORT_COMPILER=${LANG_GCC_IS}
25 .else # v-- Release 4.2 and later --v
26 . if ${USE_GCC} == 4.8 || ${USE_GCC} == 4.9
27 PORT_COMPILER=${USE_GCC}
29 . if ${USE_GCC:tu} == NOT5 || ${USE_GCC:tu} == DEFAULT_NOT5
30 PORT_COMPILER=${LANG_GCC_IS}
37 .if defined (PORT_COMPILER)
40 V:= ${PORT_COMPILER:S/.//}
41 . if PORT_COMPILER == "${LANG_GCC_IS}"
42 BUILD_DEPENDS+= gcc${V}:${PORTSDIR}/lang/gcc
43 RUN_DEPENDS+= gcc${V}:${PORTSDIR}/lang/gcc
45 BUILD_DEPENDS+= gcc${V}:${PORTSDIR}/lang/gcc${V}
46 RUN_DEPENDS+= gcc${V}:${PORTSDIR}/lang/gcc${V}
48 _GCC_RUNTIME:= ${LOCALBASE}/lib/gcc${V}
53 CFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
54 CXXFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
55 LDFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME}
57 .else # v-- DRAGONFLY BASE COMPILERS --v
62 CONFIGURE_ENV+= CCVER=${BASE_COMPILER}
63 MAKE_ENV+= CCVER=${BASE_COMPILER}
69 @echo USE_GCC=${USE_GCC}
71 @echo "IGNORE: ${IGNORE}"
76 @echo CFLAGS=\"${CFLAGS}\"
77 @echo CXXFLAGS=\"${CXXFLAGS}\"
78 @echo LDFLAGS=\"${LDFLAGS}\"
79 @echo CONFIGURE_ENV=${CONFIGURE_ENV}
80 @echo MAKE_ENV=${MAKE_ENV}
81 @echo "BUILD_DEPENDS=${BUILD_DEPENDS}"
82 @echo "RUN_DEPENDS=${RUN_DEPENDS}"