| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: gcc.mk,v 1.136 2013/04/20 07:36:17 sbd Exp $ | | 1 | # $NetBSD: gcc.mk,v 1.137 2013/06/13 10:45:46 jperkin Exp $ |
2 | # | | 2 | # |
3 | # This is the compiler definition for the GNU Compiler Collection. | | 3 | # This is the compiler definition for the GNU Compiler Collection. |
4 | # | | 4 | # |
5 | # User-settable variables: | | 5 | # User-settable variables: |
6 | # | | 6 | # |
7 | # GCCBASE | | 7 | # GCCBASE |
8 | # If using a native GCC and the compiler is not in $PATH then | | 8 | # If using a native GCC and the compiler is not in $PATH then |
9 | # this should be set to the base installation directory. | | 9 | # this should be set to the base installation directory. |
10 | # | | 10 | # |
11 | # USE_NATIVE_GCC | | 11 | # USE_NATIVE_GCC |
12 | # When set to "yes", the native gcc is used, no matter which | | 12 | # When set to "yes", the native gcc is used, no matter which |
13 | # compiler version a package requires. | | 13 | # compiler version a package requires. |
14 | # | | 14 | # |
| @@ -785,28 +785,34 @@ CC_VERSION= ${_GCC_PKG} | | | @@ -785,28 +785,34 @@ CC_VERSION= ${_GCC_PKG} |
785 | PREPEND_PATH+= ${_GCC_DIR}/bin | | 785 | PREPEND_PATH+= ${_GCC_DIR}/bin |
786 | .endif | | 786 | .endif |
787 | | | 787 | |
788 | # Add the dependency on GCC. | | 788 | # Add the dependency on GCC. |
789 | .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) | | 789 | .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) |
790 | . for _dir_ in ${_GCC_PKGSRCDIR} | | 790 | . for _dir_ in ${_GCC_PKGSRCDIR} |
791 | . include "${_dir_}/buildlink3.mk" | | 791 | . include "${_dir_}/buildlink3.mk" |
792 | . endfor | | 792 | . endfor |
793 | .endif | | 793 | .endif |
794 | | | 794 | |
795 | # Add dependency on GCC libraries if requested. | | 795 | # Add dependency on GCC libraries if requested. |
796 | .if (defined(_USE_GCC_SHLIB) && !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss])) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) | | 796 | .if (defined(_USE_GCC_SHLIB) && !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss])) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) |
797 | # Special case packages which are themselves a dependency of gcc runtime. | | 797 | # Special case packages which are themselves a dependency of gcc runtime. |
798 | . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) | | 798 | . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && empty(PKGPATH:Mlang/gcc??) |
799 | . include "../../lang/gcc47-libs/buildlink3.mk" | | 799 | . if !empty(_GCC_VERSION:M4.7*) |
| | | 800 | . include "../../lang/gcc47-libs/buildlink3.mk" |
| | | 801 | . elif !empty(_GCC_VERSION:M4.8*) |
| | | 802 | . include "../../lang/gcc48-libs/buildlink3.mk" |
| | | 803 | . else |
| | | 804 | PKG_FAIL_REASON= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}" |
| | | 805 | . endif |
800 | . endif | | 806 | . endif |
801 | .endif | | 807 | .endif |
802 | | | 808 | |
803 | .for _var_ in ${_GCC_VARS} | | 809 | .for _var_ in ${_GCC_VARS} |
804 | . if !target(${_GCC_${_var_}}) | | 810 | . if !target(${_GCC_${_var_}}) |
805 | override-tools: ${_GCC_${_var_}} | | 811 | override-tools: ${_GCC_${_var_}} |
806 | ${_GCC_${_var_}}: | | 812 | ${_GCC_${_var_}}: |
807 | ${RUN}${MKDIR} ${.TARGET:H} | | 813 | ${RUN}${MKDIR} ${.TARGET:H} |
808 | . if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss]) | | 814 | . if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss]) |
809 | ${RUN}${RM} -f ${.TARGET} | | 815 | ${RUN}${RM} -f ${.TARGET} |
810 | ${RUN}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} | | 816 | ${RUN}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} |
811 | . else | | 817 | . else |
812 | ${RUN} \ | | 818 | ${RUN} \ |