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 ${USE_GCC} == 4.8 || ${USE_GCC} == 4.9
16 PORT_COMPILER=${USE_GCC}
21 . if ${USE_GCC:tu} == NOT5 || ${USE_GCC:tu} == DEFAULT_NOT5
22 PORT_COMPILER=${LANG_GCC_IS}
29 .if defined (PORT_COMPILER)
32 V:= ${PORT_COMPILER:S/.//}
33 X:= ${PORT_COMPILER:S/.//:S/-devel//}
34 . if "${PORT_COMPILER}" == "${LANG_GCC_IS}"
35 BUILD_DEPENDS+= gcc${X}:lang/gcc
36 RUN_DEPENDS+= gcc${X}:lang/gcc
38 BUILD_DEPENDS+= gcc${X}:lang/gcc${V}
39 RUN_DEPENDS+= gcc${X}:lang/gcc${V}
41 _GCC_RUNTIME:= ${LOCALBASE}/lib/gcc${V}
46 CFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
47 CXXFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
48 LDFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME}
50 .else # v-- DRAGONFLY BASE COMPILERS --v
55 CONFIGURE_ENV+= CCVER=${BASE_COMPILER}
56 MAKE_ENV+= CCVER=${BASE_COMPILER}
62 @echo USE_GCC=${USE_GCC}
64 @echo "IGNORE: ${IGNORE}"
69 @echo CFLAGS=\"${CFLAGS}\"
70 @echo CXXFLAGS=\"${CXXFLAGS}\"
71 @echo LDFLAGS=\"${LDFLAGS}\"
72 @echo CONFIGURE_ENV=${CONFIGURE_ENV}
73 @echo MAKE_ENV=${MAKE_ENV}
74 @echo "BUILD_DEPENDS=${BUILD_DEPENDS}"
75 @echo "RUN_DEPENDS=${RUN_DEPENDS}"