head 1.275; access; symbols pkgsrc-2023Q4:1.267.0.2 pkgsrc-2023Q4-base:1.267 pkgsrc-2023Q3:1.262.0.2 pkgsrc-2023Q3-base:1.262 pkgsrc-2023Q2:1.251.0.2 pkgsrc-2023Q2-base:1.251 pkgsrc-2023Q1:1.249.0.2 pkgsrc-2023Q1-base:1.249 pkgsrc-2022Q4:1.247.0.2 pkgsrc-2022Q4-base:1.247 pkgsrc-2022Q3:1.246.0.2 pkgsrc-2022Q3-base:1.246 pkgsrc-2022Q2:1.243.0.2 pkgsrc-2022Q2-base:1.243 pkgsrc-2022Q1:1.236.0.2 pkgsrc-2022Q1-base:1.236 pkgsrc-2021Q4:1.234.0.2 pkgsrc-2021Q4-base:1.234 pkgsrc-2021Q3:1.226.0.2 pkgsrc-2021Q3-base:1.226 pkgsrc-2021Q2:1.224.0.2 pkgsrc-2021Q2-base:1.224 pkgsrc-2021Q1:1.220.0.2 pkgsrc-2021Q1-base:1.220 pkgsrc-2020Q4:1.217.0.2 pkgsrc-2020Q4-base:1.217 pkgsrc-2020Q3:1.214.0.2 pkgsrc-2020Q3-base:1.214 pkgsrc-2020Q2:1.213.0.2 pkgsrc-2020Q2-base:1.213 pkgsrc-2020Q1:1.209.0.2 pkgsrc-2020Q1-base:1.209 pkgsrc-2019Q4:1.208.0.6 pkgsrc-2019Q4-base:1.208 pkgsrc-2019Q3:1.208.0.2 pkgsrc-2019Q3-base:1.208 pkgsrc-2019Q2:1.198.0.6 pkgsrc-2019Q2-base:1.198 pkgsrc-2019Q1:1.198.0.4 pkgsrc-2019Q1-base:1.198 pkgsrc-2018Q4:1.198.0.2 pkgsrc-2018Q4-base:1.198 pkgsrc-2018Q3:1.193.0.2 pkgsrc-2018Q3-base:1.193 pkgsrc-2018Q2:1.192.0.2 pkgsrc-2018Q2-base:1.192 pkgsrc-2018Q1:1.189.0.4 pkgsrc-2018Q1-base:1.189 pkgsrc-2017Q4:1.189.0.2 pkgsrc-2017Q4-base:1.189 pkgsrc-2017Q3:1.184.0.4 pkgsrc-2017Q3-base:1.184 pkgsrc-2017Q2:1.179.0.2 pkgsrc-2017Q2-base:1.179 pkgsrc-2017Q1:1.174.0.2 pkgsrc-2017Q1-base:1.174 pkgsrc-2016Q4:1.171.0.2 pkgsrc-2016Q4-base:1.171 pkgsrc-2016Q3:1.169.0.2 pkgsrc-2016Q3-base:1.169 pkgsrc-2016Q2:1.168.0.2 pkgsrc-2016Q2-base:1.168 pkgsrc-2016Q1:1.166.0.2 pkgsrc-2016Q1-base:1.166 pkgsrc-2015Q4:1.163.0.4 pkgsrc-2015Q4-base:1.163 pkgsrc-2015Q3:1.163.0.2 pkgsrc-2015Q3-base:1.163 pkgsrc-2015Q2:1.161.0.2 pkgsrc-2015Q2-base:1.161 pkgsrc-2015Q1:1.155.0.2 pkgsrc-2015Q1-base:1.155 pkgsrc-2014Q4:1.153.0.2 pkgsrc-2014Q4-base:1.153 pkgsrc-2014Q3:1.151.0.2 pkgsrc-2014Q3-base:1.151 pkgsrc-2014Q2:1.148.0.2 pkgsrc-2014Q2-base:1.148 pkgsrc-2014Q1:1.144.0.2 pkgsrc-2014Q1-base:1.144 pkgsrc-2013Q4:1.143.0.2 pkgsrc-2013Q4-base:1.143 pkgsrc-2013Q3:1.142.0.2 pkgsrc-2013Q3-base:1.142 pkgsrc-2013Q2:1.141.0.2 pkgsrc-2013Q2-base:1.141 pkgsrc-2013Q1:1.130.0.4 pkgsrc-2013Q1-base:1.130 pkgsrc-2012Q4:1.130.0.2 pkgsrc-2012Q4-base:1.130 pkgsrc-2012Q3:1.129.0.2 pkgsrc-2012Q3-base:1.129 pkgsrc-2012Q2:1.121.0.2 pkgsrc-2012Q2-base:1.121 pkgsrc-2012Q1:1.114.0.2 pkgsrc-2012Q1-base:1.114 pkgsrc-2011Q4:1.112.0.2 pkgsrc-2011Q4-base:1.112 pkgsrc-2011Q3:1.111.0.2 pkgsrc-2011Q3-base:1.111 pkgsrc-2011Q2:1.109.0.2 pkgsrc-2011Q2-base:1.109 pkgsrc-2011Q1:1.108.0.2 pkgsrc-2011Q1-base:1.108 pkgsrc-2010Q4:1.107.0.2 pkgsrc-2010Q4-base:1.107 pkgsrc-2010Q3:1.106.0.2 pkgsrc-2010Q3-base:1.106 pkgsrc-2010Q2:1.105.0.2 pkgsrc-2010Q2-base:1.105 pkgsrc-2010Q1:1.103.0.2 pkgsrc-2010Q1-base:1.103 pkgsrc-2009Q4:1.102.0.4 pkgsrc-2009Q4-base:1.102 pkgsrc-2009Q3:1.102.0.2 pkgsrc-2009Q3-base:1.102 pkgsrc-2009Q2:1.97.0.2 pkgsrc-2009Q2-base:1.97 pkgsrc-2009Q1:1.96.0.2 pkgsrc-2009Q1-base:1.96 pkgsrc-2008Q4:1.95.0.2 pkgsrc-2008Q4-base:1.95 pkgsrc-2008Q3:1.94.0.2 pkgsrc-2008Q3-base:1.94 cube-native-xorg:1.93.0.8 cube-native-xorg-base:1.93 pkgsrc-2008Q2:1.93.0.6 pkgsrc-2008Q2-base:1.93 cwrapper:1.93.0.4 pkgsrc-2008Q1:1.93.0.2 pkgsrc-2008Q1-base:1.93 pkgsrc-2007Q4:1.92.0.4 pkgsrc-2007Q4-base:1.92 pkgsrc-2007Q3:1.92.0.2 pkgsrc-2007Q3-base:1.92 pkgsrc-2007Q2:1.90.0.6 pkgsrc-2007Q2-base:1.90 pkgsrc-2007Q1:1.90.0.4 pkgsrc-2007Q1-base:1.90 jlam-pkgviews:1.90.0.2 jlam-pkgviews-base:1.90 pkgsrc-2006Q4:1.88.0.2 pkgsrc-2006Q4-base:1.88 pkgsrc-2006Q3:1.84.0.2 pkgsrc-2006Q3-base:1.84 pkgsrc-2006Q2:1.83.0.2 pkgsrc-2006Q2-base:1.83 tv-derecurse-eol:1.74.2.5 pkgsrc-2006Q1:1.82.0.2 pkgsrc-2006Q1-base:1.82 pkgsrc-2005Q4:1.81.0.6 pkgsrc-2005Q4-base:1.81 pkgsrc-2005Q3:1.81.0.4 pkgsrc-2005Q3-base:1.81 pkgsrc-2005Q2:1.81.0.2 pkgsrc-2005Q2-base:1.81 tv-derecurse-merge:1.80 pkgsrc-2005Q1:1.79.0.2 pkgsrc-2005Q1-base:1.79 pkgsrc-2004Q4:1.77.0.2 pkgsrc-2004Q4-base:1.77 tv-derecurse:1.74.0.2 tv-derecurse-base:1.79 pkgsrc-2004Q3:1.70.0.2 pkgsrc-2004Q3-base:1.70 pkgsrc-2004Q2:1.67.0.2 pkgsrc-2004Q2-base:1.67 pkgsrc-2004Q1:1.61.0.2 pkgsrc-2004Q1-base:1.61; locks; strict; comment @# @; 1.275 date 2024.03.19.23.22.50; author nia; state Exp; branches; next 1.274; commitid HSxdaQXZnmRphP2F; 1.274 date 2024.03.08.12.45.50; author wiz; state Exp; branches; next 1.273; commitid GpOMUBaSgzYd7m1F; 1.273 date 2024.03.08.12.03.23; author wiz; state Exp; branches; next 1.272; commitid jK9v1qWm8Q2BSl1F; 1.272 date 2024.01.27.00.03.50; author wiz; state Exp; branches; next 1.271; commitid bq0mL80Yf8Fud1WE; 1.271 date 2024.01.03.14.06.30; author gdt; state Exp; branches; next 1.270; commitid iNo56IxsgmbsE0TE; 1.270 date 2024.01.03.08.11.51; author mef; state Exp; branches; next 1.269; commitid zh6vVU5PSx6QFYSE; 1.269 date 2024.01.02.23.37.48; author gdt; state Exp; branches; next 1.268; commitid UybB2mJEmeTqQVSE; 1.268 date 2024.01.02.23.35.00; author gdt; state Exp; branches; next 1.267; commitid 6iLwZIv164RtPVSE; 1.267 date 2023.11.10.11.52.27; author nia; state Exp; branches; next 1.266; commitid YSBn2Wx4fOA1E3ME; 1.266 date 2023.11.09.08.47.42; author nia; state Exp; branches; next 1.265; commitid D2xII7uPsHMCEULE; 1.265 date 2023.11.07.11.36.57; author nia; state Exp; branches; next 1.264; commitid 0m3gC6k6oLWGEFLE; 1.264 date 2023.11.07.09.54.49; author nia; state Exp; branches; next 1.263; commitid 2fTOj90V8oPD5FLE; 1.263 date 2023.10.09.13.36.13; author nia; state Exp; branches; next 1.262; commitid FYkkgw1gKtCdfXHE; 1.262 date 2023.08.26.09.49.55; author wiz; state Exp; branches; next 1.261; commitid LMXYZgUukbbsphCE; 1.261 date 2023.08.08.13.33.39; author tnn; state Exp; branches; next 1.260; commitid 6qn38Ayavl04eZzE; 1.260 date 2023.08.03.06.06.18; author nia; state Exp; branches; next 1.259; commitid fS0kF0Vfk6YvUizE; 1.259 date 2023.08.02.15.58.07; author nia; state Exp; branches; next 1.258; commitid TJ7XkJ0XPHuldezE; 1.258 date 2023.07.29.17.55.47; author nia; state Exp; branches; next 1.257; commitid bYOhbbPBMMPPZIyE; 1.257 date 2023.07.22.12.20.37; author nia; state Exp; branches; next 1.256; commitid oNjPIZX6LlSBmNxE; 1.256 date 2023.07.21.08.29.56; author nia; state Exp; branches; next 1.255; commitid akBpjjHywbBJ7ExE; 1.255 date 2023.07.20.21.12.16; author nia; state Exp; branches; next 1.254; commitid VuDpK8F4jxNfnAxE; 1.254 date 2023.07.18.12.49.46; author nia; state Exp; branches; next 1.253; commitid HhuC1JgcaBmOEhxE; 1.253 date 2023.06.27.10.27.21; author riastradh; state Exp; branches; next 1.252; commitid YYdDXuq2VpGTxzuE; 1.252 date 2023.06.26.11.38.13; author wiz; state Exp; branches; next 1.251; commitid koOityTC9JM7YruE; 1.251 date 2023.06.12.21.50.41; author wiz; state Exp; branches; next 1.250; commitid O8bvNCe5vaE3OHsE; 1.250 date 2023.06.08.22.59.53; author riastradh; state Exp; branches; next 1.249; commitid MXWr82RqghxWjcsE; 1.249 date 2023.01.06.23.11.31; author wiz; state Exp; branches; next 1.248; commitid 6rkuHCYOeWwNix8E; 1.248 date 2022.12.31.08.35.37; author wiz; state Exp; branches; next 1.247; commitid hVeNM3jZWWhaEG7E; 1.247 date 2022.11.23.15.44.11; author jperkin; state Exp; branches; next 1.246; commitid HjxwbixUd3HyeQ2E; 1.246 date 2022.08.01.07.58.21; author wiz; state Exp; branches; next 1.245; commitid 7lekf8DTzMnsk9OD; 1.245 date 2022.07.07.16.23.39; author jperkin; state Exp; branches; next 1.244; commitid Zf9Gk5fTyrppVYKD; 1.244 date 2022.07.05.17.32.24; author jperkin; state Exp; branches; next 1.243; commitid byyzMra37bnSlJKD; 1.243 date 2022.06.16.15.46.22; author adam; state Exp; branches; next 1.242; commitid rdb8DCOQwIbHohID; 1.242 date 2022.05.28.02.31.47; author gutteridge; state Exp; branches; next 1.241; commitid IGJwOGpK4yKKyLFD; 1.241 date 2022.05.21.09.26.50; author nia; state Exp; branches; next 1.240; commitid Ppkbqi54eOWi8UED; 1.240 date 2022.05.21.09.04.50; author nia; state Exp; branches; next 1.239; commitid 8SRpU73lfUfq0UED; 1.239 date 2022.04.07.12.12.02; author adam; state Exp; branches; next 1.238; commitid lQ3WtKFwtIKFsgzD; 1.238 date 2022.04.07.07.08.34; author nia; state Exp; branches; next 1.237; commitid 5d2BOLGITknxMezD; 1.237 date 2022.04.04.11.23.06; author riastradh; state Exp; branches; next 1.236; commitid jGk9U4TgudBQhSyD; 1.236 date 2022.03.13.06.26.57; author nia; state Exp; branches; next 1.235; commitid GfTNBnrOwYi3m1wD; 1.235 date 2022.01.18.01.41.09; author pho; state Exp; branches; next 1.234; commitid PnZacn3jIIBFv3pD; 1.234 date 2021.12.22.10.14.27; author nia; state Exp; branches; next 1.233; commitid mGwumi3UCIcvdDlD; 1.233 date 2021.12.19.11.55.29; author nia; state Exp; branches; next 1.232; commitid OzozUJ7nmDp6SflD; 1.232 date 2021.11.07.11.25.33; author nia; state Exp; branches; next 1.231; commitid RoNixqAXtsJs3RfD; 1.231 date 2021.11.06.10.03.32; author nia; state Exp; branches; next 1.230; commitid Za468HuEaFHiDIfD; 1.230 date 2021.11.02.08.14.58; author nia; state Exp; branches; next 1.229; commitid cwUDJjUD2Sk5acfD; 1.229 date 2021.10.08.16.35.57; author nia; state Exp; branches; next 1.228; commitid NyPHg8wAYdmTJ1cD; 1.228 date 2021.10.04.14.21.21; author nia; state Exp; branches; next 1.227; commitid xGEEtbG0IkNB7vbD; 1.227 date 2021.10.01.11.56.12; author nia; state Exp; branches; next 1.226; commitid CpiodN7O0v4Pp6bD; 1.226 date 2021.08.03.07.19.20; author nia; state Exp; branches; next 1.225; commitid 8A5OJK1r18MqMu3D; 1.225 date 2021.08.01.12.35.06; author nia; state Exp; branches; next 1.224; commitid 1TQ40VoNGkjsAg3D; 1.224 date 2021.04.06.12.07.57; author nia; state Exp; branches; next 1.223; commitid 91hNzxMrRpnFceOC; 1.223 date 2021.04.02.17.04.17; author nia; state Exp; branches; next 1.222; commitid mwoCiwkWOERiYJNC; 1.222 date 2021.04.02.16.54.48; author nia; state Exp; branches; next 1.221; commitid cpDfCYFrdYv2VJNC; 1.221 date 2021.04.02.11.48.16; author nia; state Exp; branches; next 1.220; commitid 4PhYw7S2zuDHdINC; 1.220 date 2021.02.04.21.45.13; author gdt; state Exp; branches; next 1.219; commitid oXlVVkZrxschmrGC; 1.219 date 2021.01.17.16.05.48; author maya; state Exp; branches; next 1.218; commitid D82kNxCgxymC36EC; 1.218 date 2021.01.17.15.32.00; author maya; state Exp; branches; next 1.217; commitid q9KE7ejaSfafR5EC; 1.217 date 2020.12.05.09.24.00; author wiz; state Exp; branches; next 1.216; commitid 1LW5SwMajumtdxyC; 1.216 date 2020.10.28.13.19.25; author wiz; state Exp; branches; next 1.215; commitid aOIIrJNAKj8zJFtC; 1.215 date 2020.10.06.17.36.50; author rillig; state Exp; branches; next 1.214; commitid EBmu1kAfx8gwRRqC; 1.214 date 2020.09.02.16.16.43; author ryoon; state Exp; branches; next 1.213; commitid WZ8Qz07moTNqwumC; 1.213 date 2020.06.02.06.58.13; author rillig; state Exp; branches; next 1.212; commitid g9XIPwxEZTisnCaC; 1.212 date 2020.05.31.00.00.13; author sjmulder; state Exp; branches; next 1.211; commitid z4LnDVMmwYaC8kaC; 1.211 date 2020.05.30.22.45.36; author sjmulder; state Exp; branches; next 1.210; commitid tKLq9d5gmHPaIjaC; 1.210 date 2020.03.30.09.39.24; author nia; state Exp; branches; next 1.209; commitid FlTBM2zTqjmZkp2C; 1.209 date 2020.03.14.10.00.37; author nia; state Exp; branches; next 1.208; commitid g1MGcNTWA3Z6Yl0C; 1.208 date 2019.09.19.06.46.59; author rillig; state Exp; branches; next 1.207; commitid 4LCUpM8UL73dAADB; 1.207 date 2019.09.18.06.46.13; author rillig; state Exp; branches; next 1.206; commitid qP0kU59Yb2ubCsDB; 1.206 date 2019.09.18.06.35.12; author rillig; state Exp; branches; next 1.205; commitid SR1xH1aAf79tysDB; 1.205 date 2019.09.18.06.15.13; author rillig; state Exp; branches; next 1.204; commitid iyuSYDPb8bhcrsDB; 1.204 date 2019.09.08.09.24.52; author rillig; state Exp; branches; next 1.203; commitid bdxbTMBlq3jnObCB; 1.203 date 2019.09.07.22.20.32; author rillig; state Exp; branches; next 1.202; commitid d3LlEzggo3uD88CB; 1.202 date 2019.09.07.07.10.15; author rillig; state Exp; branches; next 1.201; commitid aDuP6pq9xP4k63CB; 1.201 date 2019.07.15.16.06.19; author ryoon; state Exp; branches; next 1.200; commitid Pxolurm8KLiUN9vB; 1.200 date 2019.07.09.15.46.02; author riastradh; state Exp; branches; next 1.199; commitid wyQxy0sTRJ2XSnuB; 1.199 date 2019.07.09.15.45.46; author riastradh; state Exp; branches; next 1.198; commitid L0yTAI0HgWmRSnuB; 1.198 date 2018.11.12.14.22.58; author jperkin; state Exp; branches; next 1.197; commitid gHxFSFEcfM6Q5FZA; 1.197 date 2018.10.29.11.53.18; author abs; state Exp; branches; next 1.196; commitid 9IrL4xYFjD44JQXA; 1.196 date 2018.10.28.22.22.19; author abs; state Exp; branches; next 1.195; commitid 7B5HzoKfi9C6fMXA; 1.195 date 2018.10.09.15.02.48; author abs; state Exp; branches; next 1.194; commitid RkuCsIsGtfEwpiVA; 1.194 date 2018.10.08.20.02.17; author rillig; state Exp; branches; next 1.193; commitid 5MWgV4ehpDBS6cVA; 1.193 date 2018.07.11.11.11.52; author jperkin; state Exp; branches; next 1.192; commitid bo6rj7MHS4kq1IJA; 1.192 date 2018.05.24.05.47.21; author wiz; state Exp; branches; next 1.191; commitid Y4PKe3Y5Sk3EMvDA; 1.191 date 2018.05.23.10.17.58; author jperkin; state Exp; branches; next 1.190; commitid 5TUPoErRJGEqjpDA; 1.190 date 2018.05.23.08.11.59; author jperkin; state Exp; branches; next 1.189; commitid AmkgIFft1RXbCoDA; 1.189 date 2017.11.29.22.55.15; author khorben; state Exp; branches; next 1.188; commitid xCg4ZgOJyvkH7ZgA; 1.188 date 2017.11.15.19.04.24; author khorben; state Exp; branches; next 1.187; commitid jlDn1Tgt1z50iafA; 1.187 date 2017.11.12.13.34.14; author khorben; state Exp; branches; next 1.186; commitid yAgL1uivy2wmyKeA; 1.186 date 2017.11.07.16.57.58; author khorben; state Exp; branches; next 1.185; commitid g8umP2GoIGxXP7eA; 1.185 date 2017.10.03.09.38.16; author jperkin; state Exp; branches; next 1.184; commitid N7PCBkqCWY1SwA9A; 1.184 date 2017.09.11.09.06.41; author jperkin; state Exp; branches; next 1.183; commitid 26MGki2dray85L6A; 1.183 date 2017.08.25.01.43.17; author khorben; state Exp; branches; next 1.182; commitid Y6fFBKI0KQVg8x4A; 1.182 date 2017.08.04.08.53.33; author jperkin; state Exp; branches; next 1.181; commitid 1JysmwfXXLtoeS1A; 1.181 date 2017.07.18.18.27.31; author brook; state Exp; branches; next 1.180; commitid B5wnBb6PcceOWJZz; 1.180 date 2017.07.09.14.30.07; author khorben; state Exp; branches; next 1.179; commitid gA639lX4RVNfVyYz; 1.179 date 2017.06.25.01.41.15; author joerg; state Exp; branches; next 1.178; commitid GhbalofRjbYP7HWz; 1.178 date 2017.05.18.08.14.08; author jperkin; state Exp; branches; next 1.177; commitid SgyEQG3swFv9wQRz; 1.177 date 2017.05.04.18.44.12; author joerg; state Exp; branches; next 1.176; commitid wxrtRYojjYwhs6Qz; 1.176 date 2017.04.16.23.12.37; author khorben; state Exp; branches; next 1.175; commitid PgX04JG2uaZ1uONz; 1.175 date 2017.04.10.12.22.07; author jperkin; state Exp; branches; next 1.174; commitid 8SHY9Yjm0g8J5ZMz; 1.174 date 2016.12.29.23.16.26; author maya; state Exp; branches 1.174.2.1; next 1.173; commitid 9LHWtokq6NEG0Wzz; 1.173 date 2016.12.29.23.07.17; author maya; state Exp; branches; next 1.172; commitid 32vgEnhwOa7EXVzz; 1.172 date 2016.12.29.22.21.13; author maya; state Exp; branches; next 1.171; commitid lAp16szMjEhkHVzz; 1.171 date 2016.11.25.20.36.49; author marino; state Exp; branches; next 1.170; commitid OuLe7Bz0COsVdyvz; 1.170 date 2016.10.10.08.26.08; author jperkin; state Exp; branches; next 1.169; commitid 2h9Tu0Hrje9LEzpz; 1.169 date 2016.09.13.07.59.15; author maya; state Exp; branches; next 1.168; commitid jIH9bpODIpSkn6mz; 1.168 date 2016.06.13.13.26.42; author jperkin; state Exp; branches; next 1.167; commitid Up3HYpHh57gU5jaz; 1.167 date 2016.04.11.04.22.34; author dbj; state Exp; branches; next 1.166; commitid TpixwDg88CcX9a2z; 1.166 date 2016.03.11.23.54.09; author khorben; state Exp; branches; next 1.165; commitid 80M5NfIpmFBNChYy; 1.165 date 2016.03.11.23.03.31; author khorben; state Exp; branches; next 1.164; commitid VaF6SORApwojmhYy; 1.164 date 2016.03.02.18.45.21; author jperkin; state Exp; branches; next 1.163; commitid x210xJ84An8rd6Xy; 1.163 date 2015.07.26.22.13.17; author khorben; state Exp; branches; next 1.162; commitid W94c6Ty7cS55rQuy; 1.162 date 2015.07.16.12.09.04; author ryoon; state Exp; branches; next 1.161; commitid Qh2d4yR9Lyk9qvty; 1.161 date 2015.04.27.10.33.49; author tnn; state Exp; branches; next 1.160; commitid F4vtj16TZQ5fsdjy; 1.160 date 2015.04.25.10.33.29; author wiz; state Exp; branches; next 1.159; commitid CG2XaBpeRQKMwXiy; 1.159 date 2015.04.18.19.53.59; author joerg; state Exp; branches; next 1.158; commitid NKUrYC549jIZQ6iy; 1.158 date 2015.04.02.23.50.25; author jperkin; state Exp; branches; next 1.157; commitid V3pWYzPHNs83E4gy; 1.157 date 2015.04.02.23.42.15; author jperkin; state Exp; branches; next 1.156; commitid KRrEo9vzP1QiC4gy; 1.156 date 2015.04.02.23.21.01; author jperkin; state Exp; branches; next 1.155; commitid UBEibTVUhKgJu4gy; 1.155 date 2015.02.04.14.11.50; author jperkin; state Exp; branches; next 1.154; commitid A87oig6Gf5g3jH8y; 1.154 date 2015.01.01.01.33.05; author ryoon; state Exp; branches; next 1.153; commitid K0QQeS2yZqCzcg4y; 1.153 date 2014.11.03.13.06.39; author ryoon; state Exp; branches; next 1.152; commitid mt1vjnnCUsw2WJWx; 1.152 date 2014.10.31.14.22.20; author ryoon; state Exp; branches; next 1.151; commitid qp0iTlvs8OE1smWx; 1.151 date 2014.09.06.08.32.55; author jperkin; state Exp; branches; next 1.150; commitid MQlUFaktjjkzhgPx; 1.150 date 2014.09.05.22.11.10; author jperkin; state Exp; branches; next 1.149; commitid tVQh3IAddsspQcPx; 1.149 date 2014.09.04.18.52.53; author jperkin; state Exp; branches; next 1.148; commitid NECsTsts7HoqM3Px; 1.148 date 2014.06.09.23.29.31; author ryoon; state Exp; branches; next 1.147; commitid nbrmslSGoyiF6UDx; 1.147 date 2014.06.01.09.58.13; author ryoon; state Exp; branches; next 1.146; commitid 781Zt8QWpqXlSNCx; 1.146 date 2014.06.01.08.14.27; author ryoon; state Exp; branches; next 1.145; commitid iv8df9aU8KgJiNCx; 1.145 date 2014.04.22.20.49.38; author ryoon; state Exp; branches; next 1.144; commitid b5WjgHA2Bk2zLIxx; 1.144 date 2014.02.04.12.11.57; author fhajny; state Exp; branches; next 1.143; commitid O51LEcHXpWfZlMnx; 1.143 date 2013.11.23.08.55.28; author obache; state Exp; branches; next 1.142; commitid Ggt1RboUIe03Dnex; 1.142 date 2013.07.09.10.13.43; author jperkin; state Exp; branches; next 1.141; commitid gKjiqaI6CENftMWw; 1.141 date 2013.06.15.22.32.18; author wiz; state Exp; branches; next 1.140; commitid 3617BqzgsUuvkLTw; 1.140 date 2013.06.15.21.52.11; author asau; state Exp; branches; next 1.139; commitid LQe6jpUmqWtQ6LTw; 1.139 date 2013.06.15.21.50.43; author asau; state Exp; branches; next 1.138; commitid zxu9OEATLsdl6LTw; 1.138 date 2013.06.15.19.06.31; author joerg; state Exp; branches; next 1.137; commitid 2bFQ7AyNtyyDbKTw; 1.137 date 2013.06.13.10.45.46; author jperkin; state Exp; branches; next 1.136; commitid tAMP2V3lO0oLtrTw; 1.136 date 2013.04.20.07.36.17; author sbd; state Exp; branches; next 1.135; 1.135 date 2013.04.19.16.34.46; author adam; state Exp; branches; next 1.134; 1.134 date 2013.04.17.09.48.30; author adam; state Exp; branches; next 1.133; 1.133 date 2013.04.02.22.24.03; author wiz; state Exp; branches; next 1.132; 1.132 date 2013.04.01.21.06.57; author wiz; state Exp; branches; next 1.131; 1.131 date 2013.04.01.19.07.40; author wiz; state Exp; branches; next 1.130; 1.130 date 2012.12.12.20.49.01; author marino; state Exp; branches; next 1.129; 1.129 date 2012.09.17.04.43.56; author obache; state Exp; branches; next 1.128; 1.128 date 2012.09.16.12.18.30; author jperkin; state Exp; branches; next 1.127; 1.127 date 2012.09.16.07.31.18; author sbd; state Exp; branches; next 1.126; 1.126 date 2012.09.13.10.17.14; author sbd; state Exp; branches; next 1.125; 1.125 date 2012.07.27.10.34.00; author jperkin; state Exp; branches; next 1.124; 1.124 date 2012.07.13.16.11.29; author jperkin; state Exp; branches; next 1.123; 1.123 date 2012.07.09.07.42.17; author sbd; state Exp; branches; next 1.122; 1.122 date 2012.07.08.19.57.10; author marino; state Exp; branches; next 1.121; 1.121 date 2012.06.26.15.48.53; author jperkin; state Exp; branches; next 1.120; 1.120 date 2012.04.25.16.28.18; author hans; state Exp; branches; next 1.119; 1.119 date 2012.04.24.07.44.11; author sbd; state Exp; branches; next 1.118; 1.118 date 2012.04.16.05.03.03; author sbd; state Exp; branches; next 1.117; 1.117 date 2012.04.16.05.00.44; author sbd; state Exp; branches; next 1.116; 1.116 date 2012.04.13.03.03.36; author sbd; state Exp; branches; next 1.115; 1.115 date 2012.04.13.02.30.45; author sbd; state Exp; branches; next 1.114; 1.114 date 2012.03.06.11.39.55; author hans; state Exp; branches; next 1.113; 1.113 date 2012.02.28.12.57.24; author hans; state Exp; branches; next 1.112; 1.112 date 2011.11.03.19.11.37; author hans; state Exp; branches; next 1.111; 1.111 date 2011.09.08.20.17.15; author abs; state Exp; branches; next 1.110; 1.110 date 2011.08.18.10.01.31; author wiz; state Exp; branches; next 1.109; 1.109 date 2011.06.10.08.59.58; author wiz; state Exp; branches; next 1.108; 1.108 date 2011.02.25.13.34.56; author hans; state Exp; branches; next 1.107; 1.107 date 2010.12.26.14.13.44; author asau; state Exp; branches; next 1.106; 1.106 date 2010.07.30.07.58.59; author asau; state Exp; branches; next 1.105; 1.105 date 2010.05.06.10.21.17; author adam; state Exp; branches; next 1.104; 1.104 date 2010.04.24.08.33.19; author obache; state Exp; branches; next 1.103; 1.103 date 2010.03.15.08.27.49; author adam; state Exp; branches; next 1.102; 1.102 date 2009.09.18.11.38.23; author dmcmahill; state Exp; branches; next 1.101; 1.101 date 2009.09.18.11.27.41; author dmcmahill; state Exp; branches; next 1.100; 1.100 date 2009.09.12.21.42.27; author tron; state Exp; branches; next 1.99; 1.99 date 2009.07.28.06.55.24; author rillig; state Exp; branches; next 1.98; 1.98 date 2009.07.08.21.25.30; author markd; state Exp; branches; next 1.97; 1.97 date 2009.05.30.18.16.26; author joerg; state Exp; branches; next 1.96; 1.96 date 2009.03.17.21.28.10; author rillig; state Exp; branches; next 1.95; 1.95 date 2008.11.16.17.01.53; author ahoka; state Exp; branches; next 1.94; 1.94 date 2008.09.16.15.02.55; author rillig; state Exp; branches; next 1.93; 1.93 date 2008.02.07.20.59.05; author rillig; state Exp; branches; next 1.92; 1.92 date 2007.08.11.17.31.22; author joerg; state Exp; branches; next 1.91; 1.91 date 2007.08.02.18.19.32; author joerg; state Exp; branches; next 1.90; 1.90 date 2007.02.10.08.59.07; author rillig; state Exp; branches; next 1.89; 1.89 date 2007.01.08.19.29.45; author gavan; state Exp; branches; next 1.88; 1.88 date 2006.12.15.12.46.24; author martti; state Exp; branches 1.88.2.1; next 1.87; 1.87 date 2006.12.06.16.18.19; author joerg; state Exp; branches; next 1.86; 1.86 date 2006.12.02.22.32.59; author jschauma; state Exp; branches; next 1.85; 1.85 date 2006.10.22.00.14.17; author rillig; state Exp; branches; next 1.84; 1.84 date 2006.07.06.11.48.03; author markd; state Exp; branches; next 1.83; 1.83 date 2006.04.05.12.31.24; author shannonjr; state Exp; branches; next 1.82; 1.82 date 2006.02.10.11.26.41; author shannonjr; state Exp; branches; next 1.81; 1.81 date 2005.05.31.10.51.36; author shannonjr; state Exp; branches; next 1.80; 1.80 date 2005.03.24.17.46.01; author tv; state Exp; branches; next 1.79; 1.79 date 2005.01.21.21.59.14; author tv; state Exp; branches; next 1.78; 1.78 date 2005.01.12.15.32.01; author jlam; state Exp; branches; next 1.77; 1.77 date 2004.11.30.14.50.37; author jlam; state Exp; branches; next 1.76; 1.76 date 2004.11.23.05.32.22; author jlam; state Exp; branches; next 1.75; 1.75 date 2004.11.23.00.46.26; author dmcmahill; state Exp; branches; next 1.74; 1.74 date 2004.11.22.22.24.47; author wiz; state Exp; branches 1.74.2.1; next 1.73; 1.73 date 2004.11.10.12.04.59; author shannonjr; state Exp; branches; next 1.72; 1.72 date 2004.09.23.15.25.54; author jlam; state Exp; branches; next 1.71; 1.71 date 2004.09.23.13.49.21; author jlam; state Exp; branches; next 1.70; 1.70 date 2004.08.27.06.29.09; author jlam; state Exp; branches; next 1.69; 1.69 date 2004.07.06.22.49.18; author wiz; state Exp; branches; next 1.68; 1.68 date 2004.07.03.11.25.49; author grant; state Exp; branches; next 1.67; 1.67 date 2004.05.17.05.33.08; author jlam; state Exp; branches; next 1.66; 1.66 date 2004.05.17.03.12.46; author jschauma; state Exp; branches; next 1.65; 1.65 date 2004.05.12.21.31.50; author jschauma; state Exp; branches; next 1.64; 1.64 date 2004.05.05.03.05.41; author jschauma; state Exp; branches; next 1.63; 1.63 date 2004.05.04.00.11.23; author danw; state Exp; branches; next 1.62; 1.62 date 2004.03.30.21.39.24; author jlam; state Exp; branches; next 1.61; 1.61 date 2004.03.13.20.02.52; author jlam; state Exp; branches; next 1.60; 1.60 date 2004.03.13.19.08.37; author jlam; state Exp; branches; next 1.59; 1.59 date 2004.03.13.17.52.24; author jlam; state Exp; branches; next 1.58; 1.58 date 2004.03.12.06.09.12; author jlam; state Exp; branches; next 1.57; 1.57 date 2004.03.10.05.13.38; author dmcmahill; state Exp; branches; next 1.56; 1.56 date 2004.03.05.14.36.34; author wiz; state Exp; branches; next 1.55; 1.55 date 2004.02.20.07.18.19; author jlam; state Exp; branches; next 1.54; 1.54 date 2004.02.20.07.10.06; author jlam; state Exp; branches; next 1.53; 1.53 date 2004.02.18.13.32.38; author jlam; state Exp; branches; next 1.52; 1.52 date 2004.02.15.13.34.33; author jlam; state Exp; branches; next 1.51; 1.51 date 2004.02.12.08.54.48; author jlam; state Exp; branches; next 1.50; 1.50 date 2004.02.09.05.45.57; author jlam; state Exp; branches; next 1.49; 1.49 date 2004.02.09.05.22.43; author jlam; state Exp; branches; next 1.48; 1.48 date 2004.02.09.00.37.32; author jlam; state Exp; branches; next 1.47; 1.47 date 2004.02.08.03.34.20; author jlam; state Exp; branches; next 1.46; 1.46 date 2004.02.08.03.29.16; author jlam; state Exp; branches; next 1.45; 1.45 date 2004.02.08.02.59.14; author jlam; state Exp; branches; next 1.44; 1.44 date 2004.02.07.02.58.10; author jlam; state Exp; branches; next 1.43; 1.43 date 2004.02.06.20.15.49; author jlam; state Exp; branches; next 1.42; 1.42 date 2004.02.06.19.16.37; author jlam; state Exp; branches; next 1.41; 1.41 date 2004.02.06.18.45.03; author jlam; state Exp; branches; next 1.40; 1.40 date 2004.02.06.04.38.10; author jlam; state Exp; branches; next 1.39; 1.39 date 2004.02.06.04.37.02; author jlam; state Exp; branches; next 1.38; 1.38 date 2004.02.06.03.04.50; author jlam; state Exp; branches; next 1.37; 1.37 date 2004.02.05.04.12.28; author jlam; state Exp; branches; next 1.36; 1.36 date 2004.02.05.03.35.20; author jlam; state Exp; branches; next 1.35; 1.35 date 2004.02.05.01.57.38; author jlam; state Exp; branches; next 1.34; 1.34 date 2004.02.05.01.50.55; author jlam; state Exp; branches; next 1.33; 1.33 date 2004.02.05.01.42.05; author jlam; state Exp; branches; next 1.32; 1.32 date 2004.02.05.01.28.20; author jlam; state Exp; branches; next 1.31; 1.31 date 2004.02.04.23.25.13; author jlam; state Exp; branches; next 1.30; 1.30 date 2004.02.04.23.24.36; author jlam; state Exp; branches; next 1.29; 1.29 date 2004.02.04.23.10.19; author jlam; state Exp; branches; next 1.28; 1.28 date 2004.02.04.22.33.18; author jlam; state Exp; branches; next 1.27; 1.27 date 2004.02.04.00.32.16; author jlam; state Exp; branches; next 1.26; 1.26 date 2004.02.04.00.27.24; author jlam; state Exp; branches; next 1.25; 1.25 date 2004.02.04.00.11.07; author jlam; state Exp; branches; next 1.24; 1.24 date 2004.02.03.22.35.05; author jlam; state Exp; branches; next 1.23; 1.23 date 2004.02.03.22.32.22; author jlam; state Exp; branches; next 1.22; 1.22 date 2004.02.03.22.31.33; author jlam; state Exp; branches; next 1.21; 1.21 date 2004.02.03.21.56.40; author jlam; state Exp; branches; next 1.20; 1.20 date 2004.02.03.21.51.45; author jlam; state Exp; branches; next 1.19; 1.19 date 2004.02.03.21.48.14; author jlam; state Exp; branches; next 1.18; 1.18 date 2004.02.03.21.30.26; author jlam; state Exp; branches; next 1.17; 1.17 date 2004.02.03.20.38.39; author jlam; state Exp; branches; next 1.16; 1.16 date 2004.02.03.05.14.03; author jlam; state Exp; branches; next 1.15; 1.15 date 2004.02.03.04.09.27; author jlam; state Exp; branches; next 1.14; 1.14 date 2004.02.03.03.47.45; author jlam; state Exp; branches; next 1.13; 1.13 date 2004.02.02.12.45.08; author jlam; state Exp; branches; next 1.12; 1.12 date 2004.02.02.12.44.22; author jlam; state Exp; branches; next 1.11; 1.11 date 2004.02.02.12.27.12; author jlam; state Exp; branches; next 1.10; 1.10 date 2004.02.02.10.49.26; author jlam; state Exp; branches; next 1.9; 1.9 date 2004.02.02.10.34.00; author jlam; state Exp; branches; next 1.8; 1.8 date 2004.02.02.10.03.46; author jlam; state Exp; branches; next 1.7; 1.7 date 2004.02.01.14.36.23; author jlam; state Exp; branches; next 1.6; 1.6 date 2004.02.01.14.11.01; author jlam; state Exp; branches; next 1.5; 1.5 date 2004.02.01.12.16.10; author jlam; state Exp; branches; next 1.4; 1.4 date 2004.02.01.07.54.33; author jlam; state Exp; branches; next 1.3; 1.3 date 2004.02.01.01.23.37; author jlam; state Exp; branches; next 1.2; 1.2 date 2004.02.01.00.59.51; author jlam; state Exp; branches; next 1.1; 1.1 date 2004.02.01.00.31.00; author jlam; state Exp; branches; next ; 1.174.2.1 date 2017.04.16.14.56.21; author bsiegert; state Exp; branches; next ; commitid XMKfhWxlVp88MLNz; 1.88.2.1 date 2007.03.08.23.22.07; author salo; state Exp; branches; next ; 1.74.2.1 date 2004.11.23.20.54.12; author tv; state Exp; branches; next 1.74.2.2; 1.74.2.2 date 2004.11.30.15.06.35; author tv; state Exp; branches; next 1.74.2.3; 1.74.2.3 date 2005.01.13.20.11.55; author tv; state Exp; branches; next 1.74.2.4; 1.74.2.4 date 2005.01.24.18.40.01; author tv; state Exp; branches; next 1.74.2.5; 1.74.2.5 date 2005.05.17.18.29.45; author tv; state Exp; branches; next 1.74.2.6; 1.74.2.6 date 2006.06.07.15.25.39; author tv; state dead; branches; next ; desc @@ 1.275 log @mk: More BUILDLINK_TRANSFORMs to make software work with old versions There is an existing rule that translates c++03 to c++0x for old versions of GCC - this is iffy, GCC treats c++0x as an alias for c++11. Rewrite c++03 to c++98 for older compilers instead. @ text @# $NetBSD: gcc.mk,v 1.274 2024/03/08 12:45:50 wiz Exp $ # # This is the compiler definition for the GNU Compiler Collection. # # User-settable variables: # # GCCBASE # If using a native GCC and the compiler is not in $PATH then # this should be set to the base installation directory. # # USE_NATIVE_GCC # When set to "yes", the native gcc is used, no matter which # compiler version a package requires. # # USE_PKGSRC_GCC # When set to "yes", use an appropriate version of GCC from # pkgsrc based on GCC_REQD instead of the native compiler. # # USE_PKGSRC_GCC_RUNTIME # When set to "yes", the runtime gcc libraries (libgcc, libstdc++ # etc) will be used from pkgsrc rather than the native compiler. # # GCC_VERSION_SUFFIX # Optional suffix for GCC binaries, i.e. if the installed names are like # /usr/bin/g++-5, /usr/bin/gcc-5 etc. # Package-settable variables: # # GCC_REQD # The minimum version of the GNU Compiler Collection that is # required to build this package. Setting this variable doesn't # change the compiler that is used for building packages. See # ONLY_FOR_COMPILER for that purpose. This is a list of version # numbers, of which the maximum version is the definitive one. # # This variable can also be set by the user when USE_PKGSRC_GCC # is in effect to ensure that a specific compiler is used for # packages which do not specify a higher version. # # USE_GCC_RUNTIME # Packages which build shared libraries but do not use libtool to # do so should define this variable. It is used to determine whether # the gcc runtime should be depended upon when a user has enabled # USE_PKGSRC_GCC_RUNTIME. # # System-defined variables: # # CC_VERSION # A string of the form "gcc-4.3.2" # # CC_VERSION_STRING # The same(?) as CC_VERSION. FIXME: What's the difference between # the two? # # Keywords: gcc # .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined _VARGROUPS+= gcc _USER_VARS.gcc= \ USE_NATIVE_GCC USE_PKGSRC_GCC USE_PKGSRC_GCC_RUNTIME \ GCCBASE GCC_VERSION_SUFFIX \ TOOLS_USE_CROSS_COMPILE \ PKGSRC_USE_FORTIFY PKGSRC_USE_RELRO PKGSRC_USE_SSP \ COMPILER_USE_SYMLINKS CC _PKG_VARS.gcc= \ GCC_REQD USE_GCC_RUNTIME USE_LANGUAGES _SYS_VARS.gcc= \ CC_VERSION CC_VERSION_STRING LANGUAGES.gcc \ CCPATH CPPPATH CXXPATH F77PATH FCPATH \ PKG_CC PKG_CPP PKG_CXX PKG_FC FC PKGSRC_FORTRAN \ ADAPATH GMKPATH GLKPATH GBDPATH CHPPATH GLSPATH GNTPATH PRPPATH _DEF_VARS.gcc= \ MAKEFLAGS IMAKEOPTS \ CFLAGS LDFLAGS \ PREPEND_PATH \ COMPILER_INCLUDE_DIRS COMPILER_LIB_DIRS \ CWRAPPERS_APPEND.cc CWRAPPERS_APPEND.cxx CWRAPPERS_APPEND.ld \ PKG_ADA PKG_GMK PKG_GLK PKG_GBD PKG_CHP PKG_GNT PKG_GLS PKG_PRP \ PKGSRC_ADA PKGSRC_GMK PKGSRC_GLK PKGSRC_GBD PKGSRC_CHP PKGSRC_GNT PKGSRC_GLS PKGSRC_PRP \ _CC _COMPILER_RPATH_FLAG _COMPILER_STRIP_VARS \ _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CFLAGS \ _GCC_CC _GCC_CPP _GCC_CXX _GCC_DEPENDENCY _GCC_DEPENDS \ _GCC_DIST_NAME _GCC_DIST_VERSION \ _GCC_FC _GCC_LDFLAGS _GCC_LIBDIRS _GCC_PKG \ _GCC_PKGBASE _GCC_PKGSRCDIR _GCC_PKG_SATISFIES_DEP \ _GCC_PREFIX _GCC_REQD _GCC_STRICTEST_REQD _GCC_SUBPREFIX \ _GCC_TEST_DEPENDS _GCC_NEEDS_A_FORTRAN _GCC_VARS _GCC_VERSION \ _GCC_VERSION_STRING \ _GCC_ADA _GCC_GMK _GCC_GLK _GCC_GBD _GCC_CHP _GCC_GLS _GCC_GNT _GCC_PRP \ _IGNORE_GCC \ _IS_BUILTIN_GCC \ _LANGUAGES.gcc \ _LINKER_RPATH_FLAG \ _NEED_GCC6 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \ _NEED_GCC10 _NEED_GCC12 _NEED_GCC13 \ _NEED_GCC_AUX _NEED_NEWER_GCC \ _NEED_GCC6_AUX _NEED_GCC10_AUX _NEED_GCC13_GNAT \ _PKGSRC_GCC_VERSION \ _USE_GCC_SHLIB _USE_PKGSRC_GCC \ _WRAP_EXTRA_ARGS.CC \ _EXTRA_CC_DIRS \ _C_STD_VERSIONS \ ${_C_STD_VERSIONS:@@std@@_C_STD_FLAG.${std}@@} \ _CXX_STD_VERSIONS \ ${_CXX_STD_VERSIONS:@@std@@_CXX_STD_FLAG.${std}@@} \ _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS \ _FORTIFY_CFLAGS _RELRO_LDFLAGS _STACK_CHECK_CFLAGS \ _CTF_CFLAGS \ _GCC_DIR \ _ALIASES.CC _ALIASES.CPP _ALIASES.CXX _ALIASES.FC \ _ALIASES.ADA _ALIASES.GMK _ALIASES.GLK _ALIASES.GBD \ _ALIASES.CHP _ALIASES.PRP _ALIASES.GLS _ALIASES.GNT \ _COMPILER_ABI_FLAG.32 _COMPILER_ABI_FLAG.64 \ _COMPILER_ABI_FLAG.n32 _COMPILER_ABI_FLAG.o32 \ _SSP_CFLAGS \ _CXX_STD_FLAG.c++03 _CXX_STD_FLAG.gnu++03 _USE_VARS.gcc= \ MACHINE_ARCH PATH DRAGONFLY_CCVER OPSYS TOOLBASE \ USE_LIBTOOL \ LIBABISUFFIX \ COMPILER_RPATH_FLAG \ MACHINE_GNU_PLATFORM \ WRKDIR MACHINE_PLATFORM PKGPATH \ _PKGSRC_MKPIE _PKGSRC_MKREPRO _MKREPRO_CFLAGS.gcc \ _PKGSRC_USE_FORTIFY _PKGSRC_USE_RELRO _PKGSRC_USE_STACK_CHECK \ _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS _IGN_VARS.gcc= \ _GCC6_PATTERNS _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \ _GCC10_PATTERNS _GCC12_PATTERNS _GCC13_PATTERNS _GCC_AUX_PATTERNS _LISTED_VARS.gcc= \ MAKEFLAGS IMAKEOPTS LDFLAGS PREPEND_PATH .include "../../mk/bsd.prefs.mk" USE_NATIVE_GCC?= no USE_PKGSRC_GCC?= no USE_PKGSRC_GCC_RUNTIME?=no # # Each successive GCC_REQD has an associated cost below when executing # pkg_admin to determine if it's suitable, so only add these incredibly # old versions if we haven't already set one. # .if !defined(GCC_REQD) . if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64" GCC_REQD+= 3.0 . else GCC_REQD+= 2.8.0 . endif .endif .include "../../mk/compiler/gcc-style-args.mk" # # Most of the time, GCC adds support for features of new C and C++ # standards incrementally; we define USE_CXX_FEATURES=c++XX as # intending to require a compiler that fully supports the standard. # We tend towards a gcc version shipped with a NetBSD release, because # those are known to work well, and because it is simpler to limit # selection to fewer versions. This tendency is much stronger for C++ # versions, and less so for c11. # # Thus we tend to: # - gcc 4.8, shipped with NetBSD 7 # - gcc 5, shipped with NetBSD 8 # - gcc 7, shipped with NetBSD 9 # - gcc 10, shipped with NetBSD 10 # # Other systems have different versions, and we note a few: # # - gcc 8, shipped with Enterprise Linux 8 # # Resources: # https://gcc.gnu.org/projects/cxx-status.html # https://gcc.gnu.org/wiki/C11Status # https://gcc.gnu.org/c99status.html # .if !empty(USE_CXX_FEATURES:Mc++23) # GCC 11 is the first version to support -std=c++23, # but it was never packaged for pkgsrc, so use GCC 12 instead. GCC_REQD+= 12 .endif .if !empty(USE_CXX_FEATURES:Mc++20) # GCC 10 is chosen because it is planned to be shipped with NetBSD 10, # so is fairly battle-hardened with pkgsrc. # # We hope that it remains OK for most C++20 in the future... GCC_REQD+= 10 .endif .if !empty(USE_CXX_FEATURES:Mc++17) # GCC 7 is chosen because it shipped with NetBSD 9, so is fairly # battle-hardened with pkgsrc. GCC_REQD+= 7 .endif .if !empty(USE_CXX_FEATURES:Mc++14) # GCC 5 is chosen because it shipped with NetBSD 8, so is fairly # battle-hardened with pkgsrc. GCC_REQD+= 5 .endif .if !empty(USE_CXX_FEATURES:Mc++11) # While gcc "technically" added experimental C++11 support earlier # (and there was previously a lot of cargo-culted GCC_REQD in pkgsrc # as a result), earlier compiler versions are not so well-tested any more. # # GCC 4.8 was the version shipped with NetBSD 7 and CentOS 7, so is fairly # battle-hardened with pkgsrc. # # Versions before GCC 4.7 do not accept -std=c++11. GCC_REQD+= 4.8 .endif .if !empty(USE_CXX_FEATURES:Mhas_include) || \ !empty(USE_CC_FEATURES:Mhas_include) GCC_REQD+= 5 .endif .if !empty(USE_CC_FEATURES:Mc99) GCC_REQD+= 3 .endif # 4.9 supports c11; don't reject it by rounding up to 5 .if !empty(USE_CC_FEATURES:Mc11) GCC_REQD+= 4.9 .endif .if !empty(USE_CC_FEATURES:Mc17) # See http://mail-index.netbsd.org/pkgsrc-users/2024/01/02/msg038697.html # Actually gcc-9.x is enough, but it is not in any NetBSD # base system, thus for convenience GCC_REQD+= 10.0 .endif # Don't round to gcc 5. .if !empty(USE_CXX_FEATURES:Munique_ptr) GCC_REQD+= 4.9 .endif # Don't round to gcc 5. .if !empty(USE_CXX_FEATURES:Mregex) GCC_REQD+= 4.9 .endif .if !empty(USE_CXX_FEATURES:Mput_time) GCC_REQD+= 5 .endif .if !empty(USE_CXX_FEATURES:Mis_trivially_copy_constructible) GCC_REQD+= 5 .endif .if !empty(USE_CXX_FEATURES:Mfilesystem) # GCC 7 supports filesystem under an experimental header, this is not # part of GCC 7 as shipped with NetBSD 9. # # GCC 8 supports filesystem with explicit linking to the libstdc++fs # library, which many packages do not do. GCC_REQD+= 10 .endif .if !empty(USE_CXX_FEATURES:Mparallelism_ts) GCC_REQD+= 10 .endif # Don't round to gcc10. .if !empty(USE_CXX_FEATURES:Mcharconv) GCC_REQD+= 8 .endif # If the Ada language is requested, force use of aux/gnat comilers _NEED_GCC_AUX?=no .if !empty(USE_LANGUAGES:Mada) _NEED_GCC_AUX=yes .endif # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc # without the PKGREVISIONs. _GCC_DIST_NAME:= gcc13 .include "../../lang/${_GCC_DIST_NAME}/version.mk" _GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION} # _GCC6_PATTERNS matches N s.t. N < 7. _GCC6_PATTERNS= 5 6 [0-6].* # _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8. _GCC7_PATTERNS= 7 7.* # _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9. _GCC8_PATTERNS= 8 8.* # _GCC9_PATTERNS matches N s.t. 9.0 <= N < 10. _GCC9_PATTERNS= 9 9.* # _GCC10_PATTERNS matches N s.t. 10.0 <= N < 11. _GCC10_PATTERNS= 10 10.* # _GCC12_PATTERNS matches N s.t. 12.0 <= N < 13. # gcc 11.x is not packaged, so depend on gcc12 in that case too _GCC12_PATTERNS= 11 11.* 12 12.* # _GCC13_PATTERNS matches N s.t. 13.0 <= N < 14. _GCC13_PATTERNS= 13 13.* # _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD* _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]* # Override the default from sys.mk if necessary. .if ${CC} == cc && ${GCCBASE:U} && !exists(${GCCBASE}/bin/${CC}) && exists(${GCCBASE}/bin/gcc) CC= gcc .endif # _CC is the full path to the compiler named by ${CC} if it can be found. .if !defined(_CC) _CC:= ${CC:[1]} . if !empty(GCCBASE) && exists(${GCCBASE}/bin) _EXTRA_CC_DIRS= ${GCCBASE}/bin . endif . for _dir_ in ${_EXTRA_CC_DIRS} ${PATH:C/\:/ /g} . if empty(_CC:M/*) . if exists(${_dir_}/${CC:[1]}) _CC:= ${_dir_}/${CC:[1]} . endif . endif . endfor . if ${TOOLS_USE_CROSS_COMPILE:tl} == "no" # Pass along _CC only if we're working on native packages -- don't pass # the cross-compiler on to submakes for building native packages. MAKEFLAGS+= _CC=${_CC:Q} . endif .endif .if !defined(_GCC_VERSION) # # FIXME: Ideally we'd use PKGSRC_SETENV here, but not enough of the tools # infrastructure is loaded for SETENV to be defined when mk/compiler.mk is # included first. LC_ALL is required here for similar reasons, as ALL_ENV # is not defined at this stage. # _GCC_VERSION_STRING!= \ ( env LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0 . if !empty(_GCC_VERSION_STRING:Megcs*) _GCC_VERSION= 2.8.1 # egcs is considered to be gcc-2.8.1. . elif !empty(DRAGONFLY_CCVER) && ${OPSYS} == "DragonFly" _GCC_VERSION!= env CCVER=${DRAGONFLY_CCVER} ${_CC} -dumpversion . elif !empty(_GCC_VERSION_STRING:Mgcc*) _GCC_VERSION!= ${_CC} -dumpversion . else _GCC_VERSION= 0 . endif .endif _GCC_PKG= gcc-${_GCC_VERSION:C/-.*$//} .if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[01].*) # A lot of packages attempt to do this as a workaround for a # well-intentioned default in XCode 12+, but it's a common cause of # build failures on old versions of Darwin which use gcc and don't # understand this syntax. # # Note that pkgsrc also sets this flag itself for Darwin+clang. BUILDLINK_TRANSFORM+= rm:-Wno-error=implicit-function-declaration BUILDLINK_TRANSFORM+= rm:-Wno-error=sign-conversion .endif .if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[01234].*) # Added in GCC 4.5 BUILDLINK_TRANSFORM+= rm:-Wno-unused-result .endif .if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[012].*) # Added in GCC 4.3 BUILDLINK_TRANSFORM+= rm:-Wvla .endif .if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.0.*) # Added in GCC 4.3 BUILDLINK_TRANSFORM+= rm:-Wc++-compat BUILDLINK_TRANSFORM+= rm:-Wno-c++-compat .endif .if !empty(_GCC_VERSION:M[23456].*) # Added in GCC 7 BUILDLINK_TRANSFORM+= rm:-Wimplicit-fallthrough BUILDLINK_TRANSFORM+= rm:-Wno-implicit-fallthrough .endif .if !empty(_GCC_VERSION:M3.*) || !empty(_GCC_VERSION:M4.[0-7].*) # Added in GCC 4.8 BUILDLINK_TRANSFORM+= opt:-std=c++03:-std=c++98 BUILDLINK_TRANSFORM+= opt:-std=gnu++03:-std=gnu++98 .endif .if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[0-8].*) COMPILER_HAS_C11?= no .else COMPILER_HAS_C11?= yes .endif .for _version_ in ${_C_STD_VERSIONS} _C_STD_FLAG.${_version_}?= -std=${_version_} .endfor # XXX: pkgsrc historically hardcoded c99=gnu99 so we retain that for now, but # we should look at removing this and be explicit in packages where required. _C_STD_FLAG.c99= -std=gnu99 .for _version_ in ${_CXX_STD_VERSIONS} _CXX_STD_FLAG.${_version_}?= -std=${_version_} .endfor .if !empty(_CC:M${TOOLBASE}/*) _IS_BUILTIN_GCC= NO GCC_REQD+= ${_GCC_VERSION} .else . if !empty(_CC:M/*) # # GCC in older versions of Darwin report "Apple Computer ... based on gcc # version ...", so we can't just grep for "^gcc". # . if ${_GCC_VERSION} != "0" _IS_BUILTIN_GCC= YES . else _IS_BUILTIN_GCC= NO . endif . else _IS_BUILTIN_GCC= NO . endif .endif # Distill the GCC_REQD list into a single _GCC_REQD value that is the # highest version of GCC required. # _GCC_STRICTEST_REQD?= none .for _version_ in ${GCC_REQD} . for _pkg_ in gcc-${_version_} . if ${_GCC_STRICTEST_REQD} == "none" _GCC_PKG_SATISFIES_DEP= YES . for _vers_ in ${GCC_REQD} . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) _GCC_PKG_SATISFIES_DEP!= \ if ${PKG_ADMIN} pmatch 'gcc>=${_vers_}' ${_pkg_} 2>/dev/null; then \ ${ECHO} "YES"; \ else \ ${ECHO} "NO"; \ fi . endif . endfor . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) _GCC_STRICTEST_REQD= ${_version_} . endif . endif . endfor .endfor _GCC_REQD= ${_GCC_STRICTEST_REQD} # Determine which GCC version is required by examining _GCC_REQD. _NEED_GCC6?= no .for _pattern_ in ${_GCC6_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) # XXX this won't work without adjustments elsewhere because of how # _GCC_REQD is processed. #. if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 089937 #USE_PKGSRC_GCC= yes #USE_PKGSRC_GCC_RUNTIME= yes #. endif _NEED_GCC6= yes . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 6 to build" . endif . endif .endfor _NEED_GCC7?= no .for _pattern_ in ${_GCC7_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) . if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 089937 USE_PKGSRC_GCC= yes USE_PKGSRC_GCC_RUNTIME= yes . endif . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 7 to build" . endif _NEED_GCC7= yes . endif .endfor _NEED_GCC8?= no .for _pattern_ in ${_GCC8_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) . if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099917 USE_PKGSRC_GCC= yes USE_PKGSRC_GCC_RUNTIME= yes . endif . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 8 to build" . endif _NEED_GCC8= yes . endif .endfor _NEED_GCC9?= no .for _pattern_ in ${_GCC9_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) . if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099976 USE_PKGSRC_GCC= yes USE_PKGSRC_GCC_RUNTIME= yes . endif . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 9 to build" . endif _NEED_GCC9= yes . endif .endfor _NEED_GCC10?= no .for _pattern_ in ${_GCC10_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) . if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099982 USE_PKGSRC_GCC= yes USE_PKGSRC_GCC_RUNTIME= yes . endif . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 10 to build" . endif _NEED_GCC10= yes . endif .endfor _NEED_GCC12?= no .for _pattern_ in ${_GCC12_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) # XXX: pin to a version when NetBSD switches to gcc12 . if ${OPSYS} == "NetBSD" USE_PKGSRC_GCC= yes USE_PKGSRC_GCC_RUNTIME= yes . endif . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 12 to build" . endif _NEED_GCC12= yes . endif .endfor _NEED_GCC13?= no .for _pattern_ in ${_GCC13_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) # XXX: pin to a version when NetBSD switches to gcc13 . if ${OPSYS} == "NetBSD" USE_PKGSRC_GCC= yes USE_PKGSRC_GCC_RUNTIME= yes . endif . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gcc 13 to build" . endif _NEED_GCC13= yes . endif .endfor # AUX patterns really don't work starting from gcc10-aux #_NEED_GCC_AUX?= no #.for _pattern_ in ${_GCC_AUX_PATTERNS} #. if !empty(_GCC_REQD:M${_pattern_}) #_NEED_GCC_AUX= yes #_NEED_NEWER_GCC=NO #. endif #.endfor .if !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC7:M[nN][oO]) && \ !empty(_NEED_GCC8:M[nN][oO]) && !empty(_NEED_GCC9:M[nN][oO]) && \ !empty(_NEED_GCC10:M[nN][oO]) && !empty(_NEED_GCC12:M[nN][oO]) && \ !empty(_NEED_GCC13:M[nN][oO]) && !empty(_NEED_GCC_AUX:M[nN][oO]) _NEED_GCC8= yes .endif # April 2022: GCC below 10 from pkgsrc is broken on 32-bit arm NetBSD. .if !empty(MACHINE_PLATFORM:MNetBSD-*-earm*) && \ ${OPSYS_VERSION} < 099900 && \ (${_NEED_GCC8:tl} == "yes" || ${_NEED_GCC9:tl} == "yes") _NEED_GCC6= no _NEED_GCC7= no _NEED_GCC8= no _NEED_GCC9= no _NEED_GCC10= yes _NEED_GCC12= yes _NEED_GCC13= yes .endif # We have fixed set of Ada compilers and languages them provided. So we try to find best possible variant _NEED_GCC6_AUX?=no _NEED_GCC10_AUX?=no _NEED_GCC13_GNAT?=no .if ${_NEED_GCC_AUX:tl} == "yes" USE_PKGSRC_GCC=yes USE_PKGSRC_GCC_RUNTIME=no . if ${ALLOW_NEWER_COMPILER:tl} != "yes" PKG_FAIL_REASON+= "Package requires at least gnat 13 to build" . endif _NEED_GCC13_GNAT=yes . if empty(USE_ADA_FEATURES:Mada2022) _NEED_GCC10_AUX=yes _NEED_GCC6_AUX=yes . endif . if !empty(USE_LANGUAGES:Mfortran) || !empty(USE_LANGUAGES:Mfortran77) . if ${_NEED_GCC10_AUX:tl} == "yes" _NEED_GCC6_AUX=no _NEED_GCC13_GNAT=no . else PKG_FAIL_REASON+= "Package requires fortran compiler" . endif . endif . if ${_NEED_GCC6_AUX:tl} == "yes" && ${_NEED_GCC6:tl} != "yes" _NEED_GCC6_AUX=no . endif . if ${_NEED_GCC10_AUX:tl} == "yes" && ${_NEED_GCC10:tl} != "yes" _NEED_GCC10_AUX=no . endif . if ${_NEED_GCC13_GNAT:tl} == "yes" && ${_NEED_GCC13:tl} != "yes" _NEED_GCC13_GNAT=no . endif . if !empty(USE_LANGUAGES:Mobjc) _NEED_GCC6_AUX=no _NEED_GCC10_AUX=no _NEED_GCC13_GNAT=no PKG_FAIL_REASON+= "Package requires objc compiler" . endif . if !empty(USE_LANGUAGES:Mobj-c++) _NEED_GCC6_AUX=no _NEED_GCC10_AUX=no _NEED_GCC13_GNAT=no PKG_FAIL_REASON+= "Package requires obj-c++ compiler" . endif . if !empty(USE_LANGUAGES:Mgo) _NEED_GCC6_AUX=no _NEED_GCC10_AUX=no _NEED_GCC13_GNAT=no PKG_FAIL_REASON+= "Package requires go compiler" . endif . if !empty(USE_LANGUAGES:Mjava) _NEED_GCC6_AUX=no _NEED_GCC10_AUX=no _NEED_GCC13_GNAT=no PKG_FAIL_REASON+= "Package requires java compiler" . endif _NEED_GCC6=no _NEED_GCC7=no _NEED_GCC8=no _NEED_GCC9=no _NEED_GCC10=no _NEED_GCC12=no _NEED_GCC13=no . if ${_NEED_GCC13_GNAT:tl} == "yes" _NEED_GCC6_AUX=no _NEED_GCC10_AUX=no . elif ${_NEED_GCC10_AUX:tl} == "yes" _NEED_GCC6_AUX=no . endif .endif # Assume by default that GCC will only provide a C compiler. LANGUAGES.gcc?= c .if !empty(_NEED_GCC6:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC7:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC8:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC9:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC10:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC12:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC13:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ #.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) #LANGUAGES.gcc= c c++ fortran fortran77 objc ada .elif !empty(_NEED_GCC6_AUX:M[yY][eE][sS]) # gcc6-aux doesn't provide some languages LANGUAGES.gcc= c c++ ada .elif !empty(_NEED_GCC10_AUX:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 ada .elif !empty(_NEED_GCC13_GNAT:M[yY][eE][sS]) LANGUAGES.gcc=c c++ ada .endif _LANGUAGES.gcc= # empty .for _lang_ in ${USE_LANGUAGES} _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} .endfor .if ${_PKGSRC_USE_STACK_CHECK} == "yes" _STACK_CHECK_CFLAGS= -fstack-check _GCC_CFLAGS+= ${_STACK_CHECK_CFLAGS} .elif ${_PKGSRC_USE_STACK_CHECK} == "stack-clash" _STACK_CHECK_CFLAGS= -fstack-clash-protection _GCC_CFLAGS+= ${_STACK_CHECK_CFLAGS} .endif .if ${_PKGSRC_MKPIE} == "yes" _MKPIE_FCFLAGS= -fPIC . if ${PKGSRC_OVERRIDE_MKPIE:tl} == "no" _GCC_FCFLAGS+= ${_MKPIE_FCFLAGS} . endif .endif # GCC has this annoying behaviour where it advocates in a multi-line # banner the use of "#include" over "#import" when including headers. # This generates a huge number of warnings when building practically all # Objective-C code where it is convention to use "#import". Suppress # the warning if we're building Objective-C code using GCC. # .if !empty(_LANGUAGES.gcc:Mobjc) CFLAGS+= -Wno-import .endif CFLAGS+= ${_GCC_CFLAGS} FCFLAGS+= ${_GCC_FCFLAGS} .if !empty(_NEED_GCC6:M[yY][eE][sS]) # # We require gcc-6.x in the lang/gcc6-* directory. # _GCC_PKGBASE= gcc6 . if ${PKGPATH} == lang/gcc6 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc6 _GCC_DEPENDENCY= gcc6>=${_GCC_REQD}:../../lang/gcc6 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC7:M[yY][eE][sS]) # # We require gcc-7.x in the lang/gcc7-* directory. # _GCC_PKGBASE= gcc7 . if ${PKGPATH} == lang/gcc7 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc7 _GCC_DEPENDENCY= gcc7>=${_GCC_REQD}:../../lang/gcc7 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC8:M[yY][eE][sS]) # # We require gcc-8.x in the lang/gcc8-* directory. # _GCC_PKGBASE= gcc8 . if ${PKGPATH} == lang/gcc8 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc8 _GCC_DEPENDENCY= gcc8>=${_GCC_REQD}:../../lang/gcc8 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC9:M[yY][eE][sS]) # # We require gcc-9.x in the lang/gcc9-* directory. # _GCC_PKGBASE= gcc9 . if ${PKGPATH} == lang/gcc9 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc9 _GCC_DEPENDENCY= gcc9>=${_GCC_REQD}:../../lang/gcc9 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC10:M[yY][eE][sS]) # # We require gcc-10.x in the lang/gcc10-* directory. # _GCC_PKGBASE= gcc10 . if ${PKGPATH} == lang/gcc10 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc10 _GCC_DEPENDENCY= gcc10>=${_GCC_REQD}:../../lang/gcc10 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC12:M[yY][eE][sS]) # # We require gcc-12.x in the lang/gcc12-* directory. # _GCC_PKGBASE= gcc12 . if ${PKGPATH} == lang/gcc12 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc12 _GCC_DEPENDENCY= gcc12>=${_GCC_REQD}:../../lang/gcc12 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC13:M[yY][eE][sS]) # # We require gcc-13.x in the lang/gcc13-* directory. # _GCC_PKGBASE= gcc13 . if ${PKGPATH} == lang/gcc13 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc13 _GCC_DEPENDENCY= gcc13>=${_GCC_REQD}:../../lang/gcc13 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC6_AUX:M[yY][eE][sS]) # # We require Ada-capable compiler in the lang/gcc6-aux directory. # _GCC_PKGBASE= gcc6-aux . if ${PKGPATH} == lang/gcc6-aux _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc6-aux _GCC_DEPENDENCY= gcc6-aux>=${_GCC_REQD}:../../lang/gcc6-aux . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mada) _USE_GCC_SHLIB?= no . endif . endif .elif !empty(_NEED_GCC10_AUX:M[yY][eE][sS]) # # We require Ada-capable compiler in the lang/gcc10-aux directory. # _GCC_PKGBASE= gcc10-aux . if ${PKGPATH} == lang/gcc10-aux _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc10-aux _GCC_DEPENDENCY= gcc10-aux>=${_GCC_REQD}:../../lang/gcc10-aux . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mada) _USE_GCC_SHLIB?= no . endif . endif .elif !empty(_NEED_GCC13_GNAT:M[yY][eE][sS]) # # We require Ada-capable compiler in the lang/gcc13-gnat directory. # _GCC_PKGBASE= gcc13-gnat . if ${PKGPATH} == lang/gcc13-gnat _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc13-gnat _GCC_DEPENDENCY= gcc13-gnat>=${_GCC_REQD}:../../lang/gcc13-gnat _USE_GCC_SHLIB?= no . endif .endif _GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD} # When not using the GNU linker, gcc will always link shared libraries against # the shared version of libgcc, and so _USE_GCC_SHLIB needs to be enabled on # platforms with non-GNU linkers, such as SunOS. # # However, we cannot simply do this by default as it will create circular # dependencies in packages which are required to build gcc itself, and so we # enable it based on USE_LIBTOOL for the majority of packages, and support # USE_GCC_RUNTIME for packages which create shared libraries but do not use # libtool to do so. # .if (${OPSYS} == "Darwin" || ${OPSYS} == "SunOS") && \ (defined(USE_LIBTOOL) || defined(USE_GCC_RUNTIME)) _USE_GCC_SHLIB= yes .endif .if !empty(USE_NATIVE_GCC:M[yY][eE][sS]) && !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _USE_PKGSRC_GCC= no .elif !empty(USE_PKGSRC_GCC:M[yY][eE][sS]) # For environments where there is an external gcc too, but pkgsrc # should use the pkgsrc one for consistency. _USE_PKGSRC_GCC= yes .endif .if defined(_IGNORE_GCC) _USE_PKGSRC_GCC= NO .endif .if !defined(_USE_PKGSRC_GCC) _USE_PKGSRC_GCC= YES . if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _GCC_TEST_DEPENDS= gcc>=${_GCC_REQD} _USE_PKGSRC_GCC!= \ if ${PKG_ADMIN} pmatch '${_GCC_TEST_DEPENDS}' ${_GCC_PKG} 2>/dev/null; then \ ${ECHO} "NO"; \ else \ ${ECHO} "YES"; \ fi . endif .endif # Check if any of the versions of GCC in pkgsrc can satisfy the _GCC_REQD # requirement. # .if !defined(_NEED_NEWER_GCC) _PKGSRC_GCC_VERSION= ${_GCC_PKGBASE}-${_GCC_DIST_VERSION} _NEED_NEWER_GCC!= \ if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION} 2>/dev/null; then \ ${ECHO} "NO"; \ else \ ${ECHO} "YES"; \ fi #MAKEFLAGS+= _NEED_NEWER_GCC=${_NEED_NEWER_GCC} .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \ !empty(_NEED_NEWER_GCC:M[yY][eE][sS]) PKG_FAIL_REASON+= "Unable to satisfy dependency: ${_GCC_DEPENDS}" .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) # # Ensure that the correct rpath is passed to the linker if we need to # link against gcc shared libs. # # XXX cross-compilation -- is this TOOLBASE or LOCALBASE? # _GCC_SUBPREFIX!= \ if ${PKG_INFO} -qe ${_GCC_PKGBASE}; then \ ${PKG_INFO} -f ${_GCC_PKGBASE} | \ ${GREP} "File:.*bin/gcc" | \ ${GREP} -v "/gcc[0-9][0-9]*-.*" | \ ${SED} -e "s/.*File: *//;s/bin\/gcc.*//;q"; \ else \ case ${_CC} in \ ${LOCALBASE}/*) \ subprefix="${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}"; \ case "$${subprefix}" in \ "") ${ECHO} "$${subprefix}" ;; \ *) ${ECHO} "$${subprefix}/" ;; \ esac; \ ;; \ *) \ ${ECHO} "_GCC_SUBPREFIX_not_found/"; \ ;; \ esac; \ fi _GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX} _GCC_ARCHDIR!= \ if [ -x ${_GCC_PREFIX}bin/gcc ]; then \ ${DIRNAME} `${_GCC_PREFIX}bin/gcc -print-libgcc-file-name 2>/dev/null`; \ else \ ${ECHO} "_GCC_ARCHDIR_not_found"; \ fi _GCC_LIBDIRS= ${_GCC_ARCHDIR} . if empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) _GCC_LIBDIRS+= ${_GCC_PREFIX}lib${LIBABISUFFIX} . endif _GCC_LDFLAGS= # empty . for _dir_ in ${_GCC_LIBDIRS:N*not_found*} _GCC_LDFLAGS+= -L${_dir_} ${COMPILER_RPATH_FLAG}${_dir_} . endfor .endif LDFLAGS+= ${_GCC_LDFLAGS} # Point the variables that specify the compiler to the installed # GCC executables. # _GCC_DIR= ${WRKDIR}/.gcc _GCC_VARS= # empty .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) _GCCBINDIR= ${_GCC_PREFIX}bin .elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _GCCBINDIR= ${_CC:H} .endif .if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS]) _GCC_BIN_PREFIX= ${MACHINE_GNU_PLATFORM}- .endif _GCC_BIN_PREFIX?= # empty GCC_VERSION_SUFFIX?= # empty .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc${GCC_VERSION_SUFFIX}) _GCC_VARS+= CC _GCC_CC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gcc${GCC_VERSION_SUFFIX} _ALIASES.CC= cc gcc CCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc${GCC_VERSION_SUFFIX} PKG_CC:= ${_GCC_CC} .endif .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}cpp${GCC_VERSION_SUFFIX}) _GCC_VARS+= CPP _GCC_CPP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}cpp${GCC_VERSION_SUFFIX} _ALIASES.CPP= cpp CPPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}cpp${GCC_VERSION_SUFFIX} PKG_CPP:= ${_GCC_CPP} .endif .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++${GCC_VERSION_SUFFIX}) _GCC_VARS+= CXX _GCC_CXX= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g++${GCC_VERSION_SUFFIX} _ALIASES.CXX= c++ g++ CXXPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++${GCC_VERSION_SUFFIX} PKG_CXX:= ${_GCC_CXX} .endif .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77${GCC_VERSION_SUFFIX}) _GCC_VARS+= FC _GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g77${GCC_VERSION_SUFFIX} _ALIASES.FC= f77 g77 FC= g77 FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77${GCC_VERSION_SUFFIX} F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77${GCC_VERSION_SUFFIX} PKG_FC:= ${_GCC_FC} PKGSRC_FORTRAN?= g77 .endif .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran${GCC_VERSION_SUFFIX}) _GCC_VARS+= FC _GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gfortran${GCC_VERSION_SUFFIX} _ALIASES.FC= gfortran FC= gfortran FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran${GCC_VERSION_SUFFIX} F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran${GCC_VERSION_SUFFIX} PKG_FC:= ${_GCC_FC} PKGSRC_FORTRAN?= gfortran .endif #GNAT doesn't provide 'ada' but always provides 'gnatls' - inspired by gprbuild .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatls) _GCC_VARS+= ADA GMK GLK GBD CHP PRP GLS GNT _GCC_ADA= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}ada _GCC_GMK= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatmake _GCC_GLK= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatlink _GCC_GBD= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatbind _GCC_CHP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatchop _GCC_PRP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatprep _GCC_GLS= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatls _GCC_GNT= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnat _ALIASES.ADA= ada _ALIASES.GMK= gnatmake _ALIASES.GLK= gnatlink _ALIASES.GBD= gnatbind _ALIASES.CHP= gnatchop _ALIASES.PRP= gnatprep _ALIASES.GLS= gnatls _ALIASES.GNT= gnat ADAPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada GMKPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatmake GLKPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatlink GBDPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatbind CHPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatchop PRPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatprep GLSPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatls GNTPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnat #PKG_ADA:= ${_GCC_ADA} PKG_GMK:= ${_GCC_GMK} PKG_GLK:= ${_GCC_GLK} PKG_GBD:= ${_GCC_GBD} PKG_CHP:= ${_GCC_CHP} PKG_PRP:= ${_GCC_PRP} PKG_GLS:= ${_GCC_GLS} PKG_GNT:= ${_GCC_GNT} PKGSRC_ADA?= ada PKGSRC_GMK?= gnatmake PKGSRC_GLK?= gnatlink PKGSRC_GBD?= gnatbind PKGSRC_CHP?= gnatchop PKGSRC_PRP?= gnatprep PKGSRC_GLS?= gnatls PKGSRC_GNT?= gnat # This is really useful var for gnatmake GNATMAKE= ${_GCC_GMK} .endif _COMPILER_STRIP_VARS+= ${_GCC_VARS} # Pass the required flags to imake to tell it we're using gcc on Solaris. .if ${OPSYS} == "SunOS" IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES .endif .if ${OPSYS} == "AIX" # On AIX the GCC toolchain recognizes -maix32 and -maix64, # -m32 or -m64 are not recognized. _COMPILER_ABI_FLAG.32= -maix32 _COMPILER_ABI_FLAG.64= -maix64 # On HP-UX the GCC toolchain must be specifically targeted to an ABI, # -m32 or -m64 are not recognized. .elif ${OPSYS} == "HPUX" _COMPILER_ABI_FLAG.32= # empty _COMPILER_ABI_FLAG.64= # empty .elif !empty(MACHINE_ARCH:Mmips*) _COMPILER_ABI_FLAG.32= -mabi=n32 # ABI == "32" == "n32" _COMPILER_ABI_FLAG.n32= -mabi=n32 _COMPILER_ABI_FLAG.o32= -mabi=32 _COMPILER_ABI_FLAG.64= -mabi=64 .elif !empty(MACHINE_ARCH:Maarch64*) _COMPILER_ABI_FLAG.32= -m32 _COMPILER_ABI_FLAG.64= # empty .else _COMPILER_ABI_FLAG.32= -m32 _COMPILER_ABI_FLAG.64= -m64 .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${CCPATH}) CC_VERSION_STRING!= ${CCPATH} -v 2>&1 CC_VERSION!= \ if ${CCPATH} -dumpversion > /dev/null 2>&1; then \ ${ECHO} "gcc-`${CCPATH} -dumpversion`"; \ else \ ${ECHO} "gcc-${_GCC_REQD}"; \ fi . else CC_VERSION_STRING= ${CC_VERSION} CC_VERSION= gcc-${_GCC_REQD} . endif .else CC_VERSION_STRING= ${CC_VERSION} CC_VERSION= ${_GCC_PKG} .endif # Prepend the path to the compiler to the PATH. .if !empty(_LANGUAGES.gcc) PREPEND_PATH+= ${_GCC_DIR}/bin .endif # Add the dependency on GCC. .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink3.mk" . endfor .endif # Add dependency on GCC libraries if requested. .if (defined(_USE_GCC_SHLIB) && !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss])) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) # Special case packages which are themselves a dependency of gcc runtime. . if ${PKGPATH} != devel/libtool-base && ${PKGPATH} != devel/binutils && \ empty(PKGPATH:Mlang/gcc4?) && empty(PKGPATH:Mlang/gcc[5-9]) && \ empty(PKGPATH:Mlang/gcc10) && empty(PKGPATH:Mlang/gcc12) && \ empty(PKGPATH:Mlang/gcc13) . if !empty(_GCC_PKGBASE:Mgcc6) . include "../../lang/gcc6-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc7) . include "../../lang/gcc7-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc8) . include "../../lang/gcc8-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc9) . include "../../lang/gcc9-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc10) . include "../../lang/gcc10-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc12) . include "../../lang/gcc12-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc13) . include "../../lang/gcc13-libs/buildlink3.mk" . else PKG_FAIL_REASON+= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}" . endif . endif .endif .for _var_ in ${_GCC_VARS} . if !target(${_GCC_${_var_}}) override-tools: ${_GCC_${_var_}} ${_GCC_${_var_}}: ${RUN}${MKDIR} ${.TARGET:H} . if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss]) ${RUN}${RM} -f ${.TARGET} ${RUN}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} . else ${RUN} \ (${ECHO} '#!${TOOLS_SHELL}'; \ ${ECHO} 'exec ${_GCCBINDIR}/${.TARGET:T} "$$@@"'; \ ) > ${.TARGET} ${RUN}${CHMOD} +x ${.TARGET} . endif . for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} ${RUN} \ if [ ! -x "${_alias_}" ]; then \ ${LN} -f -s ${.TARGET:T} ${_alias_}; \ fi . endfor . endif .endfor # On systems without a Fortran compiler, pull one in if needed. PKGSRC_FORTRAN?=gfortran _GCC_NEEDS_A_FORTRAN= no .if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !(defined(FCPATH) && exists(${FCPATH})) _GCC_NEEDS_A_FORTRAN= yes .else . for _pattern_ in 0.* 1.[0-4] 1.[0-4].* . if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*) _GCC_NEEDS_A_FORTRAN= yes . endif . endfor .endif .if !empty(_GCC_NEEDS_A_FORTRAN:M[yY][eE][sS]) . include "../../mk/compiler/${PKGSRC_FORTRAN}.mk" .endif .if ${OPSYS} == "Interix" && !empty(_GCCBINDIR:M/opt/gcc.*) COMPILER_INCLUDE_DIRS= ${_GCCBINDIR:H}/include ${_OPSYS_INCLUDE_DIRS} COMPILER_LIB_DIRS= ${_GCCBINDIR:H}/lib ${_OPSYS_LIB_DIRS} .endif #.READONLY: GCC_REQD _GCC_REQD_EFFECTIVE:= ${GCC_REQD} .endif # COMPILER_GCC_MK @ 1.274 log @mk: wip -> lang @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.273 2024/03/08 12:03:23 wiz Exp $ d367 6 d386 12 a413 4 .if !empty(_GCC_VERSION:M[34].[1234].*) _CXX_STD_FLAG.c++03= -std=c++0x _CXX_STD_FLAG.gnu++03= -std=gnu++0x .endif @ 1.273 log @mk: improve gcc ada support, using gcc13-gnat From Dmytro Kazankov. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.273 2024/03/07 12:00:00 dkazankov Exp $ d888 1 a888 1 . if ${PKGPATH} == wip/gcc13-gnat d893 2 a894 2 _GCC_PKGSRCDIR= ../../wip/gcc13-gnat _GCC_DEPENDENCY= gcc13-gnat>=${_GCC_REQD}:../../wip/gcc13-gnat @ 1.272 log @mk: add support for c++23/gnu++23 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.271 2024/01/03 14:06:30 gdt Exp $ d100 1 d154 1 a154 1 .include "gcc-style-args.mk" d276 2 a277 2 # Only one compiler defined here supports Ada: lang/gcc6-aux # If the Ada language is requested, force lang/gcc6-aux to be selected d279 1 a279 1 GCC_REQD+= 20160822 d542 8 a549 7 _NEED_GCC_AUX?= no .for _pattern_ in ${_GCC_AUX_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC_AUX= yes _NEED_NEWER_GCC=NO . endif .endfor d570 71 d657 9 a665 2 .elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 objc ada d847 1 a847 1 .elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) d860 17 d879 2 a880 3 !empty(_LANGUAGES.gcc:Mada) || \ !empty(_LANGUAGES.gcc:Mobjc) _USE_GCC_SHLIB?= yes d883 14 d1061 2 a1062 1 .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada) d1088 1 a1088 1 PKG_ADA:= ${_GCC_ADA} d1104 2 @ 1.271 log @mk/compiler/gcc.mk: Expand comments about language versions/features Explain more nuances of rounding up to NetBSD-release versions vs not. Inspired by tech-pkg@@ comments by nia@@. (This is a comment-only change.) @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.270 2024/01/03 08:11:51 mef Exp $ d180 6 @ 1.270 log @(mk/compiler.mk, mk/compiler/gcc.mk) Add c17 on USE_CC_FEATURES (Re: gcc-10.x @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.269 2024/01/02 23:37:48 gdt Exp $ d159 6 a164 3 # Whenever reasonable, we choose a gcc version shipped with a NetBSD # release, because those are known to work well, and because it is # simpler to limit selection to fewer versions. Thus we tend to: d170 4 d221 1 d233 1 d238 1 d264 1 @ 1.269 log @gcc.mk: Add NetBSD 7's compiler version to the list @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.268 2024/01/02 23:35:00 gdt Exp $ d218 7 @ 1.268 log @mk/compiler/gcc.mk: Expand comment about version choices Be more explicit about aligning to versions in NetBSD releases as well tested and fewer in number than all versions. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.267 2023/11/10 11:52:27 nia Exp $ d162 1 @ 1.267 log @Also filter the inverse of -Wno-c++-compat when unsupported. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.266 2023/11/09 08:47:42 nia Exp $ d157 8 a164 3 # standards incrementally, so USE_CXX_FEATURES= c++XX is for # establishing an idealistic baseline, usually based on compiler # versions shipped with NetBSD. @ 1.266 log @mk: More build aids for Darwin/powerpc. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.265 2023/11/07 11:36:57 nia Exp $ d328 1 a328 1 .if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.[01].*) d338 1 a338 1 .if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.[012].*) d343 1 a343 1 .if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.0.*) d346 1 d349 1 a349 1 .if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.[0-8].*) @ 1.265 log @Default to python 3.10 if compiler lacks c11 support. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.264 2023/11/07 09:54:49 nia Exp $ d328 1 a328 1 .if !empty(_GCC_VERSION:M[23]\..*) || !empty(_GCC_VERSION:M4.[01]\..*) d338 11 a348 1 .if !empty(_GCC_VERSION:M[23]\..*) || !empty(_GCC_VERSION:M4.[0-8]\..*) @ 1.264 log @Centralize hack for old Darwin gcc, since it's needed by more packages than expected. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.263 2023/10/09 13:36:13 nia Exp $ d338 6 @ 1.263 log @mk: Limit USE_PKGSRC_GCC defaults for gcc12/13 to NetBSD Not correct logic (actual gcc version should be checked), but should at least unbreak things on other platforms for now. Requested by jperkin. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.262 2023/08/26 09:49:55 wiz Exp $ d328 10 @ 1.262 log @mk: add USE_PKGSRC_GCC_* for gcc12 & gcc13 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.261 2023/08/08 13:33:39 tnn Exp $ d459 2 d463 1 d473 2 d477 1 @ 1.261 log @gcc.mk: trailing whitespace @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.260 2023/08/03 06:06:18 nia Exp $ d459 2 d470 2 @ 1.260 log @mk: Restore GCC's specific handling of fPIC for Fortran. Reported by various that it was lost in the gcc-style-args.mk conversion. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.259 2023/08/02 15:58:07 nia Exp $ d534 2 a535 2 _MKPIE_FCFLAGS= -fPIC . if ${PKGSRC_OVERRIDE_MKPIE:tl} == "no" @ 1.259 log @mk: Increase the required GCC version for std::filesystem. Many packages don't know to link against stdc++fs. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.258 2023/07/29 17:55:47 nia Exp $ d533 7 @ 1.258 log @mk: Begin to refactor common support for GCC/Clang into a single file. They share lots of command line argument features and it doesn't make sense to duplicate our work. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.257 2023/07/22 12:20:37 nia Exp $ d229 6 a234 1 GCC_REQD+= 8 @ 1.257 log @mk: Add support for is_trivially_copy_constructible in USE_CXX_FEATURES. While a mouthful, this is the name the GCC commit message used for the features. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.256 2023/07/21 08:29:56 nia Exp $ d153 2 a519 53 _WRAP_EXTRA_ARGS.cc+= -fcommon CWRAPPERS_PREPEND.cc+= -fcommon .if ${_PKGSRC_MKPIE} == "yes" _MKPIE_CFLAGS.gcc= -fPIC _MKPIE_FCFLAGS.gcc= -fPIC # for libraries a sink wrapper around gcc is required and used instead _MKPIE_LDFLAGS= -pie . if ${PKGSRC_OVERRIDE_MKPIE:tl} == "no" _GCC_CFLAGS+= ${_MKPIE_CFLAGS.gcc} _GCC_FCFLAGS+= ${_MKPIE_FCFLAGS.gcc} CWRAPPERS_APPEND.cc+= ${_MKPIE_CFLAGS.gcc} CWRAPPERS_APPEND.cxx+= ${_MKPIE_CFLAGS.gcc} CWRAPPERS_APPEND.f77+= ${_MKPIE_FCFLAGS.gcc} . endif .endif .if ${_PKGSRC_MKREPRO} == "yes" .export WRKDIR # XXX the dollar sign should not be expanded by the shell _GCC_CFLAGS+= -fdebug-prefix-map=$$$$WRKDIR/= .endif .if ${_PKGSRC_MKREPRO} == "yes" _GCC_CFLAGS+= ${_MKREPRO_CFLAGS.gcc} CWRAPPERS_APPEND.cc+= ${_MKREPRO_CFLAGS.gcc} .endif # The user can choose the level of FORTIFY. .if ${PKGSRC_USE_FORTIFY} == "weak" _FORTIFY_CFLAGS= -D_FORTIFY_SOURCE=1 .else _FORTIFY_CFLAGS= -D_FORTIFY_SOURCE=2 .endif .if ${_PKGSRC_USE_FORTIFY} == "yes" _GCC_CFLAGS+= ${_FORTIFY_CFLAGS} CWRAPPERS_APPEND.cc+= ${_FORTIFY_CFLAGS} .endif # The user or package can choose the level of RELRO. .if ${PKGSRC_USE_RELRO} != "partial" && \ ${RELRO_SUPPORTED:Uyes:tl} != "partial" _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow .else _RELRO_LDFLAGS= -Wl,-zrelro .endif .if !empty(_RELRO_LDFLAGS) && !empty(MACHINE_PLATFORM:MNetBSD-*-*mips*) _RELRO_LDFLAGS+= -Wl,-z,common-page-size=0x10000 .endif a527 2 _CTF_CFLAGS= -gdwarf-2 a768 6 # GNU ld option used to set the rpath _LINKER_RPATH_FLAG= -R # GCC passes rpath directives to the linker using "-Wl,-R". _COMPILER_RPATH_FLAG= -Wl,${_LINKER_RPATH_FLAG} a812 6 .if ${_PKGSRC_USE_RELRO} == "yes" _GCC_LDFLAGS+= ${_RELRO_LDFLAGS} CWRAPPERS_PREPEND.cc+= ${_RELRO_LDFLAGS} CWRAPPERS_PREPEND.cxx+= ${_RELRO_LDFLAGS} .endif a963 11 # The user can choose the level of stack smashing protection. .if empty(CC_VERSION:Mgcc-[1-3].*) . if ${PKGSRC_USE_SSP} == "all" _SSP_CFLAGS= -fstack-protector-all . elif ${PKGSRC_USE_SSP} == "strong" _SSP_CFLAGS= -fstack-protector-strong . else _SSP_CFLAGS= -fstack-protector . endif .endif @ 1.256 log @mk: Add put_time to USE_CXX_FEATURES. C++11 feature, but appeared in GCC 5. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.255 2023/07/20 21:12:16 nia Exp $ d222 4 @ 1.255 log @mk: Most packages don't know to use the "experimental" header, so just require gcc8 for std::filesystem. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.254 2023/07/18 12:49:46 nia Exp $ d218 4 @ 1.254 log @mk: Add support for USE_CC_FEATURES and USE_CXX_FEATURES to the pkgsrc infrastructure, as discussed on tech-pkg@@. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.253 2023/06/27 10:27:21 riastradh Exp $ a218 4 # std::filesystem was "experimental" in gcc7 and NetBSD 9 shipped # GCC without the experimental C++ library headers (a break from # upstream). . if ${OPSYS} == "NetBSD" a219 3 . else GCC_REQD+= 7 . endif @ 1.253 log @Split native and cross LOCALBASE for cross-compilation. This way, you can use an unprivileged prefix of ~/cross/pkg to cross-compile packages that, when installed, will go in /usr/pkg. In mk.conf: - Set CROSS_LOCALBASE to determine the installation prefix of packages that you cross-compile. - Set LOCALBASE to determine the installation prefix of native packages needed for cross compilation. Both default to /usr/pkg. Note: CROSS_LOCALBASE defaults to /usr/pkg even if you set LOCALBASE. Of course, if you're not cross-compiling, this has no effect. When cross-compiling a package: - LOCALBASE is where cross-compiled packages will be installed. (`make install' will put it in ${CROSS_DESTDIR}${LOCALBASE}, of course, but when you later use pkg_add to install the binary package on the system you're compiling it for, it will go in ${LOCALBASE}. And you can still set PREFIX for an individual package, but LOCALBASE refers to where cross-compiled packages are generally installed, other than the specific ones that override PREFIX.) - TOOLBASE is where tool dependencies are installed and available to be executed at build-time. For example, if you have TOOL_DEPENDS on a program that is installed in (say) foo/bin/xyz which is not in PATH so you have to refer ot its full pathname, you can execute ${TOOLBASE}/foo/bin/xyz instead of ${LOCALBASE}/foo/bin/xyz. I chose this split, rather than the other way around, because I expect that references that are baked into installed packages to be more common than references that are executed at build-time, but I didn't do an extensive study of the matter. I chose the name TOOLBASE because it's where TOOL_DEPENDS go. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.252 2023/06/26 11:38:13 wiz Exp $ d153 84 d391 3 d403 3 d416 3 d429 3 d442 3 d451 3 d460 3 @ 1.252 log @mk: let GCC_REQD 11 work and pull in gcc12, since we don't have gcc11 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.251 2023/06/12 21:50:41 wiz Exp $ d120 1 a120 1 MACHINE_ARCH PATH DRAGONFLY_CCVER OPSYS LOCALBASE \ d251 1 a251 1 .if !empty(_CC:M${LOCALBASE}/*) d727 2 @ 1.251 log @mk: add support for gcc13 Friendly reminder by gutteridge@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.250 2023/06/08 22:59:53 riastradh Exp $ d181 2 a182 1 _GCC12_PATTERNS= 12 12.* @ 1.250 log @mk/compiler/gcc.mk: Missed a spot for TOOLS_USE_CROSS_COMPILE. Fixes build of tool dependencies like m4 of cross-libtool-base from a clean tree with no packages; I must have already had m4 built when I used this before. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.249 2023/01/06 23:11:31 wiz Exp $ d98 1 a98 1 _NEED_GCC10 _NEED_GCC12 \ d131 1 a131 1 _GCC10_PATTERNS _GCC12_PATTERNS _GCC_AUX_PATTERNS d161 1 a161 1 _GCC_DIST_NAME:= gcc12 d183 3 d354 6 d370 1 a370 1 !empty(_NEED_GCC_AUX:M[nN][oO]) d384 1 d401 2 d613 21 d948 2 a949 1 empty(PKGPATH:Mlang/gcc10) && empty(PKGPATH:Mlang/gcc12) d962 2 @ 1.249 log @mk: remove relro hack for NetBSD-current, fixed in the base system @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.248 2022/12/31 08:35:37 wiz Exp $ d65 1 a65 1 USE_CROSS_COMPILE \ d204 1 a204 1 . if empty(USE_CROSS_COMPILE:M[yY][eE][sS]) @ 1.248 log @mk: work around binutils 2.39 problem with relro on NetBSD @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.247 2022/11/23 15:44:11 jperkin Exp $ a446 6 # XXX Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014301 # Set manually the maxpagesize to 4096 which is ok for now since NetBSD only # supports relro by default on x86 and aarch64 .if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} > 109901 _RELRO_LDFLAGS+= -Wl,-z,max-page-size=4096 .endif @ 1.247 log @mk: Only add obsolete GCC_REQD if required. Each GCC_REQD entry has an associated cost as it invokes pkg_admin to see if it's suitable, so only add 2.8.0 and 3.0 when absolutely necessary. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.246 2022/08/01 07:58:21 wiz Exp $ d447 6 @ 1.246 log @mk: add stack-clash option to PKGSRC_USE_STACK_CHECK @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.245 2022/07/07 16:23:39 jperkin Exp $ d140 9 d150 1 a150 4 # gcc2 doesn't support c99 and amd64 .if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64" GCC_REQD+= 3.0 @ 1.245 log @mk: Move GCC <= 4.4 override out of for loop. Possible performance improvement, no funtional change. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.244 2022/07/05 17:32:24 jperkin Exp $ d446 1 d448 3 a450 2 .if ${_PKGSRC_USE_STACK_CHECK} == "yes" @ 1.244 log @mk: Add support for newer C standards. For now the GCC "c99 == gnu99" override is kept, but gnu99 is now supported as a specific value for USE_LANGUAGES, so we may want to be specific where required. c11 and c17 (and the corresponding gnu11/gnu17 versions) are newly supported. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.243 2022/06/16 15:46:22 adam Exp $ d235 2 a236 1 . if !empty(_GCC_VERSION:M[34].[1234].*) d239 1 a239 2 . endif .endfor @ 1.243 log @gcc.mk: support gcc12 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.242 2022/05/28 02:31:47 gutteridge Exp $ d104 2 d226 7 a395 5 .if !empty(USE_LANGUAGES:Mc99) _WRAP_EXTRA_ARGS.CC+= -std=gnu99 CWRAPPERS_APPEND.cc+= -std=gnu99 .endif @ 1.242 log @gcc.mk: restore GCC 6 handling This is partly intended as a workaround to fix behaviour on NetBSD 8.x where GCC 7 was being pulled in universally after the prior commits here. Now it behaves as expected. There is an unaddressed issue in this code that needs to be examined further. (This has been discussed in more than one recent thread on teck-pkg@@, including John Klos's report of this issue.) In any case, GCC 6 has also seen build improvements by nia@@, who noted it's safe to simply revert part of the original change set, in one of those discussions on tech-pkg. (We can't use the hack introduced in the prior revisions for GCC 6, though, or this same broken dependency pattern occurs and will universally force GCC 6 instead of 7 on NetBSD 8.x.) Tested on NetBSD 8.2_STABLE and 9.2_STABLE with various packages, including tcsh, the original reported issue. @ text @d1 1 a1 1 # $NetBSD$ d98 1 a98 1 _NEED_GCC10 \ d129 1 a129 1 _GCC10_PATTERNS _GCC_AUX_PATTERNS d153 1 a153 1 _GCC_DIST_NAME:= gcc10 d172 3 d330 6 d345 1 a345 1 !empty(_NEED_GCC10:M[nN][oO]) && \ d359 1 d374 2 d568 21 d903 1 a903 1 empty(PKGPATH:Mlang/gcc10) d914 2 @ 1.241 log @gcc.mk: fix syntax @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.240 2022/05/21 09:04:50 nia Exp $ d97 1 a97 1 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \ d128 1 a128 1 _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \ d157 3 d161 1 a161 1 _GCC7_PATTERNS= 5 6 [0-6].* 7 7.* d275 12 d334 1 a334 1 .if !empty(_NEED_GCC7:M[nN][oO]) && \ d345 1 d354 3 a356 1 .if !empty(_NEED_GCC7:M[yY][eE][sS]) d451 22 a472 1 .if !empty(_NEED_GCC7:M[yY][eE][sS]) d871 3 a873 1 . if !empty(_GCC_PKGBASE:Mgcc7) @ 1.240 log @gcc.mk: Force USE_GCC_RUNTIME (etc.) on older NetBSD versions that request a newer compiler. Stop selecting gcc6, it receives very limited testing due to NetBSD 9 having gcc7, and probably doesn't work due to some newer hardening checks stopping it from building. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.239 2022/04/07 12:12:02 adam Exp $ d275 1 a275 1 . if ${OPSYS} == "NetBSD"" && ${OPSYS_VERSION} < 089937 d285 1 a285 1 . if ${OPSYS} == "NetBSD"" && ${OPSYS_VERSION} < 099917 d295 1 a295 1 . if ${OPSYS} == "NetBSD"" && ${OPSYS_VERSION} < 099976 d305 1 a305 1 . if ${OPSYS} == "NetBSD"" && ${OPSYS_VERSION} < 099982 @ 1.239 log @Make pkglint happy @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.238 2022/04/07 07:08:34 nia Exp $ d97 1 a97 1 _NEED_GCC6 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \ d128 1 a128 1 _GCC6_PATTERNS _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \ a156 3 # _GCC6_PATTERNS matches N s.t. N < 7. _GCC6_PATTERNS= 5 6 [0-6].* d158 1 a158 1 _GCC7_PATTERNS= 7 7.* a271 6 _NEED_GCC6?= no .for _pattern_ in ${_GCC6_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC6= yes . endif .endfor d275 4 d285 4 d295 4 d305 4 d319 1 a319 1 .if !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC7:M[nN][oO]) && \ a329 1 _NEED_GCC6= no d338 1 a338 3 .if !empty(_NEED_GCC6:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC7:M[yY][eE][sS]) d433 1 a433 22 .if !empty(_NEED_GCC6:M[yY][eE][sS]) # # We require gcc-6.x in the lang/gcc6-* directory. # _GCC_PKGBASE= gcc6 . if ${PKGPATH} == lang/gcc6 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc6 _GCC_DEPENDENCY= gcc6>=${_GCC_REQD}:../../lang/gcc6 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC7:M[yY][eE][sS]) d832 1 a832 3 . if !empty(_GCC_PKGBASE:Mgcc6) . include "../../lang/gcc6-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc7) @ 1.238 log @gcc.mk: gcc8 and gcc9 from pkgsrc do not build on 32-bit netbsd arm workaround PR pkg/56679 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.237 2022/04/04 11:23:06 riastradh Exp $ d321 1 a321 1 ${OPSYS_VERSION} < 099900 && \ @ 1.237 log @mk: Cross-eyed hacks to support cross-libtool. For a long time, when cross-building, say from native=amd64 to target=powerpc, it was necessary to: 1. cross-build a _powerpc_ package called cross-libtool-base-powerpc, and then 2. install the powerpc package _natively_ with `pkg_add -m x86_64' to override the architecture check that normally forbids this kind of shenanigans, in order to cross-build anything that uses libtool as a tool. This is partly because libtool doesn't follow the normal GNU convention of `./configure --build= --host= --target=' -- in this example, build=amd64, host=amd64, target=powerpc. Instead, libtool expects to be cross-built itself, even if it's going to run as a tool. It's not as bonkers as it sounds at first: libtool is just a shell script, and it caches various information about the (cross-building!) toolchain it is built with so it can use that information later when it is run as a tool itself to cross-compile other software. To make this work, we need to create the toolchain wrappers for libtool _as if_ we were cross-building even if we are building a native package. So mk/tools uses a new flag TOOLS_USE_CROSS_COMPILE instead of USE_CROSS_COMPILE, and libtool internally sets MACHINE_ARCH=${TARGET_ARCH} (in the example above, powerpc) to make it look like we're cross-building. The new TOOLS_CROSS_DESTDIR is an alias for the (defaulted) CROSS_DESTDIR, which must now be set unconditionally in mk.conf in order for libtool to know where the cross-destdir will be; _CROSS_DESTDIR remains empty when building any native packages (including the native cross-libtool package). Finally, we need to make the resulting package be a native package, with MACHINE_ARCH set to the one that it will be installed on (in the example above, amd64), so I added an indirection _BUILD_DEFS.${var} to replace var on its own in the build definitions that get baked into the package, shown by `pkg_info -B'. Setting _BUILD_DEFS.MACHINE_ARCH=${NATIVE_MACHINE_ARCH} ensures that this mutant hybrid cross-built libtool still produces a native package. All of this logic is gated on setting USE_CROSS_COMPILE in mk.conf or LIBTOOL_CROSS_COMPILE in the package makefile, so it should be safe for non-cross-builds -- when USE_CROSS_COMPILE=no and you're not building cross-libtool, everything is as before. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.236 2022/03/13 06:26:57 nia Exp $ d319 11 @ 1.236 log @mk: MKPIE is not GCC-specific. Should help ObjC packages. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.235 2022/01/18 01:41:09 pho Exp $ d671 1 a671 1 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) @ 1.235 log @Add a package-settable variable PKGSRC_OVERRIDE_MKPIE This is needed by packages that require hand-holding in building PIE. Also a post-build check for MKPIE is performed by default when PKG_DEVELOPER=YES. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.234 2021/12/22 10:14:27 nia Exp $ d106 1 a106 1 _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS.gcc \ a348 2 # XXX for executables it should be: #_MKPIE_CFLAGS.gcc= -fPIE d350 2 a351 2 # XXX for libraries a sink wrapper around gcc is required and used instead _MKPIE_LDFLAGS.gcc= -pie a355 1 #_GCC_LDFLAGS+= ${_MKPIE_LDFLAGS.gcc} a358 2 # this differs for libraries and executables (handled in mk/cwrappers.mk) # CWRAPPERS_APPEND.ld+= ${_MKPIE_LDFLAGS.gcc} @ 1.234 log @mk: Set the default page size when compiling with RELRO with GCC on NetBSD/mips. PR pkg/56559 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.233 2021/12/19 11:55:29 nia Exp $ d355 1 d364 1 @ 1.233 log @mk/compiler: Return the cwrappers stuff for RELRO now that it doesn't cause any noticable breakage. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.232 2021/11/07 11:25:33 nia Exp $ d396 4 @ 1.232 log @mk: revert RELRO default and cease use of wrappers until some more substantial changes to infrastructure and testing can be performed to ensure it's applied universally without breaking anything @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.231 2021/11/06 10:03:32 nia Exp $ d653 2 @ 1.231 log @mk: Correct the wrappers invocation for RELRO. This should help many remaining packages that fail to build with RELRO that were uncaught by my original bulk builds due to CHECK_RELRO failing to work (sorry...) @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.230 2021/11/02 08:14:58 nia Exp $ a652 2 CWRAPPERS_APPEND.cc+= ${_RELRO_LDFLAGS} CWRAPPERS_APPEND.cxx+= ${_RELRO_LDFLAGS} @ 1.230 log @mk: Make it possible for a package to fall back to partial RELRO. This helps certain X.Org modules. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.229 2021/10/08 16:35:57 nia Exp $ d653 2 a654 1 CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS} @ 1.229 log @gcc.mk: Avoid matching gcc2, gcc3. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.228 2021/10/04 14:21:21 nia Exp $ d388 5 a392 2 # The user can choose the level of RELRO. .if ${PKGSRC_USE_RELRO} == "partial" a393 2 .else _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow @ 1.228 log @mk: omit space between -z and relro prevents mangling by wrappers in mysterious circumstances @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.227 2021/10/01 11:56:12 nia Exp $ d93 1 a93 1 _IGNORE_GCC _IGNORE_GCC3CXX _IGNORE_GCC3F77 _IGNORE_GCC3OBJC \ a96 1 _NEED_GCC2 _NEED_GCC3 \ a127 1 _GCC2_PATTERNS _GCC3_PATTERNS \ d157 2 a158 10 # _GCC2_PATTERNS matches N s.t. N <= 2.95.3. _GCC2_PATTERNS= [0-1].* 2.[0-9] 2.[0-9].* 2.[1-8][0-9] 2.[1-8][0-9].* \ 2.9[0-4] 2.9[0-4].* 2.95 2.95.[0-3] # _GCC3_PATTERNS matches N s.t. 2.95.3 < N < 4. _GCC3_PATTERNS= 2.95.[4-9]* 2.95.[1-9][0-9]* 2.9[6-9] 2.9[6-9].* \ 2.[1-9][0-9][0-9]* 3.[0-9] 3.[0-9].* # _GCC6_PATTERNS matches N s.t. 4.5 <= N < 7. _GCC6_PATTERNS= 4.[0-9] 4.[0-9]* 5 5.* 6 6.* d274 1 a274 13 # Determine whether we require GCC-2.x or GCC-3.x by examining _GCC_REQD. _NEED_GCC2?= no .for _pattern_ in ${_GCC2_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC2= yes . endif .endfor _NEED_GCC3?= no .for _pattern_ in ${_GCC3_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC3= yes . endif .endfor d312 1 a312 2 .if !empty(_NEED_GCC2:M[nN][oO]) && !empty(_NEED_GCC3:M[nN][oO]) && \ !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC7:M[nN][oO]) && \ d321 1 a321 5 .if !empty(_NEED_GCC2:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran77 objc .elif !empty(_NEED_GCC3:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran77 java objc .elif !empty(_NEED_GCC6:M[yY][eE][sS]) d416 1 a416 32 .if !empty(_NEED_GCC2:M[yY][eE][sS]) # # We require gcc-2.x in the lang/gcc2 directory. # _GCC_PKGBASE= gcc2 . if ${PKGPATH} == lang/gcc2 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc2 _GCC_DEPENDENCY= gcc2>=${_GCC_REQD}:../../lang/gcc2 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mobjc) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC3:M[yY][eE][sS]) # # We require gcc-3.x in the lang/gcc3-* directories. # _GCC_PKGBASE= gcc3-c . if ${PKGPATH} == lang/gcc3-c _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc) _GCC_PKGSRCDIR= ../../lang/gcc3-c _GCC_DEPENDENCY= gcc3-c>=${_GCC_REQD}:../../lang/gcc3-c . endif .elif !empty(_NEED_GCC6:M[yY][eE][sS]) a543 30 .if !empty(_NEED_GCC3:M[yY][eE][sS]) . if ${PKGPATH} == "lang/gcc3-c++" _IGNORE_GCC3CXX= yes MAKEFLAGS+= _IGNORE_GCC3CXX=yes . endif . if !defined(_IGNORE_GCC3CXX) && !empty(_LANGUAGES.gcc:Mc++) _GCC_PKGSRCDIR+= ../../lang/gcc3-c++ _GCC_DEPENDENCY+= gcc3-c++>=${_GCC_REQD}:../../lang/gcc3-c++ _USE_GCC_SHLIB?= yes . endif . if ${PKGPATH} == lang/gcc3-f77 _IGNORE_GCC3F77= yes MAKEFLAGS+= _IGNORE_GCC3F77=yes . endif . if !defined(_IGNORE_GCC3F77) && !empty(_LANGUAGES.gcc:Mfortran77) _GCC_PKGSRCDIR+= ../../lang/gcc3-f77 _GCC_DEPENDENCY+= gcc3-f77>=${_GCC_REQD}:../../lang/gcc3-f77 _USE_GCC_SHLIB?= yes . endif . if ${PKGPATH} == lang/gcc3-objc _IGNORE_GCC3OBJC= yes MAKEFLAGS+= _IGNORE_GCC3OBJC=yes . endif . if !defined(_IGNORE_GCC3OBJC) && !empty(_LANGUAGES.gcc:Mobjc) _GCC_PKGSRCDIR+= ../../lang/gcc3-objc _GCC_DEPENDENCY+= gcc3-objc>=${_GCC_REQD}:../../lang/gcc3-objc _USE_GCC_SHLIB?= yes . endif .endif @ 1.227 log @Prune gcc34, gcc44. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.226 2021/08/03 07:19:20 nia Exp $ d417 1 a417 1 _RELRO_LDFLAGS= -Wl,-z,relro d419 1 a419 1 _RELRO_LDFLAGS= -Wl,-z,relro -Wl,-z,now @ 1.226 log @gcc.mk: Add support for MKPIE when compiling Fortran code. PR pkg/56337 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.225 2021/08/01 12:35:06 nia Exp $ d97 1 a97 1 _NEED_GCC2 _NEED_GCC3 _NEED_GCC34 \ d129 1 a129 1 _GCC2_PATTERNS _GCC3_PATTERNS _GCC34_PATTERNS \ d163 1 a163 1 # _GCC3_PATTERNS matches N s.t. 2.95.3 < N < 3.4. d165 1 a165 4 2.[1-9][0-9][0-9]* 3.[0-3] 3.[0-3].* # _GCC34_PATTERNS matches N s.t. 3.4 <= N < 4. _GCC34_PATTERNS= 3.[4-9] 3.[4-9].* 3.[1-9][0-9]* a296 6 _NEED_GCC34?= no .for _pattern_ in ${_GCC34_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC34= yes . endif .endfor a334 1 !empty(_NEED_GCC34:M[nN][oO]) && \ a347 2 .elif !empty(_NEED_GCC34:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran77 objc a473 18 .elif !empty(_NEED_GCC34:M[yY][eE][sS]) # # We require gcc-3.4.x in the lang/gcc34 directory. # _GCC_PKGBASE= gcc34 . if ${PKGPATH} == lang/gcc34 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc34 _GCC_DEPENDENCY= gcc34>=${_GCC_REQD}:../../lang/gcc34 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mobjc) _USE_GCC_SHLIB?= yes . endif . endif @ 1.225 log @gcc.mk: Remove bogus test for NetBSD. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.224 2021/04/06 12:07:57 nia Exp $ d390 1 d395 1 d399 1 d453 1 @ 1.224 log @mk: Remove lingering gcc5 reference @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.223 2021/04/02 17:04:17 nia Exp $ d386 1 a386 1 .if ${OPSYS} == "NetBSD" a391 1 .endif a392 1 .if ${_PKGSRC_MKPIE} == "yes" @ 1.223 log @mk: Remove gcc44 bits @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.222 2021/04/02 16:54:48 nia Exp $ d951 1 a951 3 . if !empty(_GCC_PKGBASE:Mgcc5) . include "../../lang/gcc5-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc6) @ 1.222 log @mk: use gcc6-aux for ada @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.221 2021/04/02 11:48:16 nia Exp $ d97 1 a97 1 _NEED_GCC2 _NEED_GCC3 _NEED_GCC34 _NEED_GCC44 \ d129 1 a129 1 _GCC2_PATTERNS _GCC3_PATTERNS _GCC34_PATTERNS _GCC44_PATTERNS \ a169 3 # _GCC44_PATTERNS matches N s.t. 4.0 <= N < 4.5. _GCC44_PATTERNS= 4.[0-4] 4.[0-4].* d171 1 a171 1 _GCC6_PATTERNS= 4.[5-9] 4.[5-9]* 5 5.* 6 6.* a305 6 _NEED_GCC44?= no .for _pattern_ in ${_GCC44_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC44= yes . endif .endfor d344 1 a344 1 !empty(_NEED_GCC34:M[nN][oO]) && !empty(_NEED_GCC44:M[nN][oO]) && \ a359 2 .elif !empty(_NEED_GCC44:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 java objc a501 19 .elif !empty(_NEED_GCC44:M[yY][eE][sS]) # # We require gcc-4.4.x in the lang/gcc44 directory. # _GCC_PKGBASE= gcc44 . if ${PKGPATH} == lang/gcc44 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc44 _GCC_DEPENDENCY= gcc44>=${_GCC_REQD}:../../lang/gcc44 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mobjc) _USE_GCC_SHLIB?= yes . endif . endif @ 1.221 log @mk: Remove references to gcc48/gcc49, as done elsewhere here @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.220 2021/02/04 21:45:13 gdt Exp $ d147 2 a148 2 # Only one compiler defined here supports Ada: lang/gcc5-aux # If the Ada language is requested, force lang/gcc5-aux to be selected d150 1 a150 1 GCC_REQD+= 20120614 d639 1 a639 1 # We require Ada-capable compiler in the lang/gcc5-aux directory. d641 2 a642 2 _GCC_PKGBASE= gcc5-aux . if ${PKGPATH} == lang/gcc5-aux d647 2 a648 2 _GCC_PKGSRCDIR= ../../lang/gcc5-aux _GCC_DEPENDENCY= gcc5-aux>=${_GCC_REQD}:../../lang/gcc5-aux @ 1.220 log @mk/compiler/gcc.mk: Remove stray mid-line \ (Apparently left over from reducing the vast number of gcc versions.) @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.219 2021/01/17 16:05:48 maya Exp $ d981 1 a981 5 . if !empty(_GCC_PKGBASE:Mgcc48) . include "../../lang/gcc48-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc49) . include "../../lang/gcc49-libs/buildlink3.mk" . elif !empty(_GCC_PKGBASE:Mgcc5) @ 1.219 log @g/c gcc48, gcc49, gcc5 logic @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.218 2021/01/17 15:32:00 maya Exp $ d98 1 a98 1 _NEED_GCC6 \ _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \ @ 1.218 log @If the base GCC isn't enough, and GCC_REQD=4.5 to 6, use gcc6. gcc4.8,4.9,5 have bugs preventing them from being useful within pkgsrc for the primary use case that finds them handy: glibc + FORTIFY + those GCC versions = build failures. Additionally, requiring fewer versions of GCC is an improvement for the vast majority of use-cases considered. We might want to bump this further than gcc6 later on, but this is a big improvement for CentOS builds. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.217 2020/12/05 09:24:00 wiz Exp $ d130 2 a131 3 _GCC48_PATTERNS _GCC49_PATTERNS _GCC5_PATTERNS _GCC6_PATTERNS \ _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS _GCC10_PATTERNS \ _GCC_AUX_PATTERNS d354 3 a356 4 !empty(_NEED_GCC48:M[nN][oO]) && !empty(_NEED_GCC49:M[nN][oO]) && \ !empty(_NEED_GCC5:M[nN][oO]) && !empty(_NEED_GCC6:M[nN][oO]) && \ !empty(_NEED_GCC7:M[nN][oO]) && !empty(_NEED_GCC8:M[nN][oO]) && \ !empty(_NEED_GCC9:M[nN][oO]) && !empty(_NEED_GCC10:M[nN][oO]) && \ a370 6 .elif !empty(_NEED_GCC48:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC49:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC5:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ a531 63 .elif !empty(_NEED_GCC48:M[yY][eE][sS]) # # We require gcc-4.8.x in the lang/gcc48 directory. # _GCC_PKGBASE= gcc48 . if ${PKGPATH} == lang/gcc48 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc48 _GCC_DEPENDENCY= gcc48>=${_GCC_REQD}:../../lang/gcc48 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC49:M[yY][eE][sS]) # # We require gcc-4.9.x in the lang/gcc49-* directory. # _GCC_PKGBASE= gcc49 . if ${PKGPATH} == lang/gcc49 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc49 _GCC_DEPENDENCY= gcc49>=${_GCC_REQD}:../../lang/gcc49 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC5:M[yY][eE][sS]) # # We require gcc-5.x in the lang/gcc5-* directory. # _GCC_PKGBASE= gcc5 . if ${PKGPATH} == lang/gcc5 _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc5 _GCC_DEPENDENCY= gcc5>=${_GCC_REQD}:../../lang/gcc5 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif @ 1.217 log @mk: fix a duplicate GCC9 variable to refer to GCC10 instead Noted by Jackson Bryn in PR 55842. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.216 2020/10/28 13:19:25 wiz Exp $ d98 2 a99 2 _NEED_GCC48 _NEED_GCC49 _NEED_GCC5 _NEED_GCC6 \ _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 _NEED_GCC10 \ d174 2 a175 11 # _GCC48_PATTERNS matches N s.t. 4.5 <= N < 4.9. _GCC48_PATTERNS= 4.[5-8] 4.[5-8].* # _GCC49_PATTERNS matches N s.t. 4.9 <= N < 4.10. _GCC49_PATTERNS= 4.9 4.9.* # _GCC5_PATTERNS matches N s.t. 5.0 <= N < 6. _GCC5_PATTERNS= 5 5.* # _GCC6_PATTERNS matches N s.t. 6.0 <= N < 7. _GCC6_PATTERNS= 6 6.* a315 18 _NEED_GCC48?= no .for _pattern_ in ${_GCC48_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC48= yes . endif .endfor _NEED_GCC49?= no .for _pattern_ in ${_GCC49_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC49= yes . endif .endfor _NEED_GCC5?= no .for _pattern_ in ${_GCC5_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC5= yes . endif .endfor @ 1.216 log @mk: expand _USE_GCC_SHLIB section to gcc9/gcc10 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.215 2020/10/06 17:36:50 rillig Exp $ d99 1 a99 1 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 _NEED_GCC9 \ @ 1.215 log @mk: fix undefined variables for current make running in -dL mode In lint mode, NetBSD's make is stricter about undefined variables. In conditions, the function arguments must be fully defined. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.214 2020/09/02 16:16:43 ryoon Exp $ d1077 2 a1078 1 empty(PKGPATH:Mlang/gcc4?) && empty(PKGPATH:Mlang/gcc[5-9]) d1091 4 @ 1.214 log @mk/compiler: Support GCC_REQD=9 or 10 A pert of PR pkg/55637. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.213 2020/06/02 06:58:13 rillig Exp $ d915 2 d1124 1 a1124 1 .if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !exists(${FCPATH}) @ 1.213 log @mk/compiler.mk: check for too late GCC_REQD and USE_LANGUAGES For USE_LANGUAGES there is already a pkglint warning, but for GCC_REQD it is missing. It's better to have this check directly in the infrastructure since it is more reliable. This check is disabled by default, to not cause any new breakage. It should be enabled in bulk builds. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.212 2020/05/31 00:00:13 sjmulder Exp $ d99 2 a100 1 _NEED_GCC7 _NEED_GCC8 _NEED_GCC_AUX _NEED_NEWER_GCC \ d131 2 a132 1 _GCC7_PATTERNS _GCC8_PATTERNS _GCC_AUX_PATTERNS d156 1 a156 1 _GCC_DIST_NAME:= gcc8 d192 6 d361 12 d385 1 d412 4 d693 42 @ 1.212 log @mk/compiler: Set -fcommon for GCC 10 As with clang. Default got flipped with v10. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.211 2020/05/30 22:45:36 sjmulder Exp $ d1073 3 @ 1.211 log @mk/compiler: Fix version check for GCC 10 Caused SSP flags to be omitted in GCC 10. Check flipped because all new GCC versions can be expected to support it. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.210 2020/03/30 09:39:24 nia Exp $ d399 3 @ 1.210 log @mk/compiler: Make gfortran the default fortran compiler. Discussed on tech-pkg@@ before freeze. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.209 2020/03/14 10:00:37 nia Exp $ d979 1 a979 1 .if !empty(CC_VERSION:Mgcc-[4-9]*) @ 1.209 log @mk: default to gfortran on aarch64, there's no g95 for aarch64 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.208 2019/09/19 06:46:59 rillig Exp $ a1048 4 # The default is g95 as it supports a modern dialect, but it can # be overridden in mk.conf to use only f2c. # .if !empty(MACHINE_ARCH:Maarch64*) a1049 3 .else PKGSRC_FORTRAN?=g95 .endif @ 1.208 log @mk/compiler/gcc.mk: reorder variables in _VARGROUPS section By listing the public variables first, the focus is put on the most important variables. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.207 2019/09/18 06:46:13 rillig Exp $ d1052 3 d1056 1 @ 1.207 log @mk/compiler/gcc.mk: add missing variables to _VARGROUPS section @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.206 2019/09/18 06:35:12 rillig Exp $ d65 2 a66 1 USE_CROSS_COMPILE PKGSRC_USE_FORTIFY PKGSRC_USE_RELRO PKGSRC_USE_SSP \ d77 4 a80 1 LDFLAGS \ d102 1 a102 1 _WRAP_EXTRA_ARGS.CC CWRAPPERS_APPEND.cc CWRAPPERS_APPEND.cxx \ d108 1 a108 1 _CTF_CFLAGS CFLAGS \ a115 3 PREPEND_PATH \ COMPILER_INCLUDE_DIRS COMPILER_LIB_DIRS \ CWRAPPERS_APPEND.ld \ a118 1 _PKGSRC_MKPIE _PKGSRC_MKREPRO _MKREPRO_CFLAGS.gcc \ d122 3 d126 1 a126 3 MACHINE_GNU_PLATFORM \ _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS \ WRKDIR MACHINE_PLATFORM PKGPATH @ 1.206 log @mk/compiler/gcc.mk: search for GCCBASE/bin/gcc as well A default installation of GCC doesn't install bin/cc but only bin/gcc. Adding bin/cc is only done by the pgksrc packages, not by the upstream package. The previous strategy of just checking whether ${GCCBASE}/bin/${CC:[1]} exists did not work in such a situation. Therefore, if CC still has its default value from sys.mk, that is changed to the intended gcc, which then detects the base GCC properly. See https://mail-index.netbsd.org/pkgsrc-users/2019/09/07/msg029329.html. See https://mail-index.netbsd.org/tech-pkg/2019/09/18/msg021976.html. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.205 2019/09/18 06:15:13 rillig Exp $ d77 2 a78 2 PKG_ADA PKG_GMK PKG_GLK PKG_GBD PKG_CHP PKG_GNT PKG_PRP \ PKGSRC_ADA PKGSRC_GMK PKGSRC_GLK PKGSRC_GBD PKGSRC_CHP PKGSRC_GNT PKG_SRCPRP \ d107 2 d113 3 a115 1 COMPILER_INCLUDE_DIRS COMPILER_LIB_DIRS d131 1 a131 1 MAKEFLAGS IMAKEOPTS LDFLAGS @ 1.205 log @mk/compiler: replace complicated :M_asdf_ modifier with :[1] The :[1] modifier has been added to bmake in 2006. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.204 2019/09/08 09:24:52 rillig Exp $ d188 5 @ 1.204 log @mk/compiler/gcc.mk: refactoring for PKGPATH comparison Since PKGPATH can only ever consist of a single path, there is no point in applying the :M modifier to it. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.203 2019/09/07 22:20:32 rillig Exp $ d190 1 a190 1 _CC:= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} d196 2 a197 2 . if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}) _CC:= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} @ 1.203 log @mk/compiler/gcc.mk: improve _VARGROUPS section @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.202 2019/09/07 07:10:15 rillig Exp $ d466 1 a466 1 . if !empty(PKGPATH:Mlang/gcc2) d484 1 a484 1 . if !empty(PKGPATH:Mlang/gcc3-c) d497 1 a497 1 . if !empty(PKGPATH:Mlang/gcc34) d515 1 a515 1 . if !empty(PKGPATH:Mlang/gcc44) d534 1 a534 1 . if !empty(PKGPATH:Mlang/gcc48) d555 1 a555 1 . if !empty(PKGPATH:Mlang/gcc49) d576 1 a576 1 . if !empty(PKGPATH:Mlang/gcc5) d597 1 a597 1 . if !empty(PKGPATH:Mlang/gcc6) d618 1 a618 1 . if !empty(PKGPATH:Mlang/gcc7) d639 1 a639 1 . if !empty(PKGPATH:Mlang/gcc8) d660 1 a660 1 . if !empty(PKGPATH:Mlang/gcc5-aux) d679 1 a679 1 . if !empty(PKGPATH:Mlang/gcc3-c++) d688 1 a688 1 . if !empty(PKGPATH:Mlang/gcc3-f77) d697 1 a697 1 . if !empty(PKGPATH:Mlang/gcc3-objc) d994 1 a994 1 . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && \ @ 1.202 log @mk/compiler/gcc.mk: update _VARGROUPS @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.201 2019/07/15 16:06:19 ryoon Exp $ d65 2 a66 2 USE_CROSS_COMPILE PKGSRC_USE_RELRO PKGSRC_USE_SSP \ COMPILER_USE_SYMLINKS d68 1 a68 1 GCC_REQD USE_GCC_RUNTIME d70 4 a73 1 CC_VERSION CC_VERSION_STRING LANGUAGES.gcc a74 3 CCPATH CPPPATH CXXPATH \ F77PATH FCPATH \ ADAPATH GMKPATH GLKPATH GDBPATH CHPPATH GLSPATH GNTPATH PRPPATH \ d77 2 a78 3 PKG_CC PKG_CPP PKG_CXX PKG_FC \ PKG_ADA PKG_GMK PKG_GLK PKG_GDB PKG_CHP PKG_GLK PKG_GNT PKG_PRP \ PKGSRC_ADA PKGSRC_GMK PKGSRC_GLK PKGSRC_GDB PKGSRC_CHP PKGSRC_GLK PKGSRC_GNT PKG_SRCPRP \ d80 2 a81 2 _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CC _GCC_CFLAGS \ _GCC_CPP _GCC_CXX _GCC_DEPENDENCY _GCC_DEPENDS \ d88 1 a88 1 _GCC_ADA _GCC_GMK _GCC_GLK _GCC_GDB _GCC_CHP _GCC_GLS _GCC_GNT _GCC_PRP \ d93 3 a95 1 _NEED_GCC2 _NEED_GCC3 _NEED_GCC34 _NEED_GCC44 _NEED_NEWER_GCC \ d105 2 a106 6 _IGNORE_GCC MAKEFLAGS \ _GCC_DIR _GCC_VARS \ _ALIASES.CC _GCC_CC CCPATH PKG_CC \ _ALIASES.CPP _GCC_CPP CPPPATH PKG_CPP \ _ALIASES.CXX _GCC_CXX CXXPATH PKG_CXX \ _ALIASES.FC _GCC_FC FCPATH PKG_FC FC F77PATH PKGSRC_FORTRAN \ a111 1 d115 1 a115 2 _PKGSRC_USE_STACK_CHECK _STACK_CHECK_CFLAGS \ USE_LIBTOOL USE_GCC_RUNTIME \ d118 1 a118 1 _PKGSRC_USE_RELRO \ d120 2 a121 1 _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS d126 2 a127 1 @ 1.201 log @Do not pass -std=c++03 to GCC 4.4 No objection on tech-pkg@@. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.200 2019/07/09 15:46:02 riastradh Exp $ d62 9 a70 3 _USER_VARS.gcc= USE_NATIVE_GCC USE_PKGSRC_GCC _PKG_VARS.gcc= GCC_REQD _SYS_VARS.gcc= CC_VERSION CC_VERSION_STRING LANGUAGES.gcc d75 1 a75 1 IMAKEOPTS \ d79 1 d83 1 d97 33 a129 1 _WRAP_EXTRA_ARGS.CC @ 1.200 log @aarch64 has no compiler flag for ABI=64. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.199 2019/07/09 15:45:46 riastradh Exp $ d192 8 @ 1.199 log @Avoid passing _CC as cross-compiler to recursive makes. This way we don't inadvertently tell a native dependency that it is supposed to be compiled with the cross-compiler. No functional change intended for USE_CROSS_COMPILE=no. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.198 2018/11/12 14:22:58 jperkin Exp $ d896 3 @ 1.198 log @mk: Add CTF infrastructure support. Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the user enables support by setting PKGSRC_USE_CTF=yes, and packages can explicitly disable support with CTF_SUPPORTED=no or skip certain files with CTF_FILES_SKIP. The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert. If all of the requisite variables are enabled, a compiler-specific debug flag is passed via the wrappers to ensure we have DWARF information to convert, _INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped prior to conversion, and the conversion is performed during the install stage. It is recommended that users who enable the feature also set STRIP_DEBUG=yes to reduce the final binary size once the conversion has been performed. This has been used for the past year in Joyent SmartOS builds. FreeBSD is marked as supported but is untested. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.197 2018/10/29 11:53:18 abs Exp $ d164 3 d168 1 @ 1.197 log @Don't rely on gcc version fallthrough for GCC_REQD+=8 (Thanks to eagle eyes from leot@@) @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.196 2018/10/28 22:22:19 abs Exp $ d398 2 @ 1.196 log @Add GCC_REQD+=8 support to compiler/gcc.mk @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.195 2018/10/09 15:02:48 abs Exp $ d146 1 a146 1 _GCC8_PATTERNS= 8.* @ 1.195 log @Support single digit GCC_REQ values (5, 6 or 7) Do not add 4 to avoid confusion between gcc44/48/49 Also switch USE_PKGSRC_GCC_RUNTIME checks to use _GCC_PKGBASE to match against selected gcc @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.194 2018/10/08 20:02:17 rillig Exp $ d112 1 a112 1 _GCC_DIST_NAME:= gcc7 d145 3 d288 6 d305 1 a305 1 !empty(_NEED_GCC7:M[nN][oO]) && \ d307 1 a307 1 _NEED_GCC7= yes d330 2 d583 21 d952 2 @ 1.194 log @Remove trailing whitespace @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.193 2018/07/11 11:11:52 jperkin Exp $ d137 1 a137 1 _GCC5_PATTERNS= 5.* d140 1 a140 1 _GCC6_PATTERNS= 6.* d143 1 a143 1 _GCC7_PATTERNS= 7.* d910 1 a910 1 . if !empty(CC_VERSION:Mgcc-4.8*) d912 1 a912 1 . elif !empty(CC_VERSION:Mgcc-4.9*) d914 1 a914 1 . elif !empty(CC_VERSION:Mgcc-5.*) d916 1 a916 1 . elif !empty(CC_VERSION:Mgcc-6.*) d918 1 a918 1 . elif !empty(CC_VERSION:Mgcc-7.*) @ 1.193 log @mk/compiler/gcc.mk: Darwin needs _USE_GCC_SHLIB too. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.192 2018/05/24 05:47:21 wiz Exp $ d735 1 a735 1 @ 1.192 log @mk/compiler/gcc.mk: move _GCC_LDFLAGS setting for relro. At the previous location it was overridden if a gcc from pkgsrc was used. Problem found by bacon@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.191 2018/05/23 10:17:58 jperkin Exp $ d635 2 a636 1 .if ${OPSYS} == "SunOS" && (defined(USE_LIBTOOL) || defined(USE_GCC_RUNTIME)) @ 1.191 log @mk: Fix GCC PKGPATH matches. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.190 2018/05/23 08:11:59 jperkin Exp $ a380 5 .if ${_PKGSRC_USE_RELRO} == "yes" _GCC_LDFLAGS+= ${_RELRO_LDFLAGS} CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS} .endif d730 5 @ 1.190 log @mk: Add USE_PKGSRC_GCC_RUNTIME gcc7-libs support. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.189 2017/11/29 22:55:15 khorben Exp $ d907 2 a908 1 . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && empty(PKGPATH:Mlang/gcc??) @ 1.189 log @Also append the CFLAGS for MKPIE for c++(1) From spz@@, thanks! @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.188 2017/11/15 19:04:24 khorben Exp $ d916 2 @ 1.188 log @Revert "Always add "-fPIC" when linking with PKGSRC_MKPIE" It seems to break emulators/qemu. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.187 2017/11/12 13:34:14 khorben Exp $ d346 1 @ 1.187 log @Add initial support for building packages reproducibly It currently tackles two problems: - gcc(1) hard-coding full paths in debugging information (with one caveat at the moment) - ar(1) hard-coding user IDs in archive headers This allows packages built from the same tree and options to produce identical results bit by bit. This option should be combined with ASLR and PKGSRC_MKPIE to avoid predictable address offsets for attackers attempting to exploit security vulnerabilities. This is still disabled by default, and only supports NetBSD so far. As discussed on tech-pkg@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.185 2017/10/03 09:38:16 jperkin Exp $ d339 1 a339 1 _MKPIE_LDFLAGS.gcc= -fPIC -pie @ 1.186 log @Always add "-fPIC" when linking with PKGSRC_MKPIE This makes sure a simple "cc -o hello hello.c" will still build a valid executable. It does not let us detect when CFLAGS or LDFLAGS are ignored anymore, but it is legitimate for packages to expect it to work without any additional parameter. ld(1) does not expect "-fPIC" but it seems to be ignored by our wrappers in this case, so no disruption is expected there. @ text @d350 11 @ 1.185 log @mk: Fix SSP detection when using pkgsrc GCC. We can't rely on _GCC_VERSION as an accurate indicator of the GCC version, as when using a pkgsrc GCC it will be set to 0 until the pkgsrc GCC is available and we can detect its version. Instead, move the logic later to after CC_VERSION is set and use that instead. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.184 2017/09/11 09:06:41 jperkin Exp $ d339 1 a339 1 _MKPIE_LDFLAGS.gcc= -pie @ 1.184 log @Limit GCC SSP support to 4.x and newer. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.183 2017/08/25 01:43:17 khorben Exp $ a373 11 # The user can choose the level of stack smashing protection. .if ${_GCC_VERSION:C/\..*$//} >= 4 . if ${PKGSRC_USE_SSP} == "all" _SSP_CFLAGS= -fstack-protector-all . elif ${PKGSRC_USE_SSP} == "strong" _SSP_CFLAGS= -fstack-protector-strong . else _SSP_CFLAGS= -fstack-protector . endif .endif d869 11 @ 1.183 log @Add support for PKGSRC_MKPIE with cwrappers This is based on a patch submitted on 16/04/2017 on tech-pkg@@ and adapted by joerg@@ for pkgtools/cwrappers. It only consists in the missing part to actually generate PIE executables with cwrappers if configured to do so (currently disabled by default). The aim is really to produce safer binaries where ASLR is in use. This part in pkgsrc is only supported on NetBSD (x86) with GCC at the moment. Tested on NetBSD/amd64, with and without cwrappers, with and without PKGSRC_MKPIE (all four combinations). @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.182 2017/08/04 08:53:33 jperkin Exp $ d375 2 a376 1 .if ${PKGSRC_USE_SSP} == "all" d378 1 a378 1 .elif ${PKGSRC_USE_SSP} == "strong" d380 1 a380 1 .else d382 1 @ 1.182 log @Remove obsolete and unused SunOS fortify section. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.181 2017/07/18 18:27:31 brook Exp $ d339 1 a339 1 #_MKPIE_LDFLAGS.gcc= -pie d344 1 a344 1 _GCC_LDFLAGS+= ${_MKPIE_LDFLAGS.gcc} d346 1 a346 1 # XXX this differs for libraries and executables @ 1.181 log @Add logic so GCC_REQD+=7.x works. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.180 2017/07/09 14:30:07 khorben Exp $ a341 4 .if ${OPSYS} == "SunOS" _FORTIFY_CFLAGS.gcc= -D_FORTIFY_SOURCE=2 .endif @ 1.180 log @Register support for PKGSRC_USE_STACK_CHECK This adds -fstack-check to the CFLAGS (with GCC on NetBSD x86). Only tested on NetBSD/amd64 so far. Disabled by default. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.179 2017/06/25 01:41:15 joerg Exp $ d112 1 a112 1 _GCC_DIST_NAME:= gcc6 d142 3 d279 6 d296 1 d298 1 a298 1 _NEED_GCC6= yes d319 2 d557 21 @ 1.179 log @Fix typo. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.178 2017/05/18 08:14:08 jperkin Exp $ d375 6 @ 1.178 log @Consolidate setting of SSP flags now that multiple compilers support it. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.177 2017/05/04 18:44:12 joerg Exp $ d23 1 a23 1 # GCC_VERSION_SUFIXX @ 1.177 log @Add GCC_VERSION_SUFFIX, which can be used i.e. on SuSE systems to select between different compiler versions. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.176 2017/04/16 23:12:37 khorben Exp $ a374 8 .if ${_PKGSRC_USE_SSP} == "yes" _WRAP_EXTRA_ARGS.CC+= ${_SSP_CFLAGS} _WRAP_EXTRA_ARGS.CXX+= ${_SSP_CFLAGS} CWRAPPERS_APPEND.cc+= ${_SSP_CFLAGS} CWRAPPERS_APPEND.cxx+= ${_SSP_CFLAGS} CWRAPPERS_APPEND.f77+= ${_SSP_CFLAGS} .endif @ 1.176 log @Add granularity to PKGSRC_USE_FORTIFY and PKGSRC_USE_RELRO The new options are, for FORTIFY: "no" Do not pass any flags for FORTIFY "weak" Pass -D_FORTIFY_SOURCE=1 "strong" Pass -D_FORTIFY_SOURCE=2 This allows users to reduce the level of FORTIFY specified if necessary or desired. The previous setting as "yes" is now equivalent to "strong" (the default when enabling). The new options are, for RELRO: "no" Do not pass any flags for RELRO "partial" Pass -Wl,-z,relro "full" Pass -Wl,-z,relro -Wl,-z,now This allows users to reduce the level of RELRO specified if necessary or desired. The previous setting as "yes" is now equivalent to "full" (the default when enabling). This is intended to match the changes committed by jperkin@@ (for SSP) after our discussion a (long) while back. No functional change intended (with the settings supported so far). @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.175 2017/04/10 12:22:07 jperkin Exp $ d23 4 d721 1 a721 1 .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc) d723 1 a723 1 _GCC_CC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gcc d725 1 a725 1 CCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc d728 1 a728 1 .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}cpp) d730 1 a730 1 _GCC_CPP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}cpp d732 1 a732 1 CPPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}cpp d735 1 a735 1 .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++) d737 1 a737 1 _GCC_CXX= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g++ d739 1 a739 1 CXXPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++ d742 1 a742 1 .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77) d744 1 a744 1 _GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g77 d747 2 a748 2 FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77 F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77 d752 1 a752 1 .if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran) d754 1 a754 1 _GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gfortran d757 2 a758 2 FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran @ 1.175 log @Let GCC 4.4 handle requests for GCC 4.[0-4] to ensure we are consistent in using the closest match for each request, as well as fixing platforms where GCC 6 does not yet build or is unsupported. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.174 2016/12/29 23:16:26 maya Exp $ a318 1 _FORTIFY_CFLAGS.gcc= -D_FORTIFY_SOURCE=2 a323 1 _RELRO_LDFLAGS.gcc= -Wl,-z,relro -Wl,-z,now d338 7 d346 9 a354 2 _GCC_CFLAGS+= ${_FORTIFY_CFLAGS.gcc} CWRAPPERS_APPEND.cc+= ${_FORTIFY_CFLAGS.gcc} d358 2 a359 2 _GCC_LDFLAGS+= ${_RELRO_LDFLAGS.gcc} CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS.gcc} @ 1.174 log @Remove last mentions of gcc45,46,47 in mk/. No functional change intended. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.173 2016/12/29 23:07:17 maya Exp $ d123 2 a124 2 # _GCC44_PATTERNS matches N s.t. 4.4 <= N < 4.5. _GCC44_PATTERNS= 4.4 4.4.* d127 1 a127 1 _GCC48_PATTERNS= 4.[5678] 4.[5678].* @ 1.174.2.1 log @Pullup ticket #5265 - requested by sevan mk/compiler/gcc.mk: bugfix Revisions pulled up: - mk/compiler/gcc.mk 1.175 --- Module Name: pkgsrc Committed By: jperkin Date: Mon Apr 10 12:22:07 UTC 2017 Modified Files: pkgsrc/mk/compiler: gcc.mk Log Message: Let GCC 4.4 handle requests for GCC 4.[0-4] to ensure we are consistent in using the closest match for each request, as well as fixing platforms where GCC 6 does not yet build or is unsupported. @ text @d1 1 a1 1 # $NetBSD$ d123 2 a124 2 # _GCC44_PATTERNS matches N s.t. 4.0 <= N < 4.5. _GCC44_PATTERNS= 4.[0-4] 4.[0-4].* d127 1 a127 1 _GCC48_PATTERNS= 4.[5-8] 4.[5-8].* @ 1.173 log @Remove some of the mentions for gcc{45,46,47}. No functional change intended. Still a few left. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.172 2016/12/29 22:21:13 maya Exp $ a446 59 .elif !empty(_NEED_GCC45:M[yY][eE][sS]) # # We require gcc-4.5.x in the lang/gcc45 directory. # _GCC_PKGBASE= gcc45 . if !empty(PKGPATH:Mlang/gcc45) _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc45 _GCC_DEPENDENCY= gcc45>=${_GCC_REQD}:../../lang/gcc45 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mobjc) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC46:M[yY][eE][sS]) # # We require gcc-4.6.x in the lang/gcc46 directory. # _GCC_PKGBASE= gcc46 . if !empty(PKGPATH:Mlang/gcc46) _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc46 _GCC_DEPENDENCY= gcc46>=${_GCC_REQD}:../../lang/gcc46 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mobjc) _USE_GCC_SHLIB?= yes . endif . endif .elif !empty(_NEED_GCC47:M[yY][eE][sS]) # # We require gcc-4.7.x in the lang/gcc47 directory. # _GCC_PKGBASE= gcc47 . if !empty(PKGPATH:Mlang/gcc47) _IGNORE_GCC= yes MAKEFLAGS+= _IGNORE_GCC=yes . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc47 _GCC_DEPENDENCY= gcc47>=${_GCC_REQD}:../../lang/gcc47 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) _USE_GCC_SHLIB?= yes . endif . endif @ 1.172 log @Make GCC_REQD+= 4.5 to 4.8 resolve to 4.8 (dropping the possibility to match for 4.5, 4.6, 4.7, which will soon be dropped). This commit is the functional change. Cleanup will be done in separate commits. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.171 2016/11/25 20:36:49 marino Exp $ a247 18 _NEED_GCC45?= no .for _pattern_ in ${_GCC45_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC45= yes . endif .endfor _NEED_GCC46?= no .for _pattern_ in ${_GCC46_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC46= yes . endif .endfor _NEED_GCC47?= no .for _pattern_ in ${_GCC47_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) _NEED_GCC47= yes . endif .endfor d281 3 a283 4 !empty(_NEED_GCC45:M[nN][oO]) && !empty(_NEED_GCC46:M[nN][oO]) && \ !empty(_NEED_GCC47:M[nN][oO]) && !empty(_NEED_GCC48:M[nN][oO]) && \ !empty(_NEED_GCC49:M[nN][oO]) && !empty(_NEED_GCC5:M[nN][oO]) && \ !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC_AUX:M[nN][oO]) a296 6 .elif !empty(_NEED_GCC45:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 java objc .elif !empty(_NEED_GCC46:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 java objc .elif !empty(_NEED_GCC47:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ d910 1 a910 5 . if !empty(CC_VERSION:Mgcc-4.6*) . include "../../lang/gcc46-libs/buildlink3.mk" . elif !empty(CC_VERSION:Mgcc-4.7*) . include "../../lang/gcc47-libs/buildlink3.mk" . elif !empty(CC_VERSION:Mgcc-4.8*) @ 1.171 log @Upgrade USE_LANGUAGES=ada to use lang/gcc5-aux instead of lang/gcc-aux This large commit accomplishes the following: 1) Switch USE_LANGUAGES=ada to require lang/gcc5-aux (gcc 5.4) instead of lang/gcc-aux (gcc 4.9.2) on gcc.mk 2) Bump affected ports and fix paths as necessary 3) Upgrade devel/gprbuild to the latest release - No longer requires lang/gnat_util - gprslave requires gcc6-aux, so it was disabled for now 4) Fix lang/gnat_util but set PKG_SKIP_REASON - It has no further purpose in the pkgsrc tree - It has no practical purpose outside of the pkgsrc tree - Indicate intent to remove from tree in Jan. 2017 5) Set devel/GPS as failed with PKG_FAIL_REASON - This version of GPS is several years old and at the time they were strongly tied to compiler. - Latest release of GPS require gcc6-aux (not available) and several new and complex dependencies - maintainer (me) has no interest to continue supporting it - Leaving GPS in place until Jan 2017 to give another person chance to upgrade and take over support - Latest version in FreeBSD Ports Collection as a reference point @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.170 2016/10/10 08:26:08 jperkin Exp $ d126 2 a127 11 # _GCC45_PATTERNS matches N s.t. 4.5 <= N < 4.6. _GCC45_PATTERNS= 4.5 4.5.* # _GCC46_PATTERNS matches N s.t. 4.6 <= N < 4.7. _GCC46_PATTERNS= 4.6 4.6.* # _GCC47_PATTERNS matches N s.t. 4.7 <= N < 4.8. _GCC47_PATTERNS= 4.7 4.7.* # _GCC48_PATTERNS matches N s.t. 4.8 <= N < 4.9. _GCC48_PATTERNS= 4.8 4.8.* @ 1.170 log @Fix mips ABI setup which cannot have possibly worked for a long time. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.169 2016/09/13 07:59:15 maya Exp $ d100 2 a101 2 # Only one compiler defined here supports Ada: lang/gcc-aux # If the Ada language is requested, force lang/gcc-aux to be selected d626 1 a626 1 # We require Ada-capable compiler in the lang/gcc-aux directory. d628 2 a629 2 _GCC_PKGBASE= gcc-aux . if !empty(PKGPATH:Mlang/gcc-aux) d634 2 a635 2 _GCC_PKGSRCDIR= ../../lang/gcc-aux _GCC_DEPENDENCY= gcc-aux>=${_GCC_REQD}:../../lang/gcc-aux @ 1.169 log @Add logic so GCC_REQD+=6.x works ok jperkin@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.168 2016/06/13 13:26:42 jperkin Exp $ a739 11 .if !empty(MACHINE_ARCH:Mmips*) _COMPILER_ABI_FLAG.32= -mabi=n32 # ABI == "32" == "n32" _COMPILER_ABI_FLAG.n32= -mabi=n32 _COMPILER_ABI_FLAG.o32= -mabi=32 _COMPILER_ABI_FLAG.64= -mabi=64 . if defined(ABI) && !empty(ABI) MABIFLAG= ${_COMPILER_ABI_FLAG.${ABI}} . endif .endif d768 1 a768 1 ${DIRNAME} `${_GCC_PREFIX}bin/gcc ${MABIFLAG} -print-libgcc-file-name 2>/dev/null`; \ a771 6 . if empty(_GCC_ARCHDIR:M*not_found*) . if defined(MABIFLAG) && !empty(MABIFLAG) _GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H}/ _GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H:T}/ . endif . endif d899 5 @ 1.168 log @Change PKGSRC_USE_SSP to a quad option. The options are now: "no" Do not pass any stack protection flags (the default) "yes" Pass -fstack-protector "strong" Pass -fstack-protector-strong "all" Pass -fstack-protector-all This allows users to configure the level of stack smashing protection they require, and ensures consistent behaviour across platforms. Users running on NetBSD who previously used the option will need to change "yes" to "all" to match the previous default configuration for that platform. While here use _WRAP_EXTRA_ARGS to ensure the flag gets passed regardless of whether the package honours CFLAGS, and support additional wrappers. Discussed a while back with khorben, and used in production for the SmartOS 2016Q1 package sets with the "strong" option. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.167 2016/04/11 04:22:34 dbj Exp $ d108 1 a108 1 _GCC_DIST_NAME:= gcc5 d144 3 d293 6 d311 2 a312 2 !empty(_NEED_GCC_AUX:M[nN][oO]) _NEED_GCC5= yes d337 2 d603 21 d966 2 @ 1.167 log @update PKG_{FAIL,SKIP}_REASON with += @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.166 2016/03/11 23:54:09 khorben Exp $ a348 1 _SSP_CFLAGS.gcc= -fstack-protector-all a352 1 _SSP_CFLAGS.gcc= -fstack-protector d373 9 d383 5 a387 2 _GCC_CFLAGS+= ${_SSP_CFLAGS.gcc} CWRAPPERS_APPEND.cc+= ${_SSP_CFLAGS.gcc} @ 1.166 log @Re-arrange support for FORTIFY/MKPIE/RELRO/SSP - No _GCC_* anything in mk/bsd.prefs.mk; - No compiler flags in platform files. Tested again on NetBSD/amd64, with and without cwrappers, with the same outcome. With feedback from jperkin@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.165 2016/03/11 23:03:31 khorben Exp $ d689 1 a689 1 PKG_FAIL_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}" d925 1 a925 1 PKG_FAIL_REASON= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}" @ 1.165 log @Add support for a number of security features - Revisit (and rename) support for FORTIFY as PKGSRC_USE_FORTIFY (instead of PKGSRC_USE_FORT) for easier support outside NetBSD/gcc; - PKGSRC_USE_SSP is no longer enabled by default when PKGSRC_USE_FORTIFY is enabled; - PKGSRC_MKPIE builds executables as PIE (to leverage userland ASLR) - PKGSRC_USE_RELRO builds with a read-only GOT to prevent some exploits from functioning. Tested on NetBSD/amd64 by myself, in every combination, with and without pkgtools/cwrappers. MKPIE is not supported at the moment with cwrappers. Also, MKPIE is known to still break a number of packages when enabled (and actually supported). Tested on SunOS by jperkin@@, thank you! As discussed on tech-pkg@@, the default behavior is not changed, except where noted above. ok bsiegert@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.164 2016/03/02 18:45:21 jperkin Exp $ d341 16 d358 2 d366 1 d371 1 d376 1 @ 1.164 log @Pass correct GCC ABI flags on AIX. Fix from Eric N. Vander Weele @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.163 2015/07/26 22:13:17 khorben Exp $ d341 18 d734 2 a736 1 .endif @ 1.163 log @Add support for compiling with stack-smashing protection This is enabled with PKGSRC_USE_SSP in mk.conf(5), as documented there. Most NetBSD platforms are supported (when compiling with gcc). After consensus on tech-pkg@@. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.162 2015/07/16 12:09:04 ryoon Exp $ d824 5 d831 1 a831 1 .if ${OPSYS} == "HPUX" @ 1.162 log @Add gcc5 support. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.161 2015/04/27 10:33:49 tnn Exp $ d70 1 a70 1 _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CC \ d351 2 @ 1.161 log @correct MACHINE_ARCH and compiler flags for HP-UX 64-bit ABI @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.160 2015/04/25 10:33:29 wiz Exp $ d108 1 a108 1 _GCC_DIST_NAME:= gcc49 d141 3 d284 6 d301 3 a303 2 !empty(_NEED_GCC49:M[nN][oO]) && !empty(_NEED_GCC_AUX:M[nN][oO]) _NEED_GCC49= yes d326 2 d520 21 d875 2 @ 1.160 log @Finish move of lang/gcc to lang/gcc2. Let me know if I broke something. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.159 2015/04/18 19:53:59 joerg Exp $ d789 9 a797 2 _COMPILER_ABI_FLAG.32= -m32 _COMPILER_ABI_FLAG.64= -m64 @ 1.159 log @Until there is evidence to the contrary, provide _COMPILER_ABI_FLAG on all platforms. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.158 2015/04/02 23:50:25 jperkin Exp $ d341 1 a341 1 # We require gcc-2.x in the lang/gcc directory. d343 2 a344 2 _GCC_PKGBASE= gcc . if !empty(PKGPATH:Mlang/gcc) d349 2 a350 2 _GCC_PKGSRCDIR= ../../lang/gcc _GCC_DEPENDENCY= gcc>=${_GCC_REQD}:../../lang/gcc @ 1.158 log @Append LIBABISUFFIX to the GCC library path. Fixes Linux and SunOS multilib systems where it is the default, no change on other platforms. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.157 2015/04/02 23:42:15 jperkin Exp $ a788 1 .if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" || ${OPSYS} == "SunOS" a790 1 .endif @ 1.157 log @Don't include the main GCC libraries in linker paths when using USE_PKGSRC_GCC_RUNTIME. Fixes check-shlibs when using the GCC runtime packages as previously the main libraries were being picked up instead of the runtime ones we'd asked for. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.156 2015/04/02 23:21:01 jperkin Exp $ d675 1 a675 1 _GCC_LIBDIRS+= ${_GCC_PREFIX}lib @ 1.156 log @Don't recompute _GCC_PREFIX and _GCC_SUBPREFIX in the general case. At best this does nothing, and at worst it is actively harmful when using multilib systems. It's possible the mips case is broken too, but I do not have any hardware to test that on, so for now leave the special mips MABIFLAG handling intact. Fixes multilib SunOS builds. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.155 2015/02/04 14:11:50 jperkin Exp $ d673 4 a676 1 _GCC_LIBDIRS= ${_GCC_ARCHDIR} ${_GCC_PREFIX}lib @ 1.155 log @Ensure additional C99 flags are passed via cwrappers too. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.154 2015/01/01 01:33:05 ryoon Exp $ a670 3 . else _GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H}/ _GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:T}/ @ 1.154 log @Add gcc46-libs support code. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.153 2014/11/03 13:06:39 ryoon Exp $ d326 1 @ 1.153 log @Fix GCC49 pattern. From richard@@, thank you. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.152 2014/10/31 14:22:20 ryoon Exp $ d828 3 a830 1 . if !empty(CC_VERSION:Mgcc-4.7*) @ 1.152 log @Restore monolithic gcc48 and gcc48-libs. * No objection on tech-pkg@@ mailing list. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.151 2014/09/06 08:32:55 jperkin Exp $ d486 1 a486 1 .elif !empty(_NEED_GCC48:M[yY][eE][sS]) @ 1.151 log @Improve comments around USE_PKGSRC_GCC and GCC_REQD. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.150 2014/09/05 22:11:10 jperkin Exp $ d467 1 a467 1 # We require gcc-4.8.x in the lang/gcc48-* directory. d469 2 a470 2 _GCC_PKGBASE= gcc48-cc++ . if !empty(PKGPATH:Mlang/gcc48-cc++) d474 9 a482 3 . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc++) _GCC_PKGSRCDIR= ../../lang/gcc48-cc++ _GCC_DEPENDENCY= gcc48-cc++>=${_GCC_REQD}:../../lang/gcc48-cc++ d484 1 d486 1 a486 1 .elif !empty(_NEED_GCC49:M[yY][eE][sS]) a559 22 .if !empty(_NEED_GCC48:M[yY][eE][sS]) . if !empty(PKGPATH:Mlang/gcc48-fortran) _IGNORE_GCC48FORTRAN= yes MAKEFLAGS+= _IGNORE_GCC48FORTRAN=yes . endif . if !defined(_IGNORE_GCC48FORTRAN) && \ (!empty(_LANGUAGES.gcc:Mfortran77) || !empty(_LANGUAGES.gcc:Mfortran)) _GCC_PKGSRCDIR+= ../../lang/gcc48-fortran _GCC_DEPENDENCY+= gcc48-fortran>=${_GCC_REQD}:../../lang/gcc48-fortran _USE_GCC_SHLIB?= yes . endif . if !empty(PKGPATH:Mlang/gcc48-objc) _IGNORE_GCC3OBJC= yes MAKEFLAGS+= _IGNORE_GCC48OBJC=yes . endif . if !defined(_IGNORE_GCC48OBJC) && !empty(_LANGUAGES.gcc:Mobjc) _GCC_PKGSRCDIR+= ../../lang/gcc48-objc _GCC_DEPENDENCY+= gcc48-objc>=${_GCC_REQD}:../../lang/gcc48-objc _USE_GCC_SHLIB?= yes . endif .endif d827 1 a827 1 . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && empty(PKGPATH:Mlang/gcc??) && empty(PKGPATH:Mlang/gcc48-*) @ 1.150 log @Fix lang/gcc49 dependency logic, based on lang/gcc47. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.149 2014/09/04 18:52:53 jperkin Exp $ d16 2 a17 4 # Force using the appropriate version of GCC from pkgsrc based on # GCC_REQD instead of the native compiler. # # This should be disabled only for debugging. d32 3 a34 4 # NOTE: Be conservative when setting GCC_REQD, as lang/gcc3 is # known not to build on some platforms, e.g. Darwin. If gcc3 is # required, set GCC_REQD=3.0 so that we do not try to pull in # lang/gcc3 unnecessarily and have it fail. @ 1.149 log @Add infrastructure support for lang/gcc49 and lang/gcc49-libs @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.148 2014/06/09 23:29:31 ryoon Exp $ d491 1 a491 1 . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc++) d494 6 d501 1 @ 1.148 log @Make lang/g95 as default Fortran compiler under NetBSD current (GCC 4.8) lang/g95 is built with NetBSD current's GCC 4.8.3. Thank you, asau@@. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.147 2014/06/01 09:58:13 ryoon Exp $ d111 1 a111 1 _GCC_DIST_NAME:= gcc48 d141 3 d278 6 d295 2 a296 2 !empty(_NEED_GCC_AUX:M[nN][oO]) _NEED_GCC48= yes d317 2 d482 14 d843 2 @ 1.147 log @Fix error under recent NetBSD current (GCC 4.8.3). @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.146 2014/06/01 08:14:27 ryoon Exp $ a851 6 .if (!empty(MACHINE_PLATFORM:MNetBSD-6.99.[4-9]*) || \ !empty(MACHINE_PLATFORM:MNetBSD-[7-9]*)) && \ (!empty(CC_VERSION:Mgcc-4.[8-9]*) || \ !empty(CC_VERSION:Mgcc-[5-9].*)) PKGSRC_FORTRAN?=gfortran .else a852 1 .endif @ 1.146 log @Set gcc48-* compilers, and gcc48-fortaran as default Fortran compiler for recent gcc 4.8.3 NetBSD current. lang/g95 is not built for such NeBSD. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.145 2014/04/22 20:49:38 ryoon Exp $ d854 2 a855 1 !empty(CC_VERSION:Mgcc-4.8*) @ 1.145 log @Support per language gcc48 packages @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.144 2014/02/04 12:11:57 fhajny Exp $ d138 2 a139 2 # _GCC48_PATTERNS matches N s.t. 4.8 <= N. _GCC48_PATTERNS= 4.[8-9] 4.[8-9].* 4.[1-9][0-9]* [5-9]* a464 3 _IGNORE_GCC48CXX= yes MAKEFLAGS+= _IGNORE_GCC48CXX=yes _USE_GCC_SHLIB?= yes d466 1 a466 2 . if !defined(_IGNORE_GCC) && \ (!empty(_LANGUAGES.gcc:Mc) || !empty(_LANGUAGES.gcc:Mc++)) a468 19 . endif . if !empty(PKGPATH:Mlang/gcc48-fortran) _IGNORE_GCC48FORTRAN= yes MAKEFLAGS+= _IGNORE_GCC48FORTRAN=yes . endif . if !defined(_IGNORE_GCC48FORTRAN) && \ (!empty(_LANGUAGES.gcc:Mfortran77) || !empty(_LANGUAGES.gcc:Mfortran)) _GCC_PKGSRCDIR+= ../../lang/gcc48-fortran _GCC_DEPENDENCY+= gcc48-fortran>=${_GCC_REQD}:../../lang/gcc48-fortran _USE_GCC_SHLIB?= yes . endif . if !empty(PKGPATH:Mlang/gcc48-objc) _IGNORE_GCC48OBJC= yes MAKEFLAGS+= _IGNORE_GCC48OBJC=yes . endif . if !defined(_IGNORE_GCC48OBJC) && \ (!empty(_LANGUAGES.gcc:Mobjc) || !empty(_LANGUAGES.gcc:Mobj-c++)) _GCC_PKGSRCDIR+= ../../lang/gcc48-objc _GCC_DEPENDENCY+= gcc48-objc>=${_GCC_REQD}:../../lang/gcc48-objc d524 22 d813 1 a813 1 . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && empty(PKGPATH:Mlang/gcc??) d852 5 d858 1 @ 1.144 log @Make sure FC is set for g77/gfortran. Fixes runtime Fortran in math/R et al. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.143 2013/11/23 08:55:28 obache Exp $ d459 1 a459 1 # We require gcc-4.8.x in the lang/gcc48 directory. d461 2 a462 2 _GCC_PKGBASE= gcc48 . if !empty(PKGPATH:Mlang/gcc48) d465 8 d474 18 a491 9 . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) _GCC_PKGSRCDIR= ../../lang/gcc48 _GCC_DEPENDENCY= gcc48>=${_GCC_REQD}:../../lang/gcc48 . if !empty(_LANGUAGES.gcc:Mc++) || \ !empty(_LANGUAGES.gcc:Mfortran) || \ !empty(_LANGUAGES.gcc:Mfortran77) || \ !empty(_LANGUAGES.gcc:Mgo) || \ !empty(_LANGUAGES.gcc:Mobjc) || \ !empty(_LANGUAGES.gcc:Mobj-c++) a492 1 . endif @ 1.143 log @Set Interix bultin gcc specific patths to COMPILER_{INCLUDE,LIB}_DIRS. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.142 2013/07/09 10:13:43 jperkin Exp $ d693 1 d703 1 @ 1.142 log @Match against CC_VERSION rather than _GCC_VERSION, the latter is not defined in the USE_PKGSRC_GCC case. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.141 2013/06/15 22:32:18 wiz Exp $ d851 5 @ 1.141 log @fix typo in comment. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.140 2013/06/15 21:52:11 asau Exp $ d797 1 a797 1 . if !empty(_GCC_VERSION:M4.7*) d799 1 a799 1 . elif !empty(_GCC_VERSION:M4.8*) @ 1.140 log @"fortran88" is unknown, make it "fortran77". @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.139 2013/06/15 21:50:43 asau Exp $ d833 1 a833 1 # be overriden in mk.conf to use only f2c. @ 1.139 log @Stop advertising "fortran" support by GCC before 4.4 ("fortran" denotes post-Fortran-77 dialects). @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.138 2013/06/15 19:06:31 joerg Exp $ d471 1 a471 1 !empty(_LANGUAGES.gcc:Mfortran88) || \ @ 1.138 log @Do not switch Fortran compiler depending on the language requirement of the package. For f2c, all Fortran 95+ programs are broken and it is generally not possible to mix output from different Fortran compilers. Default to g95 for now as fallback compiler. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.137 2013/06/13 10:45:46 jperkin Exp $ d293 1 a293 1 LANGUAGES.gcc= c c++ fortran fortran77 objc d295 1 a295 1 LANGUAGES.gcc= c c++ fortran fortran77 java objc d297 1 a297 1 LANGUAGES.gcc= c c++ fortran fortran77 objc a342 1 !empty(_LANGUAGES.gcc:Mfortran) || \ a373 1 !empty(_LANGUAGES.gcc:Mfortran) || \ d515 1 a515 1 . if !defined(_IGNORE_GCC3F77) && (!empty(_LANGUAGES.gcc:Mfortran) || !empty(_LANGUAGES.gcc:Mfortran77)) @ 1.137 log @Add USE_PKGSRC_GCC_RUNTIME support for gcc 4.8 and fix dependencies for gcc packages. Bail out if runtime support is requested but we do not provide runtime libraries for the chosen compiler. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.136 2013/04/20 07:36:17 sbd Exp $ d833 3 a835 2 # On older NetBSD systems and where the Fortran compiler doesn't exist, # force the use of f2c-f77 or some other fortran. a836 1 .if !empty(USE_LANGUAGES:Mfortran) a837 4 .endif #.if !empty(USE_LANGUAGES:Mfortran77) PKGSRC_FORTRAN?=f2c #.endif @ 1.136 log @Use so magic to set _GCC_DIST_VERSION. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.135 2013/04/19 16:34:46 adam Exp $ d798 8 a805 2 . if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) . include "../../lang/gcc47-libs/buildlink3.mk" @ 1.135 log @Renaming GCC_DIST_VERSION to GCC48_DIST_VERSION @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.134 2013/04/17 09:48:30 adam Exp $ d111 3 a113 2 .include "../../lang/gcc48/version.mk" _GCC_DIST_VERSION:= ${GCC48_DIST_VERSION} @ 1.134 log @Enable usage of gcc-4.8 as PKGSRC_COMPILER @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.133 2013/04/02 22:24:03 wiz Exp $ d112 1 a112 1 _GCC_DIST_VERSION:= ${GCC_DIST_VERSION} @ 1.133 log @I think this might fix gcc47-libs. XXX: Proper infrastructure support for gcc48 might need more work. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.132 2013/04/01 21:06:57 wiz Exp $ d111 1 a111 2 # .include "../../lang/gcc47/version.mk" @ 1.132 log @Add support for gcc48. From Kai-Uwe Eckhardt . @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.131 2013/04/01 19:07:40 wiz Exp $ d112 1 a112 1 .include "../../lang/gcc48/version.mk" @ 1.131 log @Fix two typos. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.130 2012/12/12 20:49:01 marino Exp $ d112 1 a112 1 .include "../../lang/gcc47/version.mk" d135 5 a139 2 # _GCC47_PATTERNS matches N s.t. 4.7 <= N. _GCC47_PATTERNS= 4.[7-9] 4.[7-9].* 4.[1-9][0-9]* [5-9]* d269 6 d285 3 a287 2 !empty(_NEED_GCC47:M[nN][oO]) && !empty(_NEED_GCC_AUX:M[nN][oO]) _NEED_GCC47= yes d306 2 d459 21 @ 1.130 log @compiler.mk, gcc.mk: Implement DRAGONFLY_CCVER DragonFly has two compilers in base, GCC 4.4.7 and GCC 4.7.2. The way one switches between them for userland programs is to set CCVER in the environment. However, to set this via make.conf is tricky. I've been using the low level "ALL_ENV+= CCVER=gcc47", but this trick fails to properly identify the compiler which results in _GCC_VERSION being incorrectly defined. Additionally, there are some prominent packages that do not build on gcc 4.7 and the fix is either not fully understood or would require a large amount of work to implement. In these cases, it is desireable to specify the package be built on gcc 4.4 regardless of CCVER setting. To address these issues, a new directive is added: DRAGONFLY_CCVER. It is only effective if OPSYS equals "DragonFly", and it will properly set CCVER and properly define _GCC_VERSION. It will also allow a per package specification of a particular compiler in the pkg makefile. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.129 2012/09/17 04:43:56 obache Exp $ d135 2 a136 2 # _GCC46_PATTERNS matches N s.t. 4.7 <= N. _GCC47_PATTERNS= 4.[7-9] 4.[7-9].* 4.[1-9][0-9]* [4-9]* @ 1.129 log @check defined(_USE_GCC_SHLIB) before using it. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.128 2012/09/16 12:18:30 jperkin Exp $ d168 2 @ 1.128 log @Document USE_PKGSRC_GCC_RUNTIME and provide a default setting. Introduce USE_GCC_RUNTIME for packages which build shared libraries, but do not use libtool to do so, and add logic to always define _USE_GCC_SHLIB on Solaris if either USE_LIBTOOL or USE_GCC_RUNTIME are defined. On Solaris, a non-GNU linker is always used, so this correctly adds a dependency upon the gcc runtime for those packages. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.127 2012/09/16 07:31:18 sbd Exp $ d761 1 a761 1 .if !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss]) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) @ 1.127 log @Add dependency on GCC libraries if requested. Code by Jonathan Perkin. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.126 2012/09/13 10:17:14 sbd Exp $ d21 4 d39 6 d94 1 d498 11 a508 4 # When not using the GNU linker, gcc will always link shared libraries # against the shared version of libgcc. Always enable _USE_GCC_SHILB on # platforms that don't use the GNU linker, such as SunOS. .if ${OPSYS} == "SunOS" @ 1.126 log @Move the setting of _USE_GCC_SHLIB=yes on SunOS from the gcc buildlink3 to mk/compiler/gcc.mk @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.125 2012/07/27 10:34:00 jperkin Exp $ d742 8 @ 1.125 log @Ensure LC_ALL=C is set when determining the gcc version. Add a comment explaining why we currently have to hardcode 'env' rather than use SETENV or PKGSRC_SETENV. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.124 2012/07/13 16:11:29 jperkin Exp $ d487 7 @ 1.124 log @Add new GCCBASE variable, useful on systems which install gcc outside of the normal $PATH. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.123 2012/07/09 07:42:17 sbd Exp $ d147 6 a152 5 # FIXME: ALL_ENV is not set at this point, so LC_ALL must be set # explicitly. In the show-all and show-var targets, it appears # nevertheless because "References to undefined variables are not # expanded" when using the := operator. . if defined(SETENV) d154 1 a154 5 ( ${PKGSRC_SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0 . else _GCC_VERSION_STRING!= \ ( ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0 . endif @ 1.123 log @Set default values for _NEED_GCC47 and _NEED_GCC_AUX. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.122 2012/07/08 19:57:10 marino Exp $ d7 4 d133 4 a136 1 . for _dir_ in ${PATH:C/\:/ /g} @ 1.122 log @compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada All recent packages featuring Ada code have a hard dependency on the lang/gnat-aux compiler package. The valid values for USE_LANGUAGES are c, c99, c++, fortran, fortran77, java, objc, so specifying a specific compiler was necessary up into now. One problem with lang/gnat-aux is that it is installed at ${LOCALBASE} where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX. The latter compilers have no possibility of sharing conflicting files unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler based on GCC 4.7 was created with the intent of being supported by mk/compiler.mk and mk/compiler/gcc.mk. The Ada packages will be effectively migrated from lang/gnat-aux to the new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone package as it is the only GCC 4.6-based compiler that builds on DragonFly and serves it as a world and kernel compile option. In addition to the current language wrappers, lang/gcc-aux adds wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver), and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep, and gnatls programs. Supporting all of these allows the wrapper system to be used with Ada packages; currently wrappers are mostly disabled on them. The lang/gcc47 implicitly adds support for the "objc-c++" language by adding it to the USE_LANGUAGES list, but it wasn't really supported. An attempt was made to better support objc-c++, but this new enumeration probably still needs work or needs to be removed completely. Logic for Ada support: 1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9. 2) lang/gcc-aux uses the release date as its version number in the form of YYYYMMDD with a minimum value of 20120614, so there is no version overlap. 3) When at least one element of USE_LANGUAGES is "ada", the value of 20120614 is added to the set of GCC_REQD which selects lang/gcc-aux. 4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant; unless a package sets GCC_REQD over 20120614, the only way to select lang/gcc-aux is to specify the Ada language and only one compiler known to gcc.mk can support it. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.121 2012/06/26 15:48:53 jperkin Exp $ d243 1 d249 1 @ 1.121 log @Solaris needs -m32 for ABI=32 too, now that we have compilers which build 64-bit by default. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.120 2012/04/25 16:28:18 hans Exp $ d53 1 d57 1 d66 1 d88 6 d123 3 d248 6 d257 1 a257 1 !empty(_NEED_GCC47:M[nN][oO]) d277 2 d428 20 d643 43 @ 1.120 log @If unset, set PKGSRC_FORTRAN accordingly if g77 or gfortran exist. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.119 2012/04/24 07:44:11 sbd Exp $ d610 1 a610 10 .if ${OPSYS} == "SunOS" _COMPILER_ABI_FLAG.64= -m64 .endif .if ${OPSYS} == "Darwin" _COMPILER_ABI_FLAG.32= -m32 _COMPILER_ABI_FLAG.64= -m64 .endif .if ${OPSYS} == "Linux" @ 1.119 log @Add _COMPILER_ABI_FLAG.XX for gcc on Linux. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.118 2012/04/16 05:03:03 sbd Exp $ d592 1 d601 1 @ 1.118 log @Add support for gcc-4.7 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.117 2012/04/16 05:00:44 sbd Exp $ d617 5 @ 1.117 log @Make sure that gcc47 JAVA_WRAPPERS don't break the _GCC_SUBPREFIX detection. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.116 2012/04/13 03:03:36 sbd Exp $ d88 2 a89 1 _GCC_DIST_VERSION= 4.6.3 d108 5 a112 2 # _GCC46_PATTERNS matches N s.t. 4.6 <= N. _GCC46_PATTERNS= 4.[6-9] 4.[6-9].* 4.[1-9][0-9]* [4-9]* d231 5 d238 3 a240 2 !empty(_NEED_GCC45:M[nN][oO]) && !empty(_NEED_GCC46:M[nN][oO]) _NEED_GCC46= yes d257 2 d387 21 @ 1.116 log @Move USE_PKGSRC_GCC from compler.mk to compler/gcc.mk and make it a yes/no check. At the same time cleanup GCC_REQD. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.115 2012/04/13 02:30:45 sbd Exp $ d477 1 @ 1.115 log @Inorder to use a native gcc there must be a builtin gcc. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.114 2012/03/06 11:39:55 hans Exp $ d11 6 d26 5 d47 1 a47 1 _USER_VARS.gcc= USE_NATIVE_GCC d76 1 d410 4 @ 1.114 log @Highest version of gcc in pkgsrc is now 4.6.3 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.113 2012/02/28 12:57:24 hans Exp $ d396 1 a396 1 .if !empty(USE_NATIVE_GCC:M[yY][eE][sS]) @ 1.113 log @If gcc from pkgsrc is used, FCPATH might not be installed yet. Don't force installation of yet another (different) fortran compiler in that case. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.112 2011/11/03 19:11:37 hans Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.6.2 @ 1.112 log @Update _GCC_DIST_VERSION to 4.6.2 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.111 2011/09/08 20:17:15 abs Exp $ d633 1 a633 1 .if !exists(${FCPATH}) @ 1.111 log @Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i to santise environment @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.110 2011/08/18 10:01:31 wiz Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.6.1 @ 1.110 log @Update _GCC_DIST_VERSION to 4.6.1. Noted by Jörn Clausen in PR 45256. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.109 2011/06/10 08:59:58 wiz Exp $ d116 1 d118 5 a122 1 ( ${SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0 @ 1.109 log @Support gcc-4.5 and gcc-4.6. Some testing by Jörn Clausen. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.108 2011/02/25 13:34:56 hans Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.6.0 @ 1.108 log @Update to 4.4.5, fixes a build problem on OpenIndiana (and probably Solaris 11 Express, too). Changes 4.4.5: The GNU project and the GCC developers are pleased to announce the release of GCC 4.4.5. This release is a bug-fix release, containing fixes for regressions in GCC 4.4.4 relative to previous releases of GCC. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.107 2010/12/26 14:13:44 asau Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.4.5 d89 8 a96 2 # _GCC44_PATTERNS matches N s.t. 4.4 <= N. _GCC44_PATTERNS= 4.[4-9] 4.[4-9].* 4.[1-9][0-9]* [4-9]* d198 12 d211 3 a213 2 !empty(_NEED_GCC34:M[nN][oO]) && !empty(_NEED_GCC44:M[nN][oO]) _NEED_GCC44= yes d226 4 d320 38 @ 1.107 log @Break with the past: use g95 as default Fortran compiler. Welcome to the modern world of computing. This is known to break DragonFly at least, either port g95 or fix lang/gcc44 to work on NetBSD. Unless there're packages that still think that Fortran is F77, this shouldn't affect anything. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.106 2010/07/30 07:58:59 asau Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.4.4 @ 1.106 log @Implement "fortran77" as alias for "fortran". @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.105 2010/05/06 10:21:17 adam Exp $ d559 4 d564 1 @ 1.105 log @Changes 4.4.4: The [1]GNU project and the GCC developers are pleased to announce the release of GCC 4.4.4. This release is a bug-fix release, containing fixes for regressions in GCC 4.4.3 relative to previous releases of GCC. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.104 2010/04/24 08:33:19 obache Exp $ d200 1 a200 1 LANGUAGES.gcc= c c++ fortran objc d202 1 a202 1 LANGUAGES.gcc= c c++ fortran java objc d204 1 a204 1 LANGUAGES.gcc= c c++ fortran objc d206 1 a206 1 LANGUAGES.gcc= c c++ fortran java objc d241 1 d273 1 d292 1 d314 1 a314 1 . if !defined(_IGNORE_GCC3F77) && !empty(_LANGUAGES.gcc:Mfortran) @ 1.104 log @Remove tail of -* from _GCC_VERSION for _GCC_PKG. With gcc2 on Haiku, it's 2.95.3-haiku-090629, confuse pmatch of pkg_admin. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.103 2010/03/15 08:27:49 adam Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.4.3 @ 1.103 log @Changes 4.4.3: The GNU project and the GCC developers are pleased to announce the release of GCC 4.4.3. This release is a bug-fix release, containing fixes for regressions in GCC 4.4.1 relative to previous releases of GCC. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.102 2009/09/18 11:38:23 dmcmahill Exp $ d120 1 a120 1 _GCC_PKG= gcc-${_GCC_VERSION} @ 1.102 log @Fix a typo, no idea why this didn't show up when I tested this before. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.101 2009/09/18 11:27:41 dmcmahill Exp $ d76 1 a76 1 _GCC_DIST_VERSION= 4.4.1 @ 1.101 log @Teach this file about the lang/gcc44 package @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.100 2009/09/12 21:42:27 tron Exp $ d193 1 a193 1 !empty(_NEED_GCC34:M[nN][oO]) && !empty(_NEED_GC44:M[nN][oO]) @ 1.100 log @Add 32 bit and 64 ABI options for GCC under Mac OS X. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.99 2009/07/28 06:55:24 rillig Exp $ d57 1 a57 1 _NEED_GCC2 _NEED_GCC3 _NEED_GCC34 _NEED_NEWER_GCC \ d76 1 a76 1 _GCC_DIST_VERSION= 3.4.6 d86 5 a90 2 # _GCC34_PATTERNS matches N s.t. 3.4 <= N. _GCC34_PATTERNS= 3.[4-9] 3.[4-9].* 3.[1-9][0-9]* [4-9]* d186 6 d193 2 a194 2 !empty(_NEED_GCC34:M[nN][oO]) _NEED_GCC3= yes d205 2 d276 18 d474 8 @ 1.99 log @Did you know that the := operator behaves funnily? Example: exclam != echo ${DEFINED_LATER:Q} value colon := ${DEFINED_LATER} value DEFINED_LATER = later show: @@echo ${exclam} @@echo ${colon} Don't expect them to be the same. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.98 2009/07/08 21:25:30 markd Exp $ d456 5 @ 1.98 log @Allow other fortran compilers than f2c to be used when gcc doesn't supply one. Now to use g95 as the fortran compiler just add PKGSRC_FORTRAN= g95 FC= g95 to the mk.conf. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.97 2009/05/30 18:16:26 joerg Exp $ d103 4 d108 1 a108 1 ( ${SETENV} ${ALL_ENV} ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0 @ 1.97 log @Rename GCC_USE_SYMLINKS to COMPILER_USE_SYMLINKS, implement it for the other compiler drivers and enable it by default. Saves at least a percent of build time even for trivial packages like lang/lua. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.96 2009/03/17 21:28:10 rillig Exp $ d51 1 a51 1 _GCC_TEST_DEPENDS _GCC_USE_F2C _GCC_VARS _GCC_VERSION \ d508 1 a508 1 # force the use of f2c-f77. d510 3 a512 1 _GCC_USE_F2C= no d514 1 a514 1 _GCC_USE_F2C= yes d518 1 a518 1 _GCC_USE_F2C= yes d522 2 a523 2 .if !empty(_GCC_USE_F2C:M[yY][eE][sS]) . include "../../mk/compiler/f2c.mk" @ 1.96 log @Documented the public variables of this file. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.95 2008/11/16 17:01:53 ahoka Exp $ a41 1 GCC_USE_SYMLINKS \ a482 2 # Create compiler driver scripts in ${WRKDIR}. GCC_USE_SYMLINKS?= no d488 1 a488 1 . if !empty(GCC_USE_SYMLINKS:Myes) @ 1.95 log @Don't try to build gcc2 on AMD64, as it's not supported by that compiler. This issue was reported by Daniel Horecki. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.94 2008/09/16 15:02:55 rillig Exp $ d5 26 @ 1.94 log @Added the list of variables, so that "bmake show-all-gcc" shows all the internals of this file. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.93 2008/02/07 20:59:05 rillig Exp $ d43 2 a44 2 # gcc2 doesn't support c99 .if !empty(USE_LANGUAGES:Mc99) @ 1.93 log @Replaced _PKG_SILENT and _PKG_DEBUG with RUN. XXX: Why do we have the exactly same code in all the files? @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.92 2007/08/11 17:31:22 joerg Exp $ d9 28 @ 1.92 log @When calling gcc to extract the version number, pass down ALL_ENV as well. This ensures that any locale settings are overridden and the output matches what pkgsrc expects. This should fix some of the strange bootstrap issues seen over time that were seemingly fxied by USE_NATIVE_GCC=yes. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.91 2007/08/02 18:19:32 joerg Exp $ d436 1 a436 1 ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} d438 2 a439 2 ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} d441 1 a441 1 ${_PKG_SILENT}${_PKG_DEBUG} \ d445 1 a445 1 ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} d448 1 a448 1 ${_PKG_SILENT}${_PKG_DEBUG} \ @ 1.91 log @Add core of the infrastructure support for cross-compilation. - USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of the target filesystem - derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR - buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR - compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf) - PKG_DBDIR is prefixed with _CROSS_DESTDIR - package-install and bin-install are not called with su - install and strip are redirected to the tool version - links for the target specific ar, as, ld, nm, objdump, ranlib and strip are added - compiler wrapper detect if linking is requested or not - special command sinks for CPP and CC/CXX add the cross-compile magic: - modify include dirs to get the target /usr/include - modify linker dirs and runpath to use target /usr/lib at link time, but keep correct rpath entries Supported-by: Google SoC 2007 Basic tests by he@@ on Sparc. Review from jlam@@. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.90 2007/02/10 08:59:07 rillig Exp $ d51 1 a51 1 ( ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0 @ 1.90 log @Replaced the deprecated PKG_SKIP_REASON with PKG_FAIL_REASON. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.89 2007/01/08 19:29:45 gavan Exp $ d356 4 a359 1 .if exists(${_GCCBINDIR}/gcc) d361 1 a361 1 _GCC_CC= ${_GCC_DIR}/bin/gcc d363 1 a363 1 CCPATH= ${_GCCBINDIR}/gcc d366 1 a366 1 .if exists(${_GCCBINDIR}/cpp) d368 1 a368 1 _GCC_CPP= ${_GCC_DIR}/bin/cpp d370 1 a370 1 CPPPATH= ${_GCCBINDIR}/cpp d373 1 a373 1 .if exists(${_GCCBINDIR}/g++) d375 1 a375 1 _GCC_CXX= ${_GCC_DIR}/bin/g++ d377 1 a377 1 CXXPATH= ${_GCCBINDIR}/g++ d380 1 a380 1 .if exists(${_GCCBINDIR}/g77) d382 1 a382 1 _GCC_FC= ${_GCC_DIR}/bin/g77 d384 2 a385 2 FCPATH= ${_GCCBINDIR}/g77 F77PATH= ${_GCCBINDIR}/g77 @ 1.89 log @gcc2 does not support -std=c99. If c99 is needed, require at least gcc 3.0. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.88 2006/12/15 12:46:24 martti Exp $ d277 1 a277 1 PKG_SKIP_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}" @ 1.88 log @Remove trailing spaces. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.87 2006/12/06 16:18:19 joerg Exp $ d15 5 @ 1.88.2.1 log @Pullup ticket 2045 - requested by gavan require GCC version 3.x for C99 functionality Revisions pulled up: - pkgsrc/mk/compiler/gcc.mk 1.89 Module Name: pkgsrc Committed By: gavan Date: Mon Jan 8 19:29:45 UTC 2007 Modified Files: pkgsrc/mk/compiler: gcc.mk Log Message: gcc2 does not support -std=c99. If c99 is needed, require at least gcc 3.0. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.89 2007/01/08 19:29:45 gavan Exp $ a14 5 # gcc2 doesn't support c99 .if !empty(USE_LANGUAGES:Mc99) GCC_REQD+= 3.0 .endif @ 1.87 log @Don't force strict C99 mode by default, but the relaxed GNU-C99 mode. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.86 2006/12/02 22:32:59 jschauma Exp $ d149 1 a149 1 # d426 1 a426 1 override-tools: ${_GCC_${_var_}} @ 1.86 log @Instead of setting compiler flags in each package if it uses C99, allow USE_LANGUAGES+=c99 and let gcc and mipspro do the right thing. May need to be reviewed/added for other compilers. ok rillig@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.85 2006/10/22 00:14:17 rillig Exp $ d141 1 a141 1 _WRAP_EXTRA_ARGS.CC+= -std=c99 @ 1.85 log @Added header comments. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.84 2006/07/06 11:48:03 markd Exp $ d140 4 @ 1.84 log @On Solaris set _COMPILER_ABI_FLAG.64 to be consistent with the sunpro settings. @ text @d1 4 a4 1 # $NetBSD: gcc.mk,v 1.83 2006/04/05 12:31:24 shannonjr Exp $ @ 1.83 log @Change _GCC_DIST_VERSION from 3.4.5 to 3.4.6 to reflect update to lang/gcc34. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.82 2006/02/10 11:26:41 shannonjr Exp $ d380 4 @ 1.82 log @Bump '_GCC_DIST_VERSION' to '3.4.5' to match lang/gcc34 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.81 2005/05/31 10:51:36 shannonjr Exp $ d15 1 a15 1 _GCC_DIST_VERSION= 3.4.5 @ 1.81 log @Updated _GCC_DIST_VERSION from 3.4.3 to 3.4.4 to reflect recent update to lang/gcc34. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.80 2005/03/24 17:46:01 tv Exp $ d15 1 a15 1 _GCC_DIST_VERSION= 3.4.4 @ 1.80 log @USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per mail to tech-pkg: ===== * USE_BUILDLINK3=YES will be unconditional. (In fact, USE_BUILDLINK3 will be ignored altogether by mk/; but see below.) * NO_BUILDLINK and NO_WRAPPER will be ignored by mk/. If a build happens, these phases will happen. * The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER. If no build happens, those phases are not needed. * NO_TOOLS will be ignored by mk/. The tools phase, which provides much more than just the C compiler, will always happen regardless of package. This will make metapackage builds only slightly slower, in trade for far less user error. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.79 2005/01/21 21:59:14 tv Exp $ d15 1 a15 1 _GCC_DIST_VERSION= 3.4.3 @ 1.79 log @Re-add direct symlink logic, optional under GCC_USE_SYMLINKS=yes. Saves one fork/exec step on platforms where gcc is compiled with hardcoded gcc-lib pathnames. This applies to most platforms, but the default currently remains not to use symlinks so as to avoid unexpected gotchas for users. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.78 2005/01/12 15:32:01 jlam Exp $ d406 3 a408 11 . if !empty(USE_BUILDLINK3:M[yY][eE][sS]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink3.mk" . endfor . else . if defined(_USE_GCC_SHLIB) DEPENDS+= ${_GCC_DEPENDENCY} . else BUILD_DEPENDS+= ${_GCC_DEPENDENCY} . endif . endif @ 1.78 log @Nuke USE_FORTRAN and bring the f2c handling within the mk/compiler framework. The list of changes include: * Modify compiler.mk so that "c" is always prepended to USE_LANGUAGES, so we no longer need to say it in package Makefiles. Packages should now append to USE_LANGUAGES instead of setting it. * Create mk/compiler/f2c.mk which implements another pseudo-compiler "f2c" that may be used with any C compiler backend, e.g. PKGSRC_COMPILER= f2c ccache gcc * Teach the various "real" compiler files, e.g., sunpro.mk, mipspro.mk, etc., to use f2c if the native Fortran compiler isn't present. Packages that use Fortran should now simply include the line: USE_LANGUAGES+= fortran in the package Makefile. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.77 2004/11/30 14:50:37 jlam Exp $ d420 1 d426 4 d435 1 d439 1 a439 1 ${LN} -f ${.TARGET} ${_alias_}; \ @ 1.77 log @Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc., are handled. The idea now is to simply remove the paths in the values of these variables, leaving behind only the basename plus any arguments, e.g.: CC= /usr/local/bin/gcc becomes CC= gcc CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E The wrapper scripts are generated for every unique executable mentioned by the toolchain variables, so for the example above, only a "gcc" wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.} are the paths to the executables wrapped by the wrapper scripts. Note that it's now possible to set "CC" to something more than just the path to the compiler, e.g. CC= cc -ffast-math -funroll-loops -fomit-frame-pointer and the full value of ${CC} will be passed through via CONFIGURE_ENV and MAKE_ENV. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.76 2004/11/23 05:32:22 jlam Exp $ d439 17 @ 1.76 log @Use CCPATH instead of referring to the C compiler by its full path in multiple places. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.75 2004/11/23 00:46:26 dmcmahill Exp $ d337 1 a337 1 _GCC_LINKS= # empty d345 1 d347 1 a347 3 _GCC_LINKS+= _GCC_CC PKG_CC= ${_GCC_CC} CC= ${PKG_CC:T} d349 1 d351 2 a352 1 .if exists(${_GCCBINDIR}/cpp) && ${OPSYS} != "Darwin" d354 3 a356 3 _GCC_LINKS+= _GCC_CPP PKG_CPP= ${_GCC_CPP} CPP= ${PKG_CPP:T} d359 1 d361 1 a361 3 _GCC_LINKS+= _GCC_CXX PKG_CXX= ${_GCC_CXX} CXX= ${PKG_CXX:T} d363 1 d366 1 d368 1 a368 4 _GCC_LINKS+= _GCC_FC PKG_FC= ${_GCC_FC} FC= ${PKG_FC:T} F77= ${PKG_FC:T} d371 1 d373 1 d420 4 a423 4 .for _target_ in ${_GCC_LINKS} . if !target(${${_target_}}) override-tools: ${${_target_}} ${${_target_}}: d427 1 a427 1 ${ECHO} 'exec ${_GCCBINDIR}/${${_target_}:T} "$$@@"'; \ d430 6 @ 1.75 log @add {CC,CXX,FC,F77}PATH variables which give the complete path and name of the {CC,CXX,FC,F77} compilers. These will be used by pkgs which need to know which compiler and where it is at run time. Approved by jlam@@ @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.74 2004/11/22 22:24:47 wiz Exp $ d380 2 a381 2 . if exists(${_GCCBINDIR}/gcc) CC_VERSION_STRING!= ${_GCCBINDIR}/gcc -v 2>&1 d383 2 a384 2 if ${_GCCBINDIR}/gcc -dumpversion > /dev/null 2>&1; then \ ${ECHO} "gcc-`${_GCCBINDIR}/gcc -dumpversion`"; \ @ 1.74 log @Now that no package uses USE_GCC_SHLIB any longer, remove support for it from compiler.mk. Move the variable of the same name used by compiler/gcc.mk and the gcc* buildlink3 files into private namespace (_USE_GCC_SHLIB). @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.73 2004/11/10 12:04:59 shannonjr Exp $ d349 1 d362 1 d370 2 @ 1.74.2.1 log @merge from HEAD @ text @d1 1 a1 1 # $NetBSD$ a348 1 CCPATH= ${_GCCBINDIR}/gcc a360 1 CXXPATH= ${_GCCBINDIR}/g++ a367 2 FCPATH= ${_GCCBINDIR}/g77 F77PATH= ${_GCCBINDIR}/g77 d376 2 a377 2 . if exists(${CCPATH}) CC_VERSION_STRING!= ${CCPATH} -v 2>&1 d379 2 a380 2 if ${CCPATH} -dumpversion > /dev/null 2>&1; then \ ${ECHO} "gcc-`${CCPATH} -dumpversion`"; \ @ 1.74.2.2 log @merge from HEAD @ text @d337 1 a337 1 _GCC_VARS= # empty a344 1 _GCC_VARS+= CC d346 3 a348 1 _ALIASES.CC= cc gcc a349 1 PKG_CC:= ${_GCC_CC} d351 1 a351 2 .if exists(${_GCCBINDIR}/cpp) _GCC_VARS+= CPP d353 3 a355 3 _ALIASES.CPP= cpp CPPPATH= ${_GCCBINDIR}/cpp PKG_CPP:= ${_GCC_CPP} a357 1 _GCC_VARS+= CXX d359 3 a361 1 _ALIASES.CXX= c++ g++ a362 1 PKG_CXX:= ${_GCC_CXX} a364 1 _GCC_VARS+= FC d366 4 a369 1 _ALIASES.FC= f77 g77 a371 1 PKG_FC:= ${_GCC_FC} a372 1 _COMPILER_STRIP_VARS+= ${_GCC_VARS} d419 4 a422 4 .for _var_ in ${_GCC_VARS} . if !target(${_GCC_${_var_}}) override-tools: ${_GCC_${_var_}} ${_GCC_${_var_}}: d426 1 a426 1 ${ECHO} 'exec ${_GCCBINDIR}/${.TARGET:T} "$$@@"'; \ a428 6 . for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} ${_PKG_SILENT}${_PKG_DEBUG} \ if [ ! -x "${_alias_}" ]; then \ ${LN} -f ${.TARGET} ${_alias_}; \ fi . endfor @ 1.74.2.3 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.74.2.2 2004/11/30 15:06:35 tv Exp $ a438 17 # On older NetBSD systems and where the Fortran compiler doesn't exist, # force the use of f2c-f77. # _GCC_USE_F2C= no .if !exists(${FCPATH}) _GCC_USE_F2C= yes .else . for _pattern_ in 0.* 1.[0-4] 1.[0-4].* . if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*) _GCC_USE_F2C= yes . endif . endfor .endif .if !empty(_GCC_USE_F2C:M[yY][eE][sS]) . include "../../mk/compiler/f2c.mk" .endif @ 1.74.2.4 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD$ a419 1 GCC_USE_SYMLINKS?= no a424 4 . if !empty(GCC_USE_SYMLINKS:Myes) ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} . else a429 1 . endif d433 1 a433 1 ${LN} -f -s ${.TARGET:T} ${_alias_}; \ @ 1.74.2.5 log @sync [all but bsd.pkg.mk] with HEAD @ text @d406 11 a416 3 . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink3.mk" . endfor @ 1.74.2.6 log @EOL the tv-derecurse branch; it has become too outdated. The last live revision can be fetched at the tv-derecurse-eol tag. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.74.2.5 2005/05/17 18:29:45 tv Exp $ @ 1.73 log @Update _GCC_DIST_VERSION to 3.4.3 @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.72 2004/09/23 15:25:54 jlam Exp $ d162 1 a162 1 USE_GCC_SHLIB?= yes d193 1 a193 1 USE_GCC_SHLIB?= yes d207 1 a207 1 USE_GCC_SHLIB?= yes d216 1 a216 1 USE_GCC_SHLIB?= yes d225 1 a225 1 USE_GCC_SHLIB?= yes d406 1 a406 1 . if defined(USE_GCC_SHLIB) @ 1.72 log @Teach gcc.mk about gcc34 so that setting GCC_REQD=3.4 in /etc/mk.conf will make pkgsrc do the right thing. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.71 2004/09/23 13:49:21 jlam Exp $ d15 1 a15 1 _GCC_DIST_VERSION= 3.4.2 @ 1.71 log @Support the ABI flags on MIPS platforms. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.70 2004/08/27 06:29:09 jlam Exp $ d15 1 a15 1 _GCC_DIST_VERSION= 3.3.4 d21 1 a21 1 # _GCC3_PATTERNS matches N s.t. 2.95.3 < N. d23 4 a26 1 2.[1-9][0-9][0-9]* 3.* [4-9]* d112 8 a119 1 .if !empty(_NEED_GCC2:M[nN][oO]) && !empty(_NEED_GCC3:M[nN][oO]) d129 2 d178 18 @ 1.70 log @Replace RPATH_FLAG with LINKER_RPATH_FLAG and COMPILER_RPATH_FLAG, which are the full option names used to set rpath directives for the linker and the compiler, respectively. In places were we are invoking the linker, use "${LINKER_RPATH_FLAG} ", where the space is inserted in case the flag is a word, e.g. -rpath. The default values of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the compiler that you use. They may be overridden on a ${OPSYS}-specific basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG, respectively. Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.69 2004/07/06 22:49:18 wiz Exp $ a134 9 # Some platforms (such as IRIX) may support different ABIs. Set the CFLAGS # accordingly. .if defined(ABI) MABIFLAG= -mabi=${ABI:C/^32$/n&/} CFLAGS+= ${MABIFLAG} LDFLAGS+= ${MABIFLAG} .endif d244 11 @ 1.69 log @Retire buildlink2, now that all packages using it have been converted to buildlink3. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.68 2004/07/03 11:25:49 grant Exp $ d247 6 d296 1 a296 1 _GCC_LDFLAGS+= -L${_dir_} ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_} a337 3 # GCC passes flags to the linker using "-Wl,". _COMPILER_LD_FLAG= -Wl, @ 1.68 log @gcc 3.3.4 is in pkgsrc now. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.67 2004/05/17 05:33:08 jlam Exp $ d366 1 a366 5 . if empty(USE_BUILDLINK2:M[nN][oO]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink2.mk" . endfor . elif !empty(USE_BUILDLINK3:M[yY][eE][sS]) @ 1.67 log @Check that MABIFLAG is defined before checking that it's non-empty. This avoids breakage if MABIFLAG isn't defined. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.66 2004/05/17 03:12:46 jschauma Exp $ d15 1 a15 1 _GCC_DIST_VERSION= 3.3.3 @ 1.66 log @Allow use of 32bit gcc compiled from pkgsrc on 64bit Irix for a default ABI of 64. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.64 2004/05/05 03:05:41 jschauma Exp $ d274 1 a274 1 ${DIRNAME} `${_GCC_PREFIX}bin/gcc ${MABIFLAG} --print-libgcc-file-name`; \ d279 1 a279 1 . if !empty(MABIFLAG) @ 1.65 log @If ABI is set, LDFLAGS also needs the proper flag. @ text @d139 3 a141 2 CFLAGS+= -mabi=${ABI:C/^32$/n&/} LDFLAGS+= -mabi=${ABI:C/^32$/n&/} d274 1 a274 1 ${DIRNAME} `${_GCC_PREFIX}bin/gcc --print-libgcc-file-name`; \ d279 4 d285 1 @ 1.64 log @gcc can use -mabi=${ABI}, if ABI is set (for example on Irix). (Includes ugly hack for ABI-inconsistency. See also PR pkg/22571.) @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.63 2004/05/04 00:11:23 danw Exp $ d140 1 @ 1.63 log @/usr/bin/cpp on darwin is a wrapper script that forces the -traditional flag; you need to use "gcc -E" to get sane behavior. Override sys.mk's definition of CPP in defs.Darwin.mk, and don't re-override CPP in gcc.mk if ${OPSYS} == Darwin. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.62 2004/03/30 21:39:24 jlam Exp $ d135 7 @ 1.62 log @GCC has this annoying behaviour where it advocates in a multi-line banner the use of "#include" over "#import" when including headers. This generates a _huge_ number of warnings when building practically all Objective-C code where it is convention to use "#import". Suppress the warning if we're building Objective-C code using GCC by passing -Wno-import to the compiler. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.61 2004/03/13 20:02:52 jlam Exp $ d298 1 a298 1 .if exists(${_GCCBINDIR}/cpp) d335 1 a335 1 @ 1.61 log @Don't save the value of _NEED_NEWER_GCC as it gets a bad value on 1.5.3. XXX This should be removed after pkgsrc/bootstrap is up and running. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.60 2004/03/13 19:08:37 jlam Exp $ d125 10 @ 1.60 log @Provide a way to forcibly use the native GCC by setting USE_NATIVE_GCC in a package Makefile. Also modify pkg_admin checks to drop stderr so that errors aren't so verbose. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.59 2004/03/13 17:52:24 jlam Exp $ d221 1 a221 1 MAKEFLAGS+= _NEED_NEWER_GCC=${_NEED_NEWER_GCC} @ 1.59 log @Note what _CC contains. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.58 2004/03/12 06:09:12 jlam Exp $ d8 2 d81 1 a81 1 if ${PKG_ADMIN} pmatch 'gcc>=${_vers_}' ${_pkg_}; then \ d189 4 d202 1 a202 1 if ${PKG_ADMIN} pmatch '${_GCC_TEST_DEPENDS}' ${_GCC_PKG}; then \ d216 1 a216 1 if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION}; then \ @ 1.58 log @Add support for Objective C, and set USE_GCC_SHLIB whenever we're using C++, Fortran, or Objective C, as we must link against shared libraries. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.57 2004/03/10 05:13:38 dmcmahill Exp $ d23 1 @ 1.57 log @set F77 as well as FC. was: 1% make show-var PKG_STAGE=configure VARNAME=FC g77 2% make show-var PKG_STAGE=configure VARNAME=F77 /usr/pkgsrc-current/math/scilab/work/.gcc/bin/g77 is: 3% make show-var PKG_STAGE=configure VARNAME=FC g77 4% make show-var PKG_STAGE=configure VARNAME=F77 g77 fixes some buildlink spillover noted in the scilab package. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.56 2004/03/05 14:36:34 wiz Exp $ d134 3 a136 1 . if !empty(_LANGUAGES.gcc:Mc++) d175 9 @ 1.56 log @Update _GCC_DIST_VERSION to 3.3.3; noted by Ben Secrest on tech-pkg. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.55 2004/02/20 07:18:19 jlam Exp $ d287 1 @ 1.55 log @Provide a much more complete list of version number patterns <= 2.95.3. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.54 2004/02/20 07:10:06 jlam Exp $ d13 1 a13 1 _GCC_DIST_VERSION= 3.3.2 @ 1.54 log @If for some reason, _GCC_REQD doesn't match any of the version pattern lists, then just assume that we need gcc3. The rest of the code in the file assumes that we either need gcc2 or gcc3, so this provides a fall-through, default value. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.53 2004/02/18 13:32:38 jlam Exp $ d16 1 a16 1 _GCC2_PATTERNS= 2.8 2.8.* 2.9 2.9.* 2.[1-8][0-9] 2.[1-8][0-9].* \ @ 1.53 log @* Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk. Package Makefiles may now directly include compiler.mk. * Don't include compiler.mk within bsd.prefs.mk any longer. It was only included for the purposes of defining CC_VERSION. Packages that want to test the value of CC_VERSION should now first include "../../mk/compiler.mk". Any GCC_REQD statements in package Makefiles should be set before compiler.mk is included. * Simpllfy pkgsrc/mk/compiler/*.mk files as a result of not needing to be included indirectly by bsd.prefs.mk. We remove the special handling associated with detecting whether the file was included from within bsd.prefs.mk. These files are now much more straightforward to write and understand. * G/C the BSD_PREFS_MK stack mechanism as the only users (compiler/*) no longer need it. * Ensure that directories are prepended to the PATH only from within bsd.pkg.mk. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.52 2004/02/15 13:34:33 jlam Exp $ d106 3 @ 1.52 log @Create wrappers for the compilers for every language supported by the compiler set. This will cause the libtool configuration found in several packages to use the correct C++ compiler even though the package doesn't use C++. This was causing bugs when CXXFLAGS contained flags not understood by the system gcc-2.95.3. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.51 2004/02/12 08:54:48 jlam Exp $ d4 3 a6 1 COMPILER_GCC_MK= one d23 1 a23 1 . if !defined(_CC) d25 3 a27 3 . for _dir_ in ${PATH:C/\:/ /g} . if empty(_CC:M/*) . if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}) a28 1 . endif d30 2 a31 1 . endfor d33 1 a33 1 . endif d35 1 a35 1 . if !defined(_GCC_VERSION) d38 1 a38 1 . if !empty(_GCC_VERSION_STRING:Megcs*) d40 1 a40 1 . elif !empty(_GCC_VERSION_STRING:Mgcc*) d42 1 a42 1 . else a43 1 . endif d45 1 d48 1 a48 1 . if !empty(_CC:M${LOCALBASE}/*) d51 2 a52 2 . else . if !empty(_CC:M/*) d57 1 a57 1 . if ${_GCC_VERSION} != "0" a58 3 . else _IS_BUILTIN_GCC= NO . endif d62 2 d65 1 d71 3 a73 3 . for _version_ in ${GCC_REQD} . for _pkg_ in gcc-${_version_} . if ${_GCC_STRICTEST_REQD} == "none" d75 2 a76 2 . for _vers_ in ${GCC_REQD} . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) d83 3 a85 3 . endif . endfor . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) a86 1 . endif d88 1 a88 1 . endfor d90 1 d95 2 a96 2 . for _pattern_ in ${_GCC2_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) d98 2 a99 2 . endif . endfor d101 2 a102 2 . for _pattern_ in ${_GCC3_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) d104 2 a105 2 . endif . endfor d109 1 a109 1 . if !empty(_NEED_GCC2:M[yY][eE][sS]) d111 1 a111 1 . elif !empty(_NEED_GCC3:M[yY][eE][sS]) d113 1 a113 1 . endif d115 1 a115 1 . for _lang_ in ${USE_LANGUAGES} d117 1 a117 1 . endfor d119 1 a119 1 . if !empty(_NEED_GCC2:M[yY][eE][sS]) d124 1 a124 1 . if !empty(PKGPATH:Mlang/gcc) d127 2 a128 2 . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) d131 1 a131 1 . if !empty(_LANGUAGES.gcc:Mc++) a132 1 . endif d134 2 a135 1 . elif !empty(_NEED_GCC3:M[yY][eE][sS]) d140 1 a140 1 . if !empty(PKGPATH:Mlang/gcc3-c) d143 2 a144 2 . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc) a146 1 . endif d148 1 d151 2 a152 2 . if !empty(_NEED_GCC3:M[yY][eE][sS]) . if !empty(PKGPATH:Mlang/gcc3-c++) d155 2 a156 2 . endif . if !defined(_IGNORE_GCC3CXX) && !empty(_LANGUAGES.gcc:Mc++) d160 2 a161 2 . endif . if !empty(PKGPATH:Mlang/gcc3-f77) d164 2 a165 2 . endif . if !defined(_IGNORE_GCC3F77) && !empty(_LANGUAGES.gcc:Mfortran) a168 1 . endif d170 1 d172 1 a172 1 . if defined(_IGNORE_GCC) d174 1 a174 1 . endif d176 1 a176 1 . if !defined(_USE_PKGSRC_GCC) d178 1 a178 1 . if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) a185 1 . endif d187 1 d192 1 a192 1 . if !defined(_NEED_NEWER_GCC) d201 3 a203 3 . endif . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \ !empty(_NEED_NEWER_GCC:M[yY][eE][sS]) d205 1 a205 1 . endif d207 1 a207 1 . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) d238 1 a238 1 . if empty(_GCC_ARCHDIR:M*not_found*) d241 1 a241 1 . endif d244 1 a244 1 . for _dir_ in ${_GCC_LIBDIRS:N*not_found*} d246 1 a246 1 . endfor d248 1 a248 1 . endif d256 1 a256 1 . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) d258 1 a258 1 . elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) d260 2 a261 2 . endif . if exists(${_GCCBINDIR}/gcc) d266 2 a267 2 . endif . if exists(${_GCCBINDIR}/cpp) d272 2 a273 2 . endif . if exists(${_GCCBINDIR}/g++) d278 2 a279 2 . endif . if exists(${_GCCBINDIR}/g77) d284 1 a284 1 . endif d290 1 a290 1 . if ${OPSYS} == "SunOS" d292 1 a292 1 . endif d294 2 a295 2 . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${_GCCBINDIR}/gcc) d304 1 a304 1 . else d307 2 a308 2 . endif . else d311 1 a311 9 . endif .endif # COMPILER_GCC_MK # The following section is included only if we're not being included by # bsd.prefs.mk. # .if empty(BSD_PREFS_MK) . if empty(COMPILER_GCC_MK:Mtwo) COMPILER_GCC_MK+= two d314 1 a314 2 . if !empty(_LANGUAGES.gcc) . if empty(PREPEND_PATH:M${_GCC_DIR}/bin) d316 1 a316 3 PATH:= ${_GCC_DIR}/bin:${PATH} . endif . endif d319 11 a329 11 . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if empty(USE_BUILDLINK2:M[nN][oO]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink2.mk" . endfor . elif !empty(USE_BUILDLINK3:M[yY][eE][sS]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink3.mk" . endfor . else . if defined(USE_GCC_SHLIB) d331 1 a331 1 . else a332 2 . endif . endif d334 2 d338 2 a339 2 . for _target_ in ${_GCC_LINKS} . if !target(${${_target_}}) d348 4 a351 4 . endif . endfor . endif # COMPILER_GCC_MK .endif # BSD_PREFS_MK @ 1.51 log @Generate a more informative string "CC_VERSION_STRING" that is passed to ccache as the compiler information to hash. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.50 2004/02/09 05:45:57 jlam Exp $ d259 1 a259 1 . if exists(${_GCCBINDIR}/gcc) && !empty(_LANGUAGES.gcc:Mc) d265 1 a265 1 . if exists(${_GCCBINDIR}/cpp) && !empty(_LANGUAGES.gcc:Mc) d271 1 a271 1 . if exists(${_GCCBINDIR}/g++) && !empty(_LANGUAGES.gcc:Mc++) d277 1 a277 1 . if exists(${_GCCBINDIR}/g77) && !empty(_LANGUAGES.gcc:Mfortran) @ 1.50 log @Update comment to reflect reality. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.49 2004/02/09 05:22:43 jlam Exp $ d294 8 a301 5 CC_VERSION!= if ${_GCCBINDIR}/gcc -dumpversion > /dev/null 2>&1; then \ ${ECHO} "gcc-`${_GCCBINDIR}/gcc -dumpversion`"; \ else \ ${ECHO} "gcc-${_GCC_REQD}"; \ fi d303 2 a304 1 CC_VERSION= gcc-${_GCC_REQD} d307 2 a308 1 CC_VERSION= ${_GCC_PKG} @ 1.49 log @Reorder some lines so that a default definition for some variables is present in global context. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.48 2004/02/09 00:37:32 jlam Exp $ d341 1 a341 1 # Create symlinks for the compiler into ${WRKDIR}. @ 1.48 log @Use TOOLS_SHELL since we're creating the shell script at override-tools time. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.47 2004/02/08 03:34:20 jlam Exp $ d105 12 a121 5 LANGUAGES.gcc= c c++ fortran objc _LANGUAGES.gcc= # empty . for _lang_ in ${USE_LANGUAGES} _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} . endfor a137 5 LANGUAGES.gcc= c c++ fortran java objc _LANGUAGES.gcc= # empty . for _lang_ in ${USE_LANGUAGES} _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} . endfor a174 1 . if !empty(_IS_BUILTIN_GCC:M[nN][oO]) d176 1 a176 1 . else @ 1.47 log @Make those scripts executable. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.46 2004/02/08 03:29:16 jlam Exp $ d347 1 a347 1 (${ECHO} '#!${BUILDLINK_SHELL}'; \ @ 1.46 log @Use a two-line "exec" shell script instead of a symlink to the real GCC. This should fix problems with not finding "cc1" or other GCC subprograms. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.45 2004/02/08 02:59:14 jlam Exp $ d350 1 @ 1.45 log @* Let CC/CXX/CPP/FC always point to the compiler used in the actual building of software. For packages that use either buildlink2 or buildlink3, this would be the wrapper script in ${BUILDLINK_DIR}. * Garbage-collect _BLNK_WRAP_SETENV.* as those are not needed after the above changes. Configure and make processes will automatically find the right compilers in the PATH. * PKGLIBTOOL and PKGSHLIBTOOL are no longer needed since LIBTOOL and SHLIBTOOL point to the correct libtools regardless of any USE_BUILDLINK[23] definitions. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.44 2004/02/07 02:58:10 jlam Exp $ d347 3 a349 1 ${LN} -fs ${_GCCBINDIR}/${${_target_}:T} ${.TARGET} @ 1.44 log @Symlink the compiler into ${WRKDIR} so that there's a consistent path to the compiler and that it's behind .tools/bin and .buildlink/bin, regardless of whether or not we're using gcc3-c or not, or whether it's been installed yet in the process of satisfying dependencies, etc. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.43 2004/02/06 20:15:49 jlam Exp $ d261 2 a262 1 CC= ${_GCC_CC} d267 2 a268 1 CPP= ${_GCC_CPP} d273 2 a274 1 CXX= ${_GCC_CXX} d277 4 a280 4 _GCC_F77= ${_GCC_DIR}/bin/g77 _GCC_LINKS+= _GCC_F77 F77= ${_GCC_F77} PKG_FC:= ${F77} @ 1.43 log @I missed changing a defined(_NEED_GCC3) into a yes/no check. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.42 2004/02/06 19:16:37 jlam Exp $ a29 1 . if !empty(_CC:M/*) a30 1 . endif d250 3 d254 23 a276 11 . if exists(${_GCC_PREFIX}bin/gcc) && !empty(_LANGUAGES.gcc:Mc) CC= ${_GCC_PREFIX}bin/gcc . endif . if exists(${_GCC_PREFIX}bin/cpp) && !empty(_LANGUAGES.gcc:Mc) CPP= ${_GCC_PREFIX}bin/cpp . endif . if exists(${_GCC_PREFIX}bin/g++) && !empty(_LANGUAGES.gcc:Mc++) CXX= ${_GCC_PREFIX}bin/g++ . endif . if exists(${_GCC_PREFIX}bin/g77) && !empty(_LANGUAGES.gcc:Mfortran) F77= ${_GCC_PREFIX}bin/g77 a277 1 . endif d289 3 a291 3 . if exists(${CC}) CC_VERSION!= if ${CC} -dumpversion > /dev/null 2>&1; then \ ${ECHO} "gcc-`${CC} -dumpversion`"; \ d311 4 a314 14 . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${_GCC_PREFIX}bin/gcc) && !empty(_LANGUAGES.gcc) . if empty(PREPEND_PATH:M${_GCC_PREFIX}bin) PREPEND_PATH+= ${_GCC_PREFIX}bin PATH:= ${_GCC_PREFIX}bin:${PATH} . endif . endif . elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _CC_DIRPATH= ${_CC:H} . if !empty(_CC_DIRPATH:M/*) . if empty(PREPEND_PATH:M${_CC_DIRPATH}) PREPEND_PATH+= ${_CC_DIRPATH} PATH:= ${_CC_DIRPATH}:${PATH} . endif d336 11 @ 1.42 log @Whitespace nit. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.41 2004/02/06 18:45:03 jlam Exp $ d149 1 a149 1 . if defined(_NEED_GCC3) @ 1.41 log @If we're passing through MAKEFLAGS variables whose values may contain spaces, use the :Q modifier instead of double-quoting the value. This fixes breakage when executing the just-in-time su targetes. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.40 2004/02/06 04:38:10 jlam Exp $ d202 1 a202 1 !empty(_NEED_NEWER_GCC:M[yY][eE][sS]) @ 1.40 log @Remove a debugging statement. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.39 2004/02/06 04:37:02 jlam Exp $ d31 1 a31 1 MAKEFLAGS+= _CC="${_CC}" d199 1 a199 1 MAKEFLAGS+= _NEED_NEWER_GCC="${_NEED_NEWER_GCC}" @ 1.39 log @Hiding the PATH from certain phases of the build only accidentally worked due to a type on gcc.mk that causes the ${_GCC_PREFIX}/bin to always be prepended to the PATH. The problem that was hiding was "make" resolving to ${TOOLS_DIR}/bin/make if the package used GNU make, which broke building since the package Makefile is a BSD Makefile and we passed PATH to some phases of the build. Fix this by expanding MAKE to the full path to ${MAKE} in bsd.prefs.mk. We also garbage collect the now useless checks for PHASES_AFTER_BUILDLINK that cluttered the PREPEND_PATH code. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.38 2004/02/06 03:04:50 jlam Exp $ a301 1 FOO!= echo ${PREPEND_PATH} 1>&2; echo 0 @ 1.38 log @We only prepend a directory to the PATH if we haven't already done so (by checking PREPEND_PATH) and only for those phases of the build that care about the PATH (buildlink or later). We also pass the PATH to those same phases of the build so that executing ${CC} will work correctly from custom {pre,do,post}-* targets that occur at buildlink time or later. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.37 2004/02/05 04:12:28 jlam Exp $ d301 3 a303 3 . if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ empty(PREPEND_PATH:M${_GCC_PREFIX}bin) PREPEND_PATH+= ${GCC_PREFIX}bin d310 1 a310 2 . if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ empty(PREPEND_PATH:M${_CC_DIRPATH}) @ 1.37 log @GCC_REQD should be appended to, not set. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.36 2004/02/05 03:35:20 jlam Exp $ d21 1 d23 3 a25 3 . for _dir_ in ${PATH:C/\:/ /g} . if empty(_CC:M/*) . if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}) d27 1 d29 3 d33 1 a33 1 . endfor d301 5 a305 1 PATH:= ${_GCC_PREFIX}bin:${PATH} d307 7 a313 4 . else . if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) . if !empty(_CC:M/*) PATH:= ${_CC:H}:${PATH} @ 1.36 log @Allow bsd.compiler.mk to be included by both bsd.prefs.mk and bsd.pkg.mk. Any additions to DEPENDS/BUILD_DEPENDS or inclusions of buildlink[23].mk files are deferred till bsd.compiler.mk is included by bsd.pkg.mk. We allow bsd.compiler.mk to be included by bsd.prefs.mk solely for the purpose of setting CC_VERSION properly for use by package Makefiles. There is the surprising behaviour that CC_VERSION won't necessarily have the correct value at all times until after "make extract" has been completed (dependencies are installed before "make extract"), so package Makefile writers should keep that in mind. Just to note that this is _existing_ behaviour that's preserved by these changes. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.35 2004/02/05 01:57:38 jlam Exp $ d6 1 a6 1 GCC_REQD?= 2.8.0 @ 1.35 log @Don't compute the CC_VERSION unless ${CC} exists. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.34 2004/02/05 01:50:55 jlam Exp $ d4 1 a4 1 COMPILER_GCC_MK= defined d22 3 a24 3 .for _dir_ in ${PATH:C/\:/ /g} . if empty(_CC:M/*) . if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}) d26 1 d28 1 a28 2 . endif .endfor d30 1 a30 1 .if !defined(_GCC_VERSION) d33 1 a33 1 . if !empty(_GCC_VERSION_STRING:Megcs*) d35 1 a35 1 . elif !empty(_GCC_VERSION_STRING:Mgcc*) d37 1 a37 1 . else d39 1 a40 1 .endif d43 1 a43 1 .if !empty(_CC:M${LOCALBASE}/*) d46 2 a47 2 .else . if !empty(_CC:M/*) d52 1 a52 1 . if ${_GCC_VERSION} != "0" d54 3 a59 2 . else _IS_BUILTIN_GCC= NO a60 1 .endif d66 3 a68 3 .for _version_ in ${GCC_REQD} . for _pkg_ in gcc-${_version_} . if ${_GCC_STRICTEST_REQD} == "none" d70 2 a71 2 . for _vers_ in ${GCC_REQD} . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) d78 4 a82 3 . endfor . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) _GCC_STRICTEST_REQD= ${_version_} d84 1 a84 1 . endif a85 1 .endfor d90 2 a91 2 .for _pattern_ in ${_GCC2_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) d93 2 a94 2 . endif .endfor d96 2 a97 2 .for _pattern_ in ${_GCC3_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) d99 2 a100 2 . endif .endfor d102 1 a102 1 .if !empty(_NEED_GCC2:M[yY][eE][sS]) d109 1 a109 1 . for _lang_ in ${USE_LANGUAGES} d111 2 a112 2 . endfor . if !empty(PKGPATH:Mlang/gcc) d115 2 a116 2 . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) d119 1 a119 1 . if !empty(_LANGUAGES.gcc:Mc++) d121 1 d123 1 a123 2 . endif .elif !empty(_NEED_GCC3:M[yY][eE][sS]) d130 1 a130 1 . for _lang_ in ${USE_LANGUAGES} d132 2 a133 2 . endfor . if !empty(PKGPATH:Mlang/gcc3-c) d136 2 a137 2 . endif . if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc) d140 1 a141 1 .endif d144 2 a145 2 .if defined(_NEED_GCC3) . if !empty(PKGPATH:Mlang/gcc3-c++) d148 2 a149 2 . endif . if !defined(_IGNORE_GCC3CXX) && !empty(_LANGUAGES.gcc:Mc++) d153 2 a154 2 . endif . if !empty(PKGPATH:Mlang/gcc3-f77) d157 2 a158 2 . endif . if !defined(_IGNORE_GCC3F77) && !empty(_LANGUAGES.gcc:Mfortran) d162 1 a163 1 .endif d165 1 a165 1 .if defined(_IGNORE_GCC) d167 1 a167 1 .endif d169 2 a170 2 .if !defined(_USE_PKGSRC_GCC) . if !empty(_IS_BUILTIN_GCC:M[nN][oO]) d172 1 a172 1 . else d180 1 a181 1 .endif d186 1 a186 1 .if !defined(_NEED_NEWER_GCC) d195 2 a196 2 .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \ d199 1 a199 1 .endif d201 1 a201 1 .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) d232 1 a232 1 . if empty(_GCC_ARCHDIR:M*not_found*) d235 1 a235 1 . endif d238 1 a238 1 . for _dir_ in ${_GCC_LIBDIRS:N*not_found*} d240 1 a240 1 . endfor a241 16 # Add the dependency on GCC. . if empty(USE_BUILDLINK2:M[nN][oO]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink2.mk" . endfor . elif !empty(USE_BUILDLINK3:M[yY][eE][sS]) . for _dir_ in ${_GCC_PKGSRCDIR} . include "${_dir_}/buildlink3.mk" . endfor . else . if defined(USE_GCC_SHLIB) DEPENDS+= ${_GCC_DEPENDENCY} . else BUILD_DEPENDS+= ${_GCC_DEPENDENCY} . endif a242 1 .endif d247 2 a248 5 .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${_GCC_PREFIX}bin/gcc) && !empty(_LANGUAGES.gcc) PATH:= ${_GCC_PREFIX}bin:${PATH} . endif . if exists(${_GCC_PREFIX}bin/gcc) && !empty(_LANGUAGES.gcc:Mc) d250 2 a251 2 . endif . if exists(${_GCC_PREFIX}bin/cpp) && !empty(_LANGUAGES.gcc:Mc) d253 2 a254 2 . endif . if exists(${_GCC_PREFIX}bin/g++) && !empty(_LANGUAGES.gcc:Mc++) d256 2 a257 2 . endif . if exists(${_GCC_PREFIX}bin/g77) && !empty(_LANGUAGES.gcc:Mfortran) a259 5 . endif .else . if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) . if !empty(_CC:M/*) PATH:= ${_CC:H}:${PATH} a261 1 .endif d267 1 a267 1 .if ${OPSYS} == "SunOS" d269 1 a269 1 .endif d271 2 a272 2 .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${CC}) d278 3 d282 1 a282 1 CC_VERSION= gcc-${_GCC_REQD} d284 21 a304 3 .else CC_VERSION= ${_GCC_PKG} .endif d306 20 a325 1 .endif # COMPILER_GCC_MK @ 1.34 log @_CC is really meant to be evaluated from the value of CC _as found_ in that particular location, so set it using := @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.33 2004/02/05 01:42:05 jlam Exp $ d298 1 d304 3 @ 1.33 log @_GCC_PREFIX and _GCC_SUBPREFIX are expected to end in "/" if we're using the pkgsrc gcc. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.32 2004/02/05 01:28:20 jlam Exp $ d21 1 a21 1 _CC= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} d25 1 a25 1 _CC= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} d31 2 a32 1 _GCC_VERSION_STRING!= ( ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) || ${ECHO} 0 @ 1.32 log @Reset the values of _GCC_PREFIX and _GCC_SUBPREFIX from the value of _GCC_ARCHDIR, since _GCC_ARCHDIR is something that GCC actually tells us and can be relied upon to accurately give the installed location of GCC. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.31 2004/02/04 23:25:13 jlam Exp $ d232 2 a233 2 _GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H} _GCC_SUBPREFIX:= ${_GCC_PREFIX:T} @ 1.31 log @Missing a " @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.30 2004/02/04 23:24:36 jlam Exp $ d231 4 @ 1.30 log @case branches are separated by ;; @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.29 2004/02/04 23:10:19 jlam Exp $ d216 1 a216 1 *) ${ECHO} "$${subprefix}/ ;; \ @ 1.29 log @Try to avoid "/" as the _GCC_SUBPREFIX. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.28 2004/02/04 22:33:18 jlam Exp $ d215 2 a216 2 "") ${ECHO} "$${subprefix}"; \ *) ${ECHO} "$${subprefix}/; \ @ 1.28 log @Make it more apparent where certain "not_found" values are being set for debugging purposes. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.27 2004/02/04 00:32:16 jlam Exp $ d213 5 a217 1 ${ECHO} "${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/" ; \ @ 1.27 log @Avoid a non-zero exit value in a != variable definition. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.26 2004/02/04 00:27:24 jlam Exp $ d216 1 a216 1 ${ECHO} "not_found/"; \ d225 1 a225 1 ${ECHO} "not_found"; \ @ 1.26 log @Define _GCC_PKG unconditionally since its value is determined by another global variable, and so that we can reuse it in other places in gcc.mk. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.25 2004/02/04 00:11:07 jlam Exp $ d31 1 a31 1 _GCC_VERSION_STRING!= ( ${_CC} -v || ${ECHO} 0 ) 2>&1 | ${GREP} 'gcc version' @ 1.25 log @Try to be smarter about detecting whether a cc in the PATH is actually GCC. If it's found under ${LOCALBASE}, then assume that it came from a package and proactively require at least that version of GCC so that the correct package dependencies are added. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.24 2004/02/03 22:35:05 jlam Exp $ d40 1 a172 1 _GCC_PKG= gcc-${_GCC_VERSION} @ 1.24 log @Reorder checks when setting _GCC_SUBPREFIX so that we always search for the installed package first if _USE_PKGSRC_GCC is "yes". @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.23 2004/02/03 22:32:22 jlam Exp $ d21 39 a166 28 _CC= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} .for _dir_ in ${PATH:C/\:/ /g} . if empty(_CC:M/*) . if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}) _CC= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} . endif . endif .endfor .if !empty(_CC:M${LOCALBASE}/*) _IS_BUILTIN_GCC= NO .else . if !empty(_CC:M/*) # # GCC in older versions of Darwin report "Apple Computer ... based on gcc # version ...", so we can't just grep for "^gcc". # _IS_BUILTIN_GCC!= \ if ${_CC} -v 2>&1 | ${GREP} -q "gcc version"; then \ ${ECHO} "YES"; \ else \ ${ECHO} "NO"; \ fi . else _IS_BUILTIN_GCC= NO . endif .endif a170 8 _GCC_VERSION_STRING!= ${_CC} -v 2>&1 | ${GREP} 'gcc version' . if !empty(_GCC_VERSION_STRING:Megcs*) _GCC_VERSION= 2.8.1 # egcs is considered to be gcc-2.8.1. . elif !empty(_GCC_VERSION_STRING:Mgcc*) _GCC_VERSION!= ${_CC} -dumpversion . else _GCC_VERSION= 0 . endif @ 1.23 log @Remove not_found checks now that we pre-filter them out when setting LDFLAGS. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.22 2004/02/03 22:31:33 jlam Exp $ a201 3 . if !empty(_CC:M${LOCALBASE}/*) _GCC_SUBPREFIX= ${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/ . else d208 8 a215 1 ${ECHO} "not_found/"; \ a216 1 . endif @ 1.22 log @Do previous in a different way to avoid make errors. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.21 2004/02/03 21:56:40 jlam Exp $ a223 1 . if empty(_dir_:M*not_found*) a224 1 . endif @ 1.21 log @Don't add to LDFLAGS if the directories are "not_found". @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.20 2004/02/03 21:51:45 jlam Exp $ d221 1 d223 1 a223 1 . for _dir_ in ${_GCC_ARCHDIR} ${_GCC_PREFIX}lib @ 1.20 log @":H", not ":T", is the correct make variable modifier to get everything except the final component of a path. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.19 2004/02/03 21:48:14 jlam Exp $ d223 1 d225 1 @ 1.19 log @Reorder sections a bit so that related sections are together. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.18 2004/02/03 21:30:26 jlam Exp $ d203 1 a203 1 _GCC_SUBPREFIX= ${_CC:T:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/ @ 1.18 log @Whitespace nit. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.17 2004/02/03 20:38:39 jlam Exp $ a20 28 _CC= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} .for _dir_ in ${PATH:C/\:/ /g} . if empty(_CC:M/*) . if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}) _CC= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} . endif . endif .endfor .if !empty(_CC:M${LOCALBASE}/*) _IS_BUILTIN_GCC= NO .else . if !empty(_CC:M/*) # # GCC in older versions of Darwin report "Apple Computer ... based on gcc # version ...", so we can't just grep for "^gcc". # _IS_BUILTIN_GCC!= \ if ${_CC} -v 2>&1 | ${GREP} -q "gcc version"; then \ ${ECHO} "YES"; \ else \ ${ECHO} "NO"; \ fi . else _IS_BUILTIN_GCC= NO . endif .endif d128 28 d179 18 a225 19 .endif # Check if any of the versions of GCC in pkgsrc can satisfy the _GCC_REQD # requirement. # .if !defined(_NEED_NEWER_GCC) _PKGSRC_GCC_VERSION= ${_GCC_PKGBASE}-${_GCC_DIST_VERSION} _NEED_NEWER_GCC!= \ if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION}; then \ ${ECHO} "NO"; \ else \ ${ECHO} "YES"; \ fi MAKEFLAGS+= _NEED_NEWER_GCC="${_NEED_NEWER_GCC}" .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \ !empty(_NEED_NEWER_GCC:M[yY][eE][sS]) PKG_SKIP_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}" .endif a227 1 .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) @ 1.17 log @Fix a pervasive cut-and-paste bug: change a = back into a +=. Noted by David Brownlee in private email. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.16 2004/02/03 05:14:03 jlam Exp $ d97 1 a97 1 _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} @ 1.16 log @Check whether _NEED_GCC[23] is yes/no rather than just defined, since that's the way that its set. Also, remove _IGNORE_GCC3C and just overload _IGNORE_GCC to note that we're building the GCC C compiler and that if we're building something that it depends on, then avoid a dependency loop. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.15 2004/02/03 04:09:27 jlam Exp $ d97 1 a97 1 _LANGUAGES.gcc= ${LANGUAGES.gcc:M${_lang_}} d118 1 a118 1 _LANGUAGES.gcc= ${LANGUAGES.gcc:M${_lang_}} @ 1.15 log @Move the _COMPILER_LD_FLAG setting to somehere global as it applies to all GCCs. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.14 2004/02/03 03:47:45 jlam Exp $ d89 1 a89 1 .if defined(_NEED_GCC2) d102 2 a103 1 . elif !empty(_LANGUAGES.gcc) d110 1 a110 1 .elif defined(_NEED_GCC3) d121 4 a124 3 _IGNORE_GCC3C= yes MAKEFLAGS+= _IGNORE_GCC3C=yes . elif !empty(_LANGUAGES.gcc:Mc) d128 4 d135 2 a136 1 . elif !empty(_LANGUAGES.gcc:Mc++) d144 2 a145 1 . elif !empty(_LANGUAGES.gcc:Mfortran) a150 1 _GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD} d152 1 a152 1 .if defined(_IGNORE_GCC) || defined(_IGNORE_GCC3C) @ 1.14 log @Avoid using "type" to find the absolute path to the compiler. We find it ourselves now using some make variable magic. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.13 2004/02/02 12:45:08 jlam Exp $ a176 1 _COMPILER_LD_FLAG= -Wl, d268 3 @ 1.13 log @Whitespace fixes. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.12 2004/02/02 12:44:22 jlam Exp $ d21 13 a33 1 .if !defined(_IS_BUILTIN_GCC) d39 3 a41 3 gccpath="`${TYPE} ${CC} | ${AWK} '{ print $$NF }'`"; \ case $$gccpath in \ ${LOCALBASE}/*) \ d43 4 a46 9 ;; \ *) \ if ${CC} -v 2>&1 | ${GREP} -q 'gcc version'; then \ ${ECHO} "YES"; \ else \ ${ECHO} "NO"; \ fi; \ ;; \ esac d153 1 a153 1 _GCC_VERSION_STRING!= ${CC} -v 2>&1 | ${GREP} 'gcc version' d157 1 a157 1 _GCC_VERSION!= ${CC} -dumpversion d178 3 d187 1 a187 9 gccpath="`${TYPE} ${CC} | ${AWK} '{ print $$NF }'`"; \ case $$gccpath in \ ${LOCALBASE}/*) \ ${ECHO} "`${BASENAME} $$gccpath`/"; \ ;; \ *) \ ${ECHO} "not_found/"; \ ;; \ esac d189 1 d263 3 a265 2 _GCC_PATH!= ${TYPE} ${CC} | ${AWK} '{ print $$NF }' PATH:= ${_GCC_PATH:H}:${PATH} @ 1.12 log @If we can't find the package using pkg_info, then use a simple heuristic to figure out _GCC_SUBPREFIX. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.11 2004/02/02 12:27:12 jlam Exp $ d195 1 a195 1 .for _dir_ in ${_GCC_ARCHDIR} ${_GCC_PREFIX}lib d197 1 a197 1 .endfor @ 1.11 log @G/C _GCC_ARCHSUBDIR. All references to it from gcc*/buildlink*.mk files have been removed. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.10 2004/02/02 10:49:26 jlam Exp $ d177 9 a185 1 ${ECHO} "not_found/"; \ @ 1.10 log @If we need a GCC C++ or Fortran compiler, then define USE_GCC_SHLIBS as all of those programs will link against either libstdc++.so or libg2c.so. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.9 2004/02/02 10:34:00 jlam Exp $ d180 1 a180 1 _GCC_LIBGCCDIR!= \ a185 3 _GCC_ARCHSUBDIR= ${_GCC_LIBGCCDIR:S|^${LOCALBASE}/${_GCC_SUBPREFIX}||} _GCC_ARCHDIR= ${_GCC_PREFIX}${_GCC_ARCHSUBDIR} @ 1.9 log @Rename _GCC{2,3}_REQD to _NEED_GCC{2,3} which more clearly expresses what that variable is used for. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.8 2004/02/02 10:03:46 jlam Exp $ d98 3 d125 1 d133 1 @ 1.8 log @Support a new variable in package Makefiles: USE_LANGUAGES Lists the languages used in the source code of the package, and is used to determine the correct compilers to install. Valid values are: c, c++, fortran, java, objc. The default is "c". Packages that don't need any compilers and set this variable to an empty value, e.g. "USE_LANGUAGES=". This can probably be combined in some smart way with setting USE_GCC_SHLIBS and USE_FORTRAN automatically. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.7 2004/02/01 14:36:23 jlam Exp $ d69 1 d72 1 a72 1 _GCC2_REQD:= ${_GCC_REQD} d75 1 d78 1 a78 1 _GCC3_REQD:= ${_GCC_REQD} d82 1 a82 1 .if defined(_GCC2_REQD) a85 1 _GCC_REQD:= ${_GCC2_REQD} d99 1 a99 1 .elif defined(_GCC3_REQD) a102 1 _GCC_REQD:= ${_GCC3_REQD} @ 1.7 log @Fix a broken conditional. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.6 2004/02/01 14:11:01 jlam Exp $ d79 1 d81 3 d86 5 d94 1 a94 1 . else d99 3 d104 5 d112 1 a112 1 . else d116 1 a116 4 . if !empty(PKGPATH:Mlang/gcc3-c) || \ !empty(PKGPATH:Mlang/gcc3-c++) || \ !empty(PKGPATH:Mlang/gcc3-f77) || \ !defined(USE_CXX) d119 1 a119 1 . else d123 1 a123 4 . if !empty(PKGPATH:Mlang/gcc3-c) || \ !empty(PKGPATH:Mlang/gcc3-c++) || \ !empty(PKGPATH:Mlang/gcc3-f77) || \ !defined(USE_FORTRAN) d126 1 a126 1 . else d232 1 a232 1 . if exists(${_GCC_PREFIX}bin/gcc) d234 2 d238 1 a238 1 . if exists(${_GCC_PREFIX}bin/cpp) d241 1 a241 1 . if exists(${_GCC_PREFIX}bin/g++) d244 1 a244 1 . if exists(${_GCC_PREFIX}bin/g77) @ 1.6 log @Use the gcc3-* packages instead of gcc3. The former are newer, and using them, we can more finely express which compilers we want. @ text @d1 1 a1 1 # $NetBSD$ d102 1 a102 1 !(defined(USE_CXX) && !empty(USE_CXX:M[yY][eE][sS])) d112 1 a112 1 !(defined(USE_FORTRAN) && !empty(USE_FORTRAN:M[yY][eE][sS])) @ 1.5 log @Use _GCC_REQD where we want the strictest value (GCC_REQD can be a list). @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.4 2004/02/01 07:54:33 jlam Exp $ d11 1 a11 1 _GCC_DIST_VERSION= 3.3 d82 4 d87 1 a87 3 . if !empty(PKGPATH:Mlang/gcc) _IGNORE_GCC_REQD= yes MAKEFLAGS+= _IGNORE_GCC_REQD=yes d91 27 a117 5 _GCC_PKGBASE= gcc3 _GCC_PKGSRCDIR= ../../lang/gcc3 . if !empty(PKGPATH:Mlang/gcc3) _IGNORE_GCC_REQD= yes MAKEFLAGS+= _IGNORE_GCC_REQD=yes d122 1 a122 1 .if defined(_IGNORE_GCC_REQD) d201 7 a207 3 . include "${_GCC_PKGSRCDIR}/buildlink2.mk" #. elif !empty(USE_BUILDLINK3:M[yY][eE][sS]) #. include "${_GCC_PKGSRCDIR}/buildlink3.mk" d210 1 a210 1 DEPENDS+= ${_GCC_DEPENDS}:${_GCC_PKGSRCDIR} d212 1 a212 1 BUILD_DEPENDS+= ${_GCC_DEPENDS}:${_GCC_PKGSRCDIR} d224 2 d227 2 d230 2 @ 1.4 log @Actually, it does matter what _GCC_PKG is set to as it's re-used later as the value of CC_VERSION for the builtin compiler. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.3 2004/02/01 01:23:37 jlam Exp $ d114 1 a114 1 _GCC_TEST_DEPENDS= gcc>=${GCC_REQD} @ 1.3 log @Prepend the path to the compiler to PATH even if we're using the builtin compiler. This makes ccache and distcc call the correct compiler from examining the PATH. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.2 2004/02/01 00:59:51 jlam Exp $ d114 2 a115 6 # # Note that the actual package name isn't really important here as we're # just trying to do comparisons of version numbers. # _GCC_TEST_DEPENDS= cc>=${GCC_REQD} _GCC_PKG= cc-${_GCC_VERSION} @ 1.2 log @We're included by bsd.prefs.mk, so no need to include bsd.prefs.mk for anything. @ text @d1 1 a1 1 # $NetBSD: gcc.mk,v 1.1 2004/02/01 00:31:00 jlam Exp $ d205 5 @ 1.1 log @New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...". @ text @d1 1 a1 1 # $NetBSD$ a5 2 .include "../../mk/bsd.prefs.mk" @