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 .if !defined(_INCLUDE_BSD_DF_GCC_MK)
11 _INCLUDE_BSD_DF_GCC_MK= yes
13 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
18 .if ${USE_GCC} == 4.8 || ${USE_GCC} == 4.9
19 PORT_COMPILER=${USE_GCC}
24 . if ${USE_GCC:tu} == NOT5 || ${USE_GCC:tu} == DEFAULT_NOT5
25 PORT_COMPILER=${LANG_GCC_IS}
32 .if defined (PORT_COMPILER)
35 V:= ${PORT_COMPILER:S/.//}
36 X:= ${PORT_COMPILER:S/.//:S/-devel//}
37 . if "${PORT_COMPILER}" == "${LANG_GCC_IS}"
38 BUILD_DEPENDS+= gcc${X}:lang/gcc
39 RUN_DEPENDS+= gcc${X}:lang/gcc
41 BUILD_DEPENDS+= gcc${X}:lang/gcc${V}
42 RUN_DEPENDS+= gcc${X}:lang/gcc${V}
44 _GCC_RUNTIME:= ${LOCALBASE}/lib/gcc${V}
49 CFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
50 CXXFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
51 LDFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME}
53 .else # v-- DRAGONFLY BASE COMPILERS --v
58 CONFIGURE_ENV+= CCVER=${BASE_COMPILER}
59 MAKE_ENV+= CCVER=${BASE_COMPILER}
65 @echo USE_GCC=${USE_GCC}
67 @echo "IGNORE: ${IGNORE}"
72 @echo CFLAGS=\"${CFLAGS}\"
73 @echo CXXFLAGS=\"${CXXFLAGS}\"
74 @echo LDFLAGS=\"${LDFLAGS}\"
75 @echo CONFIGURE_ENV=${CONFIGURE_ENV}
76 @echo MAKE_ENV=${MAKE_ENV}
77 @echo "BUILD_DEPENDS=${BUILD_DEPENDS}"
78 @echo "RUN_DEPENDS=${RUN_DEPENDS}"