2 # Copyright (c) 2014 The DragonFly Project. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in
12 # the documentation and/or other materials provided with the
14 # 3. Neither the name of The DragonFly Project nor the names of its
15 # contributors may be used to endorse or promote products derived
16 # from this software without specific, prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 STD_INCOPT="-nostdinc -iprefix ${INCPREFIX} -iwithprefixbefore /usr/include"
34 DPORT_GCC_STD_INCOPTXX="-isystem /usr/local/lib/${CCVER}/include/c++ \
35 -isystem /usr/local/lib/${CCVER}/include/c++/${MACHARCH}-portbld-${MACHREL}"
36 DPORT_CLANG_STD_INCOPTXX="-isystem /usr/include/c++/4.7"
39 # For each custom compiler definition, it is mandatory to define the
40 # following variables:
41 # <CCVER>_CC (path to C compiler)
42 # <CCVER>_CXX (path to C++ compiler)
43 # <CCVER>_CPP (path to pre-processor)
44 # <CCVER>_INCOPT (include options for cc, c++ and cpp)
45 # <CCVER>_INCOPTCXX (extra include options for c++)
47 # The following variables are optional:
48 # <CCVER>_CFLAGS (extra CFLAGS)
49 # <CCVER>_CXXFLAGS (extra CXXFLAGS)
50 # <CCVER>_CPPFLAGS (extra CPPFLAGS)
51 # <CCVER>_GCOV (path to gcov, /usr/libexec/gcc47/gcov is default)
53 # The following commands call the base compilers by default:
54 # gcc, g++, clang, clang++, clang-cpp
56 # However, these can be individually overridden:
57 # <CCVER>_GCC (path executed when /usr/bin/gcc called)
58 # <CCVER>_GXX (path executed when /usr/bin/g++ called)
59 # <CCVER>_CLANG (path executed when /usr/bin/clang called)
60 # <CCVER>_CLANGCXX (path executed when /usr/bin/clang++ called)
61 # <CCVER>_CLANGCPP (path executed when /usr/bin/clang-cpp called)
67 gcc5_CC=/usr/local/bin/gcc5
68 gcc5_CXX=/usr/local/bin/g++5
69 gcc5_CPP=/usr/local/bin/cpp5
70 gcc5_GCOV=/usr/local/bin/gcov5
71 gcc5_INCOPT=${STD_INCOPT}
72 gcc5_INCOPTCXX=${DPORT_GCC_STD_INCOPTXX}
76 # Put the 3 following lines uncommented in /etc/compilers.conf to force
77 # /usr/bin/clang* to execute the custom gcc5 compiler instead of base clang
78 # gcc5_CLANG=${gcc5_CC}
79 # gcc5_CLANGCXX=${gcc5_CXX}
80 # gcc5_CLANGCPP=${gcc5_CPP}
85 gcc49_CC=/usr/local/bin/gcc49
86 gcc49_CXX=/usr/local/bin/g++49
87 gcc49_CPP=/usr/local/bin/cpp49
88 gcc49_GCOV=/usr/local/bin/gcov49
89 gcc49_INCOPT=${STD_INCOPT}
90 gcc49_INCOPTCXX=${DPORT_GCC_STD_INCOPTXX}
92 gcc49_GXX=${gcc49_CXX}
97 gcc48_CC=/usr/local/bin/gcc48
98 gcc48_CXX=/usr/local/bin/g++48
99 gcc48_CPP=/usr/local/bin/cpp48
100 gcc48_GCOV=/usr/local/bin/gcov48
101 gcc48_INCOPT=${STD_INCOPT}
102 gcc48_INCOPTCXX=${DPORT_GCC_STD_INCOPTXX}
103 gcc48_GCC=${gcc48_CC}
104 gcc48_GXX=${gcc48_CXX}
107 # lang/clang35 (dports)
109 clang35_CC=/usr/local/bin/clang35
110 clang35_CXX=/usr/local/bin/clang++35
111 clang35_CPP=/usr/local/bin/clang-cpp35
112 clang35_INCOPT=${STD_INCOPT}
113 clang35_INCOPTCXX=${DPORT_CLANG_STD_INCOPTXX}
114 clang35_CLANG=${clang35_CC}
115 clang35_CLANGCXX=${clang35_CXX}
116 clang35_CLANGCPP=${clang35_CPP}
118 # Put the 2 following lines uncommented in /etc/compilers.conf to force
119 # /usr/bin/gcc* to execute the custom clang35 compiler instead of base gcc
120 # clang35_GCC=${clang35_CC}
121 # clang35_GXX=${clang35_CXX}