head	1.98;
access;
symbols
	RELENG_8_4:1.98.0.2
	RELENG_9_1_0_RELEASE:1.95.2.1.4.2
	RELENG_9_1:1.95.2.1.0.4
	RELENG_9_1_BP:1.95.2.1
	RELENG_8_3_0_RELEASE:1.91.2.2.2.1
	RELENG_8_3:1.91.2.2.0.2
	RELENG_8_3_BP:1.91.2.2
	RELENG_9_0_0_RELEASE:1.95.2.1.2.1
	RELENG_9_0:1.95.2.1.0.2
	RELENG_9_0_BP:1.95.2.1
	RELENG_9:1.95.0.2
	RELENG_9_BP:1.95
	RELENG_7_4_0_RELEASE:1.88.12.1
	RELENG_8_2_0_RELEASE:1.91.2.1.6.1
	RELENG_7_4:1.88.0.12
	RELENG_7_4_BP:1.88
	RELENG_8_2:1.91.2.1.0.6
	RELENG_8_2_BP:1.91.2.1
	RELENG_8_1_0_RELEASE:1.91.2.1.4.1
	RELENG_8_1:1.91.2.1.0.4
	RELENG_8_1_BP:1.91.2.1
	RELENG_7_3_0_RELEASE:1.88.10.1
	RELENG_7_3:1.88.0.10
	RELENG_7_3_BP:1.88
	RELENG_8_0_0_RELEASE:1.91.2.1.2.1
	RELENG_8_0:1.91.2.1.0.2
	RELENG_8_0_BP:1.91.2.1
	RELENG_8:1.91.0.2
	RELENG_8_BP:1.91
	RELENG_7_2_0_RELEASE:1.88.8.1
	RELENG_7_2:1.88.0.8
	RELENG_7_2_BP:1.88
	RELENG_7_1_0_RELEASE:1.88.6.1
	RELENG_6_4_0_RELEASE:1.81.2.3.2.1
	RELENG_7_1:1.88.0.6
	RELENG_7_1_BP:1.88
	RELENG_6_4:1.81.2.3.0.2
	RELENG_6_4_BP:1.81.2.3
	RELENG_7_0_0_RELEASE:1.88
	RELENG_6_3_0_RELEASE:1.81.2.2
	RELENG_7_0:1.88.0.4
	RELENG_7_0_BP:1.88
	RELENG_6_3:1.81.2.2.0.4
	RELENG_6_3_BP:1.81.2.2
	RELENG_7:1.88.0.2
	RELENG_7_BP:1.88
	RELENG_6_2_0_RELEASE:1.81.2.2
	RELENG_6_2:1.81.2.2.0.2
	RELENG_6_2_BP:1.81.2.2
	RELENG_5_5_0_RELEASE:1.79.2.1
	RELENG_5_5:1.79.2.1.0.6
	RELENG_5_5_BP:1.79.2.1
	RELENG_6_1_0_RELEASE:1.81
	RELENG_6_1:1.81.0.6
	RELENG_6_1_BP:1.81
	RELENG_6_0_0_RELEASE:1.81
	RELENG_6_0:1.81.0.4
	RELENG_6_0_BP:1.81
	RELENG_6:1.81.0.2
	RELENG_6_BP:1.81
	RELENG_5_4_0_RELEASE:1.79.2.1
	RELENG_5_4:1.79.2.1.0.4
	RELENG_5_4_BP:1.79.2.1
	RELENG_4_11_0_RELEASE:1.48.2.6
	RELENG_4_11:1.48.2.6.0.10
	RELENG_4_11_BP:1.48.2.6
	RELENG_5_3_0_RELEASE:1.79.2.1
	RELENG_5_3:1.79.2.1.0.2
	RELENG_5_3_BP:1.79.2.1
	RELENG_5:1.79.0.2
	RELENG_5_BP:1.79
	RELENG_4_10_0_RELEASE:1.48.2.6
	RELENG_4_10:1.48.2.6.0.8
	RELENG_4_10_BP:1.48.2.6
	RELENG_5_2_1_RELEASE:1.71
	RELENG_5_2_0_RELEASE:1.71
	RELENG_5_2:1.71.0.2
	RELENG_5_2_BP:1.71
	RELENG_4_9_0_RELEASE:1.48.2.6
	RELENG_4_9:1.48.2.6.0.6
	RELENG_4_9_BP:1.48.2.6
	RELENG_5_1_0_RELEASE:1.68
	RELENG_5_1:1.68.0.2
	RELENG_5_1_BP:1.68
	RELENG_4_8_0_RELEASE:1.48.2.6
	RELENG_4_8:1.48.2.6.0.4
	RELENG_4_8_BP:1.48.2.6
	RELENG_5_0_0_RELEASE:1.66
	RELENG_5_0:1.66.0.2
	RELENG_5_0_BP:1.66
	RELENG_4_7_0_RELEASE:1.48.2.6
	RELENG_4_7:1.48.2.6.0.2
	RELENG_4_7_BP:1.48.2.6
	RELENG_4_6_2_RELEASE:1.48.2.5
	RELENG_4_6_1_RELEASE:1.48.2.5
	RELENG_4_6_0_RELEASE:1.48.2.5
	RELENG_4_6:1.48.2.5.0.2
	RELENG_4_6_BP:1.48.2.5
	RELENG_4_5_0_RELEASE:1.48.2.4
	RELENG_4_5:1.48.2.4.0.2
	RELENG_4_5_BP:1.48.2.4
	WIP_GCC31:1.52.0.2
	WIP_GCC31_BP:1.52
	RELENG_4_4_0_RELEASE:1.48.2.3
	RELENG_4_4:1.48.2.3.0.4
	RELENG_4_4_BP:1.48.2.3
	RELENG_4_3_0_RELEASE:1.48.2.3
	RELENG_4_3:1.48.2.3.0.2
	RELENG_4_3_BP:1.48.2.3
	BEFORE_GCC_2_95_3:1.48.2.3
	BEFORE_GCC_2_95_3_TEST3:1.50
	RELENG_4_2_0_RELEASE:1.48.2.1
	RELENG_4_1_1_RELEASE:1.48.2.1
	PRE_SMPNG:1.49
	RELENG_4_1_0_RELEASE:1.48.2.1
	RELENG_3_5_0_RELEASE:1.14.2.1
	BEFORE_GCC_2_96_SNAPSHOT:1.49
	RELENG_4_0_0_RELEASE:1.48
	RELENG_4:1.48.0.2
	RELENG_4_BP:1.48
	EGCS_11x:1.43.0.2
	RELENG_3_4_0_RELEASE:1.14.2.1
	BEFORE_GCC_2_95_1:1.43
	RELENG_3_3_0_RELEASE:1.14.2.1
	RELENG_3_2_PAO:1.14.0.4
	RELENG_3_2_PAO_BP:1.14
	RELENG_3_2_0_RELEASE:1.14
	RELENG_3_1_0_RELEASE:1.14
	RELENG_3:1.14.0.2
	RELENG_3_BP:1.14
	RELENG_2_2_8_RELEASE:1.1.2.2
	RELENG_3_0_0_RELEASE:1.13
	RELENG_2_2_7_RELEASE:1.1.2.2
	RELENG_2_2_6_RELEASE:1.1.2.1
	RELENG_2_2_5_RELEASE:1.1
	RELENG_2_2_2_RELEASE:1.1
	RELENG_2_2_1_RELEASE:1.1
	RELENG_2_2_0_RELEASE:1.1
	RELENG_2_2:1.1.0.2
	RELENG_2_2_BP:1.1;
locks; strict;
comment	@# @;


1.98
date	2013.01.18.00.34.55;	author svnexp;	state Exp;
branches
	1.98.2.1;
next	1.97;

1.97
date	2012.12.06.01.33.11;	author svnexp;	state Exp;
branches;
next	1.96;

1.96
date	2012.11.17.01.49.09;	author svnexp;	state Exp;
branches;
next	1.95;

1.95
date	2011.04.17.21.03.23;	author dim;	state Exp;
branches
	1.95.2.1;
next	1.94;

1.94
date	2010.11.17.19.54.01;	author tijl;	state Exp;
branches;
next	1.93;

1.93
date	2010.11.10.06.39.49;	author imp;	state Exp;
branches;
next	1.92;

1.92
date	2010.07.10.02.29.22;	author nwhitehorn;	state Exp;
branches;
next	1.91;

1.91
date	2008.09.01.18.46.03;	author obrien;	state Exp;
branches
	1.91.2.1;
next	1.90;

1.90
date	2008.08.31.23.38.28;	author obrien;	state Exp;
branches;
next	1.89;

1.89
date	2007.11.18.11.59.44;	author ache;	state Exp;
branches;
next	1.88;

1.88
date	2007.05.28.00.25.07;	author kan;	state Exp;
branches
	1.88.2.1
	1.88.6.1
	1.88.8.1
	1.88.10.1
	1.88.12.1;
next	1.87;

1.87
date	2007.05.21.12.04.16;	author ru;	state Exp;
branches;
next	1.86;

1.86
date	2007.05.19.07.56.08;	author scottl;	state Exp;
branches;
next	1.85;

1.85
date	2007.05.19.04.25.58;	author kan;	state Exp;
branches;
next	1.84;

1.84
date	2006.09.18.17.08.32;	author imp;	state Exp;
branches;
next	1.83;

1.83
date	2006.09.11.05.12.12;	author imp;	state Exp;
branches;
next	1.82;

1.82
date	2006.03.17.18.54.23;	author ru;	state Exp;
branches;
next	1.81;

1.81
date	2005.06.03.04.21.04;	author kan;	state Exp;
branches
	1.81.2.1;
next	1.80;

1.80
date	2004.08.18.13.21.40;	author ru;	state Exp;
branches;
next	1.79;

1.79
date	2004.08.12.16.36.52;	author kan;	state Exp;
branches
	1.79.2.1;
next	1.78;

1.78
date	2004.07.28.05.27.20;	author kan;	state Exp;
branches;
next	1.77;

1.77
date	2004.06.11.00.35.29;	author peter;	state Exp;
branches;
next	1.76;

1.76
date	2004.06.10.22.18.33;	author peter;	state Exp;
branches;
next	1.75;

1.75
date	2004.02.26.07.08.33;	author bde;	state Exp;
branches;
next	1.74;

1.74
date	2004.01.26.16.12.29;	author kan;	state Exp;
branches;
next	1.73;

1.73
date	2004.01.15.10.07.59;	author ru;	state Exp;
branches;
next	1.72;

1.72
date	2004.01.12.07.46.20;	author ru;	state Exp;
branches;
next	1.71;

1.71
date	2003.07.11.05.37.23;	author kan;	state Exp;
branches;
next	1.70;

1.70
date	2003.06.26.20.34.08;	author peter;	state Exp;
branches;
next	1.69;

1.69
date	2003.06.26.03.02.32;	author peter;	state Exp;
branches;
next	1.68;

1.68
date	2003.05.01.15.00.46;	author obrien;	state Exp;
branches;
next	1.67;

1.67
date	2003.04.26.20.04.37;	author obrien;	state Exp;
branches;
next	1.66;

1.66
date	2002.10.10.04.56.35;	author kan;	state Exp;
branches;
next	1.65;

1.65
date	2002.09.12.15.56.21;	author obrien;	state Exp;
branches;
next	1.64;

1.64
date	2002.05.18.04.49.44;	author obrien;	state Exp;
branches;
next	1.63;

1.63
date	2002.05.16.15.18.13;	author ru;	state Exp;
branches;
next	1.62;

1.62
date	2002.05.15.22.40.50;	author obrien;	state Exp;
branches;
next	1.61;

1.61
date	2002.05.15.21.59.46;	author obrien;	state Exp;
branches;
next	1.60;

1.60
date	2002.05.10.17.42.19;	author obrien;	state Exp;
branches;
next	1.59;

1.59
date	2002.05.10.10.21.19;	author obrien;	state Exp;
branches;
next	1.58;

1.58
date	2002.05.10.10.14.53;	author obrien;	state Exp;
branches;
next	1.57;

1.57
date	2002.05.10.08.54.46;	author obrien;	state Exp;
branches;
next	1.56;

1.56
date	2002.04.05.10.23.19;	author obrien;	state Exp;
branches;
next	1.55;

1.55
date	2002.04.04.18.24.56;	author obrien;	state Exp;
branches;
next	1.54;

1.54
date	2002.04.04.00.11.00;	author obrien;	state Exp;
branches;
next	1.53;

1.53
date	2002.03.02.08.53.36;	author obrien;	state Exp;
branches;
next	1.52;

1.52
date	2001.09.27.17.14.33;	author obrien;	state Exp;
branches
	1.52.2.1;
next	1.51;

1.51
date	2001.03.02.03.00.41;	author obrien;	state Exp;
branches;
next	1.50;

1.50
date	2000.12.03.00.11.19;	author obrien;	state Exp;
branches;
next	1.49;

1.49
date	2000.03.23.10.18.22;	author obrien;	state Exp;
branches;
next	1.48;

1.48
date	2000.01.29.12.38.21;	author obrien;	state Exp;
branches
	1.48.2.1;
next	1.47;

1.47
date	2000.01.24.09.17.07;	author obrien;	state Exp;
branches;
next	1.46;

1.46
date	2000.01.23.22.46.00;	author obrien;	state Exp;
branches;
next	1.45;

1.45
date	99.11.17.15.50.45;	author obrien;	state Exp;
branches;
next	1.44;

1.44
date	99.11.15.04.16.14;	author obrien;	state Exp;
branches;
next	1.43;

1.43
date	99.11.15.00.29.00;	author obrien;	state Exp;
branches;
next	1.42;

1.42
date	99.10.30.08.08.29;	author obrien;	state Exp;
branches;
next	1.41;

1.41
date	99.10.12.20.27.53;	author obrien;	state Exp;
branches;
next	1.40;

1.40
date	99.10.12.20.25.11;	author obrien;	state Exp;
branches;
next	1.39;

1.39
date	99.08.27.23.35.17;	author peter;	state Exp;
branches;
next	1.38;

1.38
date	99.08.19.21.19.36;	author peter;	state Exp;
branches;
next	1.37;

1.37
date	99.08.16.09.55.16;	author obrien;	state Exp;
branches;
next	1.36;

1.36
date	99.08.16.04.10.44;	author obrien;	state Exp;
branches;
next	1.35;

1.35
date	99.08.14.22.40.01;	author obrien;	state Exp;
branches;
next	1.34;

1.34
date	99.07.28.07.22.06;	author obrien;	state Exp;
branches;
next	1.33;

1.33
date	99.07.28.07.19.38;	author obrien;	state Exp;
branches;
next	1.32;

1.32
date	99.04.28.18.48.08;	author obrien;	state Exp;
branches;
next	1.31;

1.31
date	99.04.22.20.12.21;	author obrien;	state Exp;
branches;
next	1.30;

1.30
date	99.04.22.19.35.16;	author obrien;	state Exp;
branches;
next	1.29;

1.29
date	99.04.22.00.20.36;	author obrien;	state Exp;
branches;
next	1.28;

1.28
date	99.04.18.09.44.36;	author obrien;	state Exp;
branches;
next	1.27;

1.27
date	99.04.11.04.32.42;	author bde;	state Exp;
branches;
next	1.26;

1.26
date	99.04.11.04.11.27;	author bde;	state Exp;
branches;
next	1.25;

1.25
date	99.04.09.18.46.48;	author bde;	state Exp;
branches;
next	1.24;

1.24
date	99.04.08.23.37.46;	author obrien;	state Exp;
branches;
next	1.23;

1.23
date	99.04.08.15.11.44;	author peter;	state Exp;
branches;
next	1.22;

1.22
date	99.04.08.12.26.07;	author obrien;	state Exp;
branches;
next	1.21;

1.21
date	99.04.08.09.57.51;	author obrien;	state Exp;
branches;
next	1.20;

1.20
date	99.04.08.09.21.52;	author obrien;	state Exp;
branches;
next	1.19;

1.19
date	99.04.08.07.38.51;	author obrien;	state Exp;
branches;
next	1.18;

1.18
date	99.04.05.10.18.50;	author peter;	state Exp;
branches;
next	1.17;

1.17
date	99.04.04.20.46.52;	author obrien;	state Exp;
branches;
next	1.16;

1.16
date	99.04.04.20.40.45;	author obrien;	state Exp;
branches;
next	1.15;

1.15
date	99.04.04.16.36.34;	author obrien;	state Exp;
branches;
next	1.14;

1.14
date	98.10.16.16.53.15;	author bde;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	98.08.20.21.45.46;	author jb;	state Exp;
branches;
next	1.12;

1.12
date	98.07.07.01.46.41;	author bde;	state Exp;
branches;
next	1.11;

1.11
date	98.04.23.16.30.51;	author bde;	state Exp;
branches;
next	1.10;

1.10
date	98.03.23.11.50.38;	author bde;	state Exp;
branches;
next	1.9;

1.9
date	98.03.12.12.52.24;	author bde;	state Exp;
branches;
next	1.8;

1.8
date	98.03.08.05.29.49;	author peter;	state Exp;
branches;
next	1.7;

1.7
date	98.03.06.13.34.36;	author bde;	state Exp;
branches;
next	1.6;

1.6
date	98.01.25.09.47.46;	author jb;	state Exp;
branches;
next	1.5;

1.5
date	98.01.11.04.13.25;	author jb;	state Exp;
branches;
next	1.4;

1.4
date	97.10.05.09.39.07;	author jkh;	state Exp;
branches;
next	1.3;

1.3
date	97.02.22.15.44.58;	author peter;	state Exp;
branches;
next	1.2;

1.2
date	97.01.14.05.56.55;	author jkh;	state Exp;
branches;
next	1.1;

1.1
date	96.09.19.15.47.16;	author peter;	state Exp;
branches
	1.1.2.1;
next	;

1.98.2.1
date	2013.01.18.00.34.55;	author svnexp;	state dead;
branches;
next	1.98.2.2;

1.98.2.2
date	2013.03.28.13.02.48;	author svnexp;	state Exp;
branches;
next	;

1.95.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.95.2.1.2.1
	1.95.2.1.4.1;
next	1.95.2.2;

1.95.2.2
date	2012.11.17.11.36.13;	author svnexp;	state Exp;
branches;
next	;

1.95.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.95.2.1.2.2;

1.95.2.1.2.2
date	2012.11.17.08.36.13;	author svnexp;	state Exp;
branches;
next	;

1.95.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.95.2.1.4.2;

1.95.2.1.4.2
date	2012.11.17.08.47.03;	author svnexp;	state Exp;
branches;
next	;

1.91.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.91.2.1.2.1
	1.91.2.1.4.1
	1.91.2.1.6.1;
next	1.91.2.2;

1.91.2.2
date	2011.03.14.22.51.51;	author dim;	state Exp;
branches
	1.91.2.2.2.1;
next	1.91.2.3;

1.91.2.3
date	2012.11.17.10.35.58;	author svnexp;	state Exp;
branches;
next	;

1.91.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.91.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.91.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.91.2.2.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.91.2.2.2.2;

1.91.2.2.2.2
date	2012.11.17.08.24.39;	author svnexp;	state Exp;
branches;
next	;

1.88.2.1
date	2012.11.17.08.01.30;	author svnexp;	state Exp;
branches;
next	;

1.88.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.88.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.88.10.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.88.12.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.88.12.2;

1.88.12.2
date	2012.11.17.08.16.39;	author svnexp;	state Exp;
branches;
next	;

1.81.2.1
date	2006.09.29.01.30.37;	author obrien;	state Exp;
branches;
next	1.81.2.2;

1.81.2.2
date	2006.09.29.01.56.01;	author obrien;	state Exp;
branches;
next	1.81.2.3;

1.81.2.3
date	2008.04.18.16.06.46;	author obrien;	state Exp;
branches
	1.81.2.3.2.1;
next	1.81.2.4;

1.81.2.4
date	2012.11.17.07.39.17;	author svnexp;	state Exp;
branches;
next	;

1.81.2.3.2.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.79.2.1
date	2004.09.22.07.11.46;	author ru;	state Exp;
branches;
next	;

1.52.2.1
date	2001.12.18.03.17.06;	author obrien;	state Exp;
branches;
next	1.52.2.2;

1.52.2.2
date	2002.04.04.18.30.56;	author obrien;	state Exp;
branches;
next	1.52.2.3;

1.52.2.3
date	2002.04.06.23.15.14;	author obrien;	state Exp;
branches;
next	1.52.2.4;

1.52.2.4
date	2002.04.15.03.41.47;	author obrien;	state Exp;
branches;
next	;

1.48.2.1
date	2000.07.04.05.42.47;	author obrien;	state Exp;
branches;
next	1.48.2.2;

1.48.2.2
date	2001.03.02.09.21.12;	author obrien;	state Exp;
branches;
next	1.48.2.3;

1.48.2.3
date	2001.03.02.09.24.15;	author obrien;	state Exp;
branches;
next	1.48.2.4;

1.48.2.4
date	2001.09.27.17.15.34;	author obrien;	state Exp;
branches;
next	1.48.2.5;

1.48.2.5
date	2002.03.02.09.24.59;	author obrien;	state Exp;
branches;
next	1.48.2.6;

1.48.2.6
date	2002.06.20.23.13.31;	author obrien;	state Exp;
branches;
next	1.48.2.7;

1.48.2.7
date	2012.11.17.07.23.02;	author svnexp;	state Exp;
branches;
next	;

1.14.2.1
date	99.08.29.14.32.40;	author peter;	state Exp;
branches;
next	;

1.1.2.1
date	97.10.26.22.47.42;	author jkh;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	98.07.08.13.03.06;	author jkh;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	99.09.05.11.06.19;	author peter;	state Exp;
branches;
next	;


desc
@@


1.98
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/245539
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/gnu/usr.bin/cc/cc_tools/Makefile 245539 2013-01-17 05:56:28Z andrew $

.include <bsd.own.mk>

CFLAGS+=	-I.

.include "../Makefile.inc"

CFLAGS+=	-g
CFLAGS+=	-DGENERATOR_FILE -DHAVE_CONFIG_H

# Override LIBIBERTY set by Makefile.inc, We use our own for
# build tools.
LIBIBERTY=	libiberty.a

.PATH:	${GCCDIR} ${GCCLIB}/libiberty

#-----------------------------------------------------------------------
# Determine content of variables used by the target/host config files

#
# The list of headers to go into tm.h
#
TARGET_INC+=	options.h
.if ${TARGET_CPUARCH} == "amd64"
TARGET_INC+=	i386/biarch64.h
.endif
.if ${TARGET_CPUARCH} != "arm"
TARGET_INC+=	${GCC_CPU}/${GCC_CPU}.h
.endif
.if ${TARGET_CPUARCH} == "i386" || ${TARGET_CPUARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/unix.h
TARGET_INC+=	${GCC_CPU}/att.h
.endif
TARGET_INC+=	dbxelf.h
TARGET_INC+=	elfos-undef.h
TARGET_INC+=	elfos.h
TARGET_INC+=	freebsd-native.h
TARGET_INC+=	freebsd-spec.h
TARGET_INC+=	freebsd.h
.if ${TARGET_CPUARCH} != "i386" && ${TARGET_CPUARCH} != "amd64"
. if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
TARGET_INC+=	${GCC_CPU}/sysv4.h
. endif
.endif
.if ${TARGET_CPUARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/x86-64.h
.endif
.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "mips"
TARGET_INC+=	${GCC_CPU}/elf.h
.endif
.if ${TARGET_CPUARCH} == "arm"
TARGET_INC+=	${GCC_CPU}/aout.h
.if ${MK_ARM_EABI} != "no"
TARGET_INC+=	${GCC_CPU}/bpabi.h
.endif
.endif
.if ${TARGET_ARCH} == "powerpc64"
TARGET_INC+=	${GCC_CPU}/biarch64.h
TARGET_INC+=    ${GCC_CPU}/default64.h
.endif
TARGET_INC+=	${GCC_CPU}/freebsd.h
.if ${TARGET_CPUARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/freebsd64.h
.endif
.if ${TARGET_CPUARCH} == "arm"
TARGET_INC+=	${GCC_CPU}/arm.h
.endif
TARGET_INC+=	defaults.h

.for H in ${TARGET_INC}
.for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR}
.if exists($D/$H)
TARGET_INC_FILES+=     $D/$H
.endif
.endfor
.endfor

#
# gtyp includes.
#
srcdir=		${GCCDIR}
CPPLIB_H=	${GCCLIB}/libcpp/include/line-map.h \
		${GCCLIB}/libcpp/include/cpplib.h
SYMTAB_H=	${GCCLIB}/libcpp/include/symtab.h
CPP_ID_DATA_H=	${CPPLIB_H} ${GCCLIB}/libcpp/include/cpp-id-data.h
HASHTAB_H=	${GCCLIB}/include/hashtab.h
SPLAY_TREE_H=	${GCCLIB}/include/splay-tree.h
out_file=	${srcdir}/config/${GCC_CPU}/${GCC_CPU}.c
tm_file_list=	${TARGET_INC_FILES}
host_xm_file_list= ${.CURDIR}/auto-host.h ${GCCLIB}/include/ansidecl.h
GTFILES_SRCDIR=	${srcdir}

# Copied unchanged from gcc/Makefile.in
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
  $(CPP_ID_DATA_H) $(host_xm_file_list) \
  $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
  $(srcdir)/coverage.c $(srcdir)/rtl.h \
  $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
  $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
  $(srcdir)/ipa-reference.h $(srcdir)/output.h \
  $(srcdir)/cselib.h $(srcdir)/basic-block.h  $(srcdir)/cgraph.h \
  $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
  $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
  $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \
  $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
  $(srcdir)/dojump.c $(srcdir)/tree-profile.c \
  $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
  $(srcdir)/function.c $(srcdir)/except.h \
  $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
  $(srcdir)/profile.c $(srcdir)/regclass.c \
  $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
  $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
  $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
  $(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
  $(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parser.c \
  $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
  $(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
  $(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \
  $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
  $(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \
  $(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
  $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
  $(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
  $(srcdir)/tree-ssa-structalias.c \
  $(srcdir)/c-pragma.h $(srcdir)/omp-low.c \
  $(srcdir)/targhooks.c $(srcdir)/cgraphunit.c $(out_file) \

# The list of frontend directories to look into
GTFILES_LANG_DIR_NAMES=

.if ${MK_CXX} != "no"
GTFILES_LANG_DIR_NAMES+=	cp
.endif

# The list of language specific files for gengtype
.for L in ${GTFILES_LANG_DIR_NAMES} c
.if exists(${GCCDIR}/$L-config-lang.in)
# Source the language config file
L_GTFILES!=	sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles'
.else
L_GTFILES!=	sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles'
.endif
.for F in ${L_GTFILES}
GTFILES_FILES+=	$F
GTFILES_LANGS+= $L
.endfor
.endfor
GTFILES+=	${GTFILES_FILES}

#
# Tree definition files.
#
TREE_DEF_FILES=

.if ${MK_CXX} != "no"
TREE_DEF_FILES+=	cp/cp-tree.def
.endif

#
# Option files.
#
OPT_FILES=	c.opt common.opt

.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt)
OPT_FILES+=	${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt
.endif

.if exists(${.CURDIR}/${GCC_CPU}-freebsd.opt)
OPT_FILES+=	${.CURDIR}/${GCC_CPU}-freebsd.opt
.endif

.if ${TARGET_CPUARCH} == "powerpc"
OPT_FILES+=	${GCCDIR}/config/${GCC_CPU}/sysv4.opt
.endif

.if ${TARGET_CPUARCH} == "sparc64"
OPT_FILES+=	${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt
.endif

.if exists(${.CURDIR}/freebsd.opt)
OPT_FILES+=	${.CURDIR}/freebsd.opt
.endif

#-----------------------------------------------------------------------
# Build rules for header files and generator tools

# Host config
config.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="auto-host.h ansidecl.h" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}

GENSRCS+=	config.h
CLEANFILES+=	cs-config.h

# Build config
bconfig.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="auto-host.h ansidecl.h" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
	echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif

GENSRCS+=	bconfig.h
CLEANFILES+=	cs-bconfig.h

# tconfig.h
tconfig.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="auto-host.h ansidecl.h" \
	DEFINES="USED_FOR_TARGET" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}

GENSRCS+=	tconfig.h
CLEANFILES+=	cs-tconfig.h
# Options
optionlist: ${OPT_FILES}
	LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET}

options.h:	optionlist
	LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \
	    -f ${GCCDIR}/opth-gen.awk \
		< ${.ALLSRC} > ${.TARGET}

options.c:	optionlist
	LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \
	    -f ${GCCDIR}/optc-gen.awk \
		-v header_name="config.h system.h coretypes.h tm.h" \
		< ${.ALLSRC} > ${.TARGET}
GENONLY+=	optionlist options.h options.c

# Target machine config
tm.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="${TARGET_INC}" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
	echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif

GENSRCS+=	tm.h
CLEANFILES+=	cs-tm.h

# Target machine protos/preds.
tm_p.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="${GCC_CPU}/${GCC_CPU}-protos.h tm-preds.h" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh tm_p.h

GENSRCS+=	tm_p.h
CLEANFILES+=	cs-tm_p.h

# gencheck
gencheck.h: ${TREE_DEF_FILES}
.for F in ${TREE_DEF_FILES}
	echo "#include \"$F\""					>> ${.TARGET}
.endfor
	touch ${.TARGET}

GENSRCS+=	gencheck.h


# Source header for gtyp generator.
gtyp-gen.h:	${GTFILES}
	echo "/* This file is machine generated.  Do not edit.  */" > ${.TARGET}
	echo "static const char * const srcdir = "		>> ${.TARGET}
	echo "\"$(GTFILES_SRCDIR)\";"				>> ${.TARGET}
	echo "static const char * const lang_files[] = {"	>> ${.TARGET}
.for F in ${GTFILES_FILES}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}
	echo "static const char * const langs_for_lang_files[] = {">> ${.TARGET}
.for F in ${GTFILES_LANGS}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}
	echo "static const char * const all_files[] = {"	>> ${.TARGET}
.for F in ${GTFILES}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}
	echo "static const char * const lang_dir_names[] = {"	>> ${.TARGET}
.for F in c ${GTFILES_LANG_DIR_NAMES}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}

GENSRCS+=	gtyp-gen.h

# Version header for gcov
gcov-iov.h:
	echo "#define GCOV_VERSION ((gcov_unsigned_t)0x34303270)" >> ${.TARGET}

GENSRCS+=	gcov-iov.h

# Multilib config file
multilib.h:
.if ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH} == "amd64"
	echo 'static const char *const multilib_raw[] = { \
	    ". !m64 !m32;", \
	    "64:../lib m64 !m32;", \
	    "32:../lib32 !m64 m32;", NULL };'			> ${.TARGET}
	echo 'static const char *multilib_options = "m64/m32";'	>> ${.TARGET}
	echo 'static const char *const multilib_matches_raw[] = { \
	    "m64 m64;", "m32 m32;", NULL };'			>> ${.TARGET}
.else
	echo 'static const char *const multilib_raw[] = { \
	    ". ;", NULL };'					> ${.TARGET}
	echo 'static const char *multilib_options = "";'	>> ${.TARGET}
	echo 'static const char *const multilib_matches_raw[] = { \
	    NULL };'						>> ${.TARGET}
.endif
	echo 'static const char *multilib_extra = "";'		>> ${.TARGET}
	echo 'static const char *const multilib_exclusions_raw[] = { \
	    NULL };'						>> ${.TARGET}

GENSRCS+=	multilib.h

configargs.h:
	echo 'static const char configuration_arguments[] ='	> ${.TARGET}
	echo '	"FreeBSD/${TARGET_ARCH} system compiler";'	>> ${.TARGET}
	echo 'static const char thread_model[] = "posix";'	>> ${.TARGET}
	echo 'static const struct {'				>> ${.TARGET}
	echo '	const char *name, *value;'			>> ${.TARGET}
	echo '} configure_default_options[] = {'		>> ${.TARGET}
	echo '	{ "NULL", "NULL" } };'				>> ${.TARGET}

GENSRCS+=	configargs.h

# Language spec files
specs.h:
	echo '#include "cp/lang-specs.h"'			> ${.TARGET}

GENSRCS+=	specs.h

gstdint.h:
	echo '#include "sys/types.h"'				> ${.TARGET}
	echo '#include "sys/stdint.h"'				>> ${.TARGET}

GENSRCS+=	gstdint.h

# Linked headers
gthr-default.h: ${GCCDIR}/gthr-posix.h
	ln -sf ${.ALLSRC} ${.TARGET}

GENSRCS+=	gthr-default.h

.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
.else
unwind.h: ${GCCDIR}/unwind-generic.h
.endif

unwind.h:
	ln -sf ${.ALLSRC} ${.TARGET}

GENSRCS+=	unwind.h

#
# gtype gunk
#
gengtype-lex.c:	gengtype-lex.l
	flex -ogengtype-lex.c ${.ALLSRC}

gengtype-yacc.h: gengtype-yacc.y
	yacc -d -o gengtype-yacc.c ${.ALLSRC}

gengtype-yacc.c: gengtype-yacc.h

gengtype-yacc+%DIKED.c: gengtype-yacc.c
	cat    ${.ALLSRC} > ${.TARGET}
	sed -e "s/xmalloc/malloc/g" \
	    -e "s/xrealloc/realloc/g" \
	    -e "s/malloc/xmalloc/g" \
	    -e "s/realloc/xrealloc/g" \
	    ${.ALLSRC} > ${.TARGET}

GENSRCS+= gengtype-lex.c gengtype-yacc.h gengtype-yacc+%DIKED.c
CLEANFILES+= gengtype-yacc.c

gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \
	  ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

gtype-desc.h:	gengtype
	./gengtype
	touch ${.TARGET}

gtype-desc.c:	gtype-desc.h

GENONLY+=	gtype-desc.c gtype-desc.h
CLEANFILES+=	gt-*.h gtype-*.h

#
# Generator tools.
#
.for F in check checksum genrtl modes
gen$F:	gen$F.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
.endfor

.for F in attr attrtab automata codes conditions config constants emit \
	extract flags  opinit output peep preds recog
gen$F:	gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \
	gensupport.o print-rtl.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
.endfor

gencondmd:	gencondmd.o
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

#
# Generated .md files.
#
insn-conditions.md:	gencondmd
	./gencondmd > ${.TARGET}
GENSRCS+=	insn-conditions.md

#
# Generated header files.
#

.for F in constants
insn-$F.h:	gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > ${.TARGET}
GENSRCS+=	insn-$F.h
.endfor

.for F in attr codes config flags
insn-$F.h:	gen$F ${MD_FILE} insn-conditions.md
	./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
GENSRCS+=	insn-$F.h
.endfor

# Header files with irregular names.
genrtl.h:	gengenrtl
	./gengenrtl -h > ${.TARGET}
GENSRCS+=	genrtl.h

tm-preds.h:	genpreds
	./genpreds -h ${MD_FILE} > ${.TARGET}
GENSRCS+=	tm-preds.h

tm-constrs.h:	genpreds
	./genpreds -c ${MD_FILE} > ${.TARGET}
GENSRCS+=	tm-constrs.h

tree-check.h:	gencheck
	./gencheck > ${.TARGET}
GENSRCS+=	tree-check.h

insn-modes.h:	genmodes
	./genmodes -h > ${.TARGET}
GENSRCS+=	insn-modes.h

#
# Generated source files.
#
.for F in attrtab automata emit extract opinit output peep preds recog
insn-$F.c:	gen$F ${MD_FILE} insn-conditions.md
	./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
GENONLY+=	insn-$F.c
.endfor

.for F in conditions
insn-$F.c:	gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > ${.TARGET}
GENSRCS+=	insn-$F.c
.endfor

# Source files with irregular names.
insn-modes.c:	genmodes
	./genmodes > ${.TARGET}
GENONLY+=	insn-modes.c

min-insn-modes.c:	genmodes
	./genmodes -m > ${.TARGET}
GENSRCS+=	min-insn-modes.c

genrtl.c:	gengenrtl
	./gengenrtl > ${.TARGET}
GENONLY+=	genrtl.c

gencondmd.c:	genconditions ${MD_FILE}
	./genconditions ${MD_FILE} > ${.TARGET}
GENSRCS+=	gencondmd.c

#-----------------------------------------------------------------------
# Build tools.

GNTOOLS+=	genattr genattrtab genautomata gencodes gencheck genchecksum \
		genconditions gencondmd genconfig genconstants genemit \
		genextract genflags gengenrtl gengtype genmodes genopinit \
		genoutput genpeep genpreds genrecog

all: ${GNTOOLS} ${GENSRCS} ${GENONLY}
beforedepend: ${GENONLY}

#
#-----------------------------------------------------------------------
# Build 'pocket' libiberty exclusively for build tools use.

LIBIBERTY_SRCS=	choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
	dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \
	hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \
	partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \
	xmalloc.c xmemdup.c xstrdup.c xstrerror.c
LIBIBERTY_OBJS=	${LIBIBERTY_SRCS:R:S/$/.o/g}

.for _src in ${LIBIBERTY_SRCS}
${_src:R:S/$/.o/}: ${_src}
	${CC} -c -I ${.CURDIR}/../libiberty ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor

${LIBIBERTY}: ${LIBIBERTY_OBJS}
	@@rm -f ${.TARGET}
	@@${AR} ${ARFLAGS} ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
	${RANLIB} ${.TARGET}
CLEANFILES+=	${LIBIBERTY} ${LIBIBERTY_OBJS}


#-----------------------------------------------------------------------
# Fixups.

# Set OBJS the same as bsd.prog.mk would do if we defined PROG.  We can't
# define PROG because we have multiple programs.
#
SRCS=		errors.c genattr.c genattrtab.c \
		genautomata.c gencheck.c genchecksum.c gencodes.c \
		genconditions.c genconfig.c genconstants.c genemit.c \
		genextract.c genflags.c gengenrtl.c gengtype.c genmodes.c \
		genopinit.c genoutput.c genpeep.c genpreds.c genrecog.c \
		gensupport.c ggc-none.c print-rtl.c read-rtl.c rtl.c \
		vec.c

SRCS+=		${GENSRCS}
OBJS+=		${SRCS:N*.h:R:S/$/.o/g}
GENOBJS+=	${GENSRCS:N*.h:R:S/$/.o/g}
CLEANFILES+=	${GENSRCS} ${GENONLY} ${GENOBJS} ${GNTOOLS}

#-----------------------------------------------------------------------
# Manual dependencies.
.if !exists(${DEPENDFILE})
.include  "Makefile.dep"
.endif

.include <bsd.prog.mk>
# DO NOT DELETE
@


1.98.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:02:48 +0000
@
text
@d1 555
@


1.98.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 551
# $FreeBSD: releng/8.4/gnu/usr.bin/cc/cc_tools/Makefile 219648 2011-03-14 22:51:51Z dim $

.include <bsd.own.mk>

CFLAGS+=	-I.

.include "../Makefile.inc"

CFLAGS+=	-g
CFLAGS+=	-DGENERATOR_FILE -DHAVE_CONFIG_H

# Override LIBIBERTY set by Makefile.inc, We use our own for
# build tools.
LIBIBERTY=	libiberty.a

.PATH:	${GCCDIR} ${GCCLIB}/libiberty

#-----------------------------------------------------------------------
# Determine content of variables used by the target/host config files

#
# The list of headers to go into tm.h
#
TARGET_INC+=	options.h
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+=	i386/biarch64.h
.endif
.if ${TARGET_ARCH} != "arm"
TARGET_INC+=	${GCC_CPU}/${GCC_CPU}.h
.endif
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/unix.h
TARGET_INC+=	${GCC_CPU}/att.h
.endif
TARGET_INC+=	dbxelf.h
TARGET_INC+=	elfos-undef.h
TARGET_INC+=	elfos.h
TARGET_INC+=	freebsd-native.h
TARGET_INC+=	freebsd-spec.h
TARGET_INC+=	freebsd.h
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
. if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
TARGET_INC+=	${GCC_CPU}/sysv4.h
. endif
.endif
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/x86-64.h
.endif
.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "mips"
TARGET_INC+=	${GCC_CPU}/elf.h
.endif
.if ${TARGET_ARCH} == "arm"
TARGET_INC+=	${GCC_CPU}/aout.h
.endif
TARGET_INC+=	${GCC_CPU}/freebsd.h
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/freebsd64.h
.endif
.if ${TARGET_ARCH} == "arm"
TARGET_INC+=	${GCC_CPU}/arm.h
.endif
TARGET_INC+=	defaults.h

.for H in ${TARGET_INC}
.for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR}
.if exists($D/$H)
TARGET_INC_FILES+=     $D/$H
.endif
.endfor
.endfor

#
# gtyp includes.
#
srcdir=		${GCCDIR}
CPPLIB_H=	${GCCLIB}/libcpp/include/line-map.h \
		${GCCLIB}/libcpp/include/cpplib.h
SYMTAB_H=	${GCCLIB}/libcpp/include/symtab.h
CPP_ID_DATA_H=	${CPPLIB_H} ${GCCLIB}/libcpp/include/cpp-id-data.h
HASHTAB_H=	${GCCLIB}/include/hashtab.h
SPLAY_TREE_H=	${GCCLIB}/include/splay-tree.h
out_file=	${srcdir}/config/${GCC_CPU}/${GCC_CPU}.c
tm_file_list=	${TARGET_INC_FILES}
host_xm_file_list= ${.CURDIR}/auto-host.h ${GCCLIB}/include/ansidecl.h
GTFILES_SRCDIR=	${srcdir}

# Copied unchanged from gcc/Makefile.in
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
  $(CPP_ID_DATA_H) $(host_xm_file_list) \
  $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
  $(srcdir)/coverage.c $(srcdir)/rtl.h \
  $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
  $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
  $(srcdir)/ipa-reference.h $(srcdir)/output.h \
  $(srcdir)/cselib.h $(srcdir)/basic-block.h  $(srcdir)/cgraph.h \
  $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
  $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
  $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \
  $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
  $(srcdir)/dojump.c $(srcdir)/tree-profile.c \
  $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
  $(srcdir)/function.c $(srcdir)/except.h \
  $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
  $(srcdir)/profile.c $(srcdir)/regclass.c \
  $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
  $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
  $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
  $(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
  $(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parser.c \
  $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
  $(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
  $(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \
  $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
  $(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \
  $(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
  $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
  $(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
  $(srcdir)/tree-ssa-structalias.c \
  $(srcdir)/c-pragma.h $(srcdir)/omp-low.c \
  $(srcdir)/targhooks.c $(srcdir)/cgraphunit.c $(out_file) \

# The list of frontend directories to look into
GTFILES_LANG_DIR_NAMES=

.if ${MK_CXX} != "no"
GTFILES_LANG_DIR_NAMES+=	cp
.endif

.if ${MK_OBJC} != "no"
GTFILES_LANG_DIR_NAMES+=	objc
.endif

# The list of language specific files for gengtype
.for L in ${GTFILES_LANG_DIR_NAMES} c
.if exists(${GCCDIR}/$L-config-lang.in)
# Source the language config file
L_GTFILES!=	sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles'
.else
L_GTFILES!=	sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles'
.endif
.for F in ${L_GTFILES}
GTFILES_FILES+=	$F
GTFILES_LANGS+= $L
.endfor
.endfor
GTFILES+=	${GTFILES_FILES}

#
# Tree definition files.
#
TREE_DEF_FILES=

.if ${MK_CXX} != "no"
TREE_DEF_FILES+=	cp/cp-tree.def
.endif

.if ${MK_OBJC} != "no"
TREE_DEF_FILES+=	objc/objc-tree.def
.endif

#
# Option files.
#
OPT_FILES=	c.opt common.opt

.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt)
OPT_FILES+=	${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt
.endif

.if exists(${.CURDIR}/${GCC_CPU}-freebsd.opt)
OPT_FILES+=	${.CURDIR}/${GCC_CPU}-freebsd.opt
.endif

.if ${TARGET_ARCH} == "powerpc"
OPT_FILES+=	${GCCDIR}/config/${GCC_CPU}/sysv4.opt
.endif

.if ${TARGET_ARCH} == "sparc64"
OPT_FILES+=	${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt
.endif

.if exists(${.CURDIR}/freebsd.opt)
OPT_FILES+=	${.CURDIR}/freebsd.opt
.endif

#-----------------------------------------------------------------------
# Build rules for header files and generator tools

# Host config
config.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="auto-host.h ansidecl.h" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}

GENSRCS+=	config.h
CLEANFILES+=	cs-config.h

# Build config
bconfig.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="auto-host.h ansidecl.h" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
	echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif

GENSRCS+=	bconfig.h
CLEANFILES+=	cs-bconfig.h

# tconfig.h
tconfig.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="auto-host.h ansidecl.h" \
	DEFINES="USED_FOR_TARGET" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}

GENSRCS+=	tconfig.h
CLEANFILES+=	cs-tconfig.h
# Options
optionlist: ${OPT_FILES}
	LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET}

options.h:	optionlist
	LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \
	    -f ${GCCDIR}/opth-gen.awk \
		< ${.ALLSRC} > ${.TARGET}

options.c:	optionlist
	LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \
	    -f ${GCCDIR}/optc-gen.awk \
		-v header_name="config.h system.h coretypes.h tm.h" \
		< ${.ALLSRC} > ${.TARGET}
GENONLY+=	optionlist options.h options.c

# Target machine config
tm.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="${TARGET_INC}" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
	echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif

GENSRCS+=	tm.h
CLEANFILES+=	cs-tm.h

# Target machine protos/preds.
tm_p.h:
	TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
	HEADERS="${GCC_CPU}/${GCC_CPU}-protos.h tm-preds.h" \
	DEFINES="" \
	/bin/sh ${GCCDIR}/mkconfig.sh tm_p.h

GENSRCS+=	tm_p.h
CLEANFILES+=	cs-tm_p.h

# gencheck
gencheck.h: ${TREE_DEF_FILES}
.for F in ${TREE_DEF_FILES}
	echo "#include \"$F\""					>> ${.TARGET}
.endfor
	touch ${.TARGET}

GENSRCS+=	gencheck.h


# Source header for gtyp generator.
gtyp-gen.h:	${GTFILES}
	echo "/* This file is machine generated.  Do not edit.  */" > ${.TARGET}
	echo "static const char * const srcdir = "		>> ${.TARGET}
	echo "\"$(GTFILES_SRCDIR)\";"				>> ${.TARGET}
	echo "static const char * const lang_files[] = {"	>> ${.TARGET}
.for F in ${GTFILES_FILES}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}
	echo "static const char * const langs_for_lang_files[] = {">> ${.TARGET}
.for F in ${GTFILES_LANGS}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}
	echo "static const char * const all_files[] = {"	>> ${.TARGET}
.for F in ${GTFILES}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}
	echo "static const char * const lang_dir_names[] = {"	>> ${.TARGET}
.for F in c ${GTFILES_LANG_DIR_NAMES}
	echo "\"$F\", "						>> ${.TARGET}
.endfor
	echo "NULL};"						>> ${.TARGET}

GENSRCS+=	gtyp-gen.h

# Version header for gcov
gcov-iov.h:
	echo "#define GCOV_VERSION ((gcov_unsigned_t)0x34303270)" >> ${.TARGET}

GENSRCS+=	gcov-iov.h

# Multilib config file
multilib.h:
.if ${TARGET_ARCH} == "amd64"
	echo 'static const char *const multilib_raw[] = { \
	    ". !m64 !m32;", \
	    "64:../lib m64 !m32;", \
	    "32:../lib32 !m64 m32;", NULL };'			> ${.TARGET}
	echo 'static const char *const multilib_matches_raw[] = { \
	    "m64 m64;", "m32 m32;", NULL };'			>> ${.TARGET}
	echo 'static const char *multilib_options = "m64/m32";'	>> ${.TARGET}
.else
	echo 'static const char *const multilib_raw[] = { \
	    ". ;", NULL };'					> ${.TARGET}
	echo 'static const char *const multilib_matches_raw[] = { \
	    NULL };'						>> ${.TARGET}
	echo 'static const char *multilib_options = "";'	>> ${.TARGET}
.endif
	echo 'static const char *multilib_extra = "";'		>> ${.TARGET}
	echo 'static const char *const multilib_exclusions_raw[] = { \
	    NULL };'						>> ${.TARGET}

GENSRCS+=	multilib.h

configargs.h:
	echo 'static const char configuration_arguments[] ='	> ${.TARGET}
	echo '	"FreeBSD/${TARGET_ARCH} system compiler";'	>> ${.TARGET}
	echo 'static const char thread_model[] = "posix";'	>> ${.TARGET}
	echo 'static const struct {'				>> ${.TARGET}
	echo '	const char *name, *value;'			>> ${.TARGET}
	echo '} configure_default_options[] = {'		>> ${.TARGET}
	echo '	{ "NULL", "NULL" } };'				>> ${.TARGET}

GENSRCS+=	configargs.h

# Language spec files
specs.h:
	echo '#include "cp/lang-specs.h"'			> ${.TARGET}
	echo '#include "objc/lang-specs.h"'			>> ${.TARGET}

GENSRCS+=	specs.h

gstdint.h:
	echo '#include "sys/types.h"'				> ${.TARGET}
	echo '#include "sys/stdint.h"'				>> ${.TARGET}

GENSRCS+=	gstdint.h

# Linked headers
gthr-default.h: ${GCCDIR}/gthr-posix.h
	ln -sf ${.ALLSRC} ${.TARGET}

GENSRCS+=	gthr-default.h

unwind.h: ${GCCDIR}/unwind-generic.h
	ln -sf ${.ALLSRC} ${.TARGET}

GENSRCS+=	unwind.h

#
# gtype gunk
#
gengtype-lex.c:	gengtype-lex.l
	flex -ogengtype-lex.c ${.ALLSRC}

gengtype-yacc.h: gengtype-yacc.y
	yacc -d -o gengtype-yacc.c ${.ALLSRC}

gengtype-yacc.c: gengtype-yacc.h

gengtype-yacc+%DIKED.c: gengtype-yacc.c
	cat    ${.ALLSRC} > ${.TARGET}
	sed -e "s/xmalloc/malloc/g" \
	    -e "s/xrealloc/realloc/g" \
	    -e "s/malloc/xmalloc/g" \
	    -e "s/realloc/xrealloc/g" \
	    ${.ALLSRC} > ${.TARGET}

GENSRCS+= gengtype-lex.c gengtype-yacc.h gengtype-yacc+%DIKED.c
CLEANFILES+= gengtype-yacc.c

gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \
	  ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

gtype-desc.h:	gengtype
	./gengtype
	touch ${.TARGET}

gtype-desc.c:	gtype-desc.h

GENONLY+=	gtype-desc.c gtype-desc.h
CLEANFILES+=	gt-*.h gtype-*.h

#
# Generator tools.
#
.for F in check checksum genrtl modes
gen$F:	gen$F.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
.endfor

.for F in attr attrtab automata codes conditions config constants emit \
	extract flags  opinit output peep preds recog
gen$F:	gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \
	gensupport.o print-rtl.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
.endfor

gencondmd:	gencondmd.o
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

#
# Generated .md files.
#
insn-conditions.md:	gencondmd
	./gencondmd > ${.TARGET}
GENSRCS+=	insn-conditions.md

#
# Generated header files.
#

.for F in constants
insn-$F.h:	gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > ${.TARGET}
GENSRCS+=	insn-$F.h
.endfor

.for F in attr codes config flags
insn-$F.h:	gen$F ${MD_FILE} insn-conditions.md
	./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
GENSRCS+=	insn-$F.h
.endfor

# Header files with irregular names.
genrtl.h:	gengenrtl
	./gengenrtl -h > ${.TARGET}
GENSRCS+=	genrtl.h

tm-preds.h:	genpreds
	./genpreds -h ${MD_FILE} > ${.TARGET}
GENSRCS+=	tm-preds.h

tm-constrs.h:	genpreds
	./genpreds -c ${MD_FILE} > ${.TARGET}
GENSRCS+=	tm-constrs.h

tree-check.h:	gencheck
	./gencheck > ${.TARGET}
GENSRCS+=	tree-check.h

insn-modes.h:	genmodes
	./genmodes -h > ${.TARGET}
GENSRCS+=	insn-modes.h

#
# Generated source files.
#
.for F in attrtab automata emit extract opinit output peep preds recog
insn-$F.c:	gen$F ${MD_FILE} insn-conditions.md
	./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
GENONLY+=	insn-$F.c
.endfor

.for F in conditions
insn-$F.c:	gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > ${.TARGET}
GENSRCS+=	insn-$F.c
.endfor

# Source files with irregular names.
insn-modes.c:	genmodes
	./genmodes > ${.TARGET}
GENONLY+=	insn-modes.c

min-insn-modes.c:	genmodes
	./genmodes -m > ${.TARGET}
GENSRCS+=	min-insn-modes.c

genrtl.c:	gengenrtl
	./gengenrtl > ${.TARGET}
GENONLY+=	genrtl.c

gencondmd.c:	genconditions ${MD_FILE}
	./genconditions ${MD_FILE} > ${.TARGET}
GENSRCS+=	gencondmd.c

#-----------------------------------------------------------------------
# Build tools.

GNTOOLS+=	genattr genattrtab genautomata gencodes gencheck genchecksum \
		genconditions gencondmd genconfig genconstants genemit \
		genextract genflags gengenrtl gengtype genmodes genopinit \
		genoutput genpeep genpreds genrecog

all: ${GNTOOLS} ${GENSRCS} ${GENONLY}
beforedepend: ${GENONLY}

#
#-----------------------------------------------------------------------
# Build 'pocket' libiberty exclusively for build tools use.

LIBIBERTY_SRCS=	choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
	dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \
	hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \
	partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \
	xmalloc.c xmemdup.c xstrdup.c xstrerror.c
LIBIBERTY_OBJS=	${LIBIBERTY_SRCS:R:S/$/.o/g}

.for _src in ${LIBIBERTY_SRCS}
${_src:R:S/$/.o/}: ${_src}
	${CC} -c -I ${.CURDIR}/../libiberty ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor

${LIBIBERTY}: ${LIBIBERTY_OBJS}
	@@rm -f ${.TARGET}
	@@${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
	${RANLIB} ${.TARGET}
CLEANFILES+=	${LIBIBERTY} ${LIBIBERTY_OBJS}


#-----------------------------------------------------------------------
# Fixups.

# Set OBJS the same as bsd.prog.mk would do if we defined PROG.  We can't
# define PROG because we have multiple programs.
#
SRCS=		errors.c genattr.c genattrtab.c \
		genautomata.c gencheck.c genchecksum.c gencodes.c \
		genconditions.c genconfig.c genconstants.c genemit.c \
		genextract.c genflags.c gengenrtl.c gengtype.c genmodes.c \
		genopinit.c genoutput.c genpeep.c genpreds.c genrecog.c \
		gensupport.c ggc-none.c print-rtl.c read-rtl.c rtl.c \
		vec.c

SRCS+=		${GENSRCS}
OBJS+=		${SRCS:N*.h:R:S/$/.o/g}
GENOBJS+=	${GENSRCS:N*.h:R:S/$/.o/g}
CLEANFILES+=	${GENSRCS} ${GENONLY} ${GENOBJS} ${GNTOOLS}

#-----------------------------------------------------------------------
# Manual dependencies.
.if !exists(${DEPENDFILE})
.include  "Makefile.dep"
.endif

.include <bsd.prog.mk>
# DO NOT DELETE
@


1.97
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243933
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/gnu/usr.bin/cc/cc_tools/Makefile 243933 2012-12-06 01:31:25Z eadler $
d54 3
d355 3
d359 3
@


1.96
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/gnu/usr.bin/cc/cc_tools/Makefile 220755 2011-04-17 21:03:23Z dim $
d515 1
a515 1
	@@${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
@


1.95
log
@SVN rev 220755 on 2011-04-17 21:03:23Z by dim

Remove libobjc and other Objective-C related components, as these are
extremely outdated, and not used by anything in the base system.

Silence from:	current@@
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.95.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.95.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/gnu/usr.bin/cc/cc_tools/Makefile 220755 2011-04-17 21:03:23Z dim $
@


1.95.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.95.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/gnu/usr.bin/cc/cc_tools/Makefile 220755 2011-04-17 21:03:23Z dim $
@


1.95.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.95.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/gnu/usr.bin/cc/cc_tools/Makefile 220755 2011-04-17 21:03:23Z dim $
@


1.94
log
@SVN rev 215439 on 2010-11-17 19:54:01Z by tijl

Let gcc and ld know where to find 32 bit libraries on amd64.

Reviewed by:	arch@@
Approved by:	kib (mentor)
@
text
@a132 4
.if ${MK_OBJC} != "no"
GTFILES_LANG_DIR_NAMES+=	objc
.endif

a156 4
.if ${MK_OBJC} != "no"
TREE_DEF_FILES+=	objc/objc-tree.def
.endif

a336 1
	echo '#include "objc/lang-specs.h"'			>> ${.TARGET}
@


1.93
log
@SVN rev 215082 on 2010-11-10 06:39:49Z by imp

Complete the integration of tbemd branch into head.

TARGET_BIG_ENDIAN is now completely dead, except where it was
originally supposed to be used (internally in the toolchain building).

TARGET_ARCH has changed in three cases:
(1) Little endian mips has changed to mipsel.
(2) Big endian mips has changed to mipseb.
(3) Big endian arm has changed to armeb.

Some additional changes are needed to make 'make universe' work on arm
and mips after this change, so those are commented out for now.

UPDATING information will be forthcoming.  Any remaining rough edges
will be hammered out in -current.
@
text
@d310 1
a310 1
.if ${TARGET_ARCH} == "powerpc64"
@


1.92
log
@SVN rev 209867 on 2010-07-10 02:29:22Z by nwhitehorn

Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from:	projects/ppc64
@
text
@d25 1
a25 1
.if ${TARGET_ARCH} == "amd64"
d28 1
a28 1
.if ${TARGET_ARCH} != "arm"
d31 1
a31 1
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
d41 1
a41 1
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
d46 1
a46 1
.if ${TARGET_ARCH} == "amd64"
d49 1
a49 1
.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "mips"
d52 1
a52 1
.if ${TARGET_ARCH} == "arm"
d60 1
a60 1
.if ${TARGET_ARCH} == "amd64"
d63 1
a63 1
.if ${TARGET_ARCH} == "arm"
d178 1
a178 1
.if ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64"
d182 1
a182 1
.if ${TARGET_ARCH} == "sparc64"
@


1.91
log
@SVN rev 182627 on 2008-09-01 18:46:03Z by obrien

Add FreeBSD/MIPS support to GCC.
@
text
@d55 4
d178 1
a178 1
.if ${TARGET_ARCH} == "powerpc"
d310 9
d321 1
d324 1
a325 1
	echo 'static const char *multilib_options = "";'	>> ${.TARGET}
@


1.91.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.91.2.2
log
@SVN rev 219648 on 2011-03-14 22:51:51Z by dim

Partially MFC r209867 and r215439, to provide rudimentary support for
linking i386 (32 bit) executables on amd64, using gcc's -m32 option.

r209867 introduces the needed multilib options to gcc's multilib.h, but
was originally intended just for powerpc64.

r215439 teaches the linker to search in /usr/lib32 for elf_i386_fbsd
output, and amends r209867 to apply to amd64 too.

NOTE: this MFC does NOT provide full support for compiling and linking
all existing 32 bit programs on amd64, since /usr/include/machine still
contains amd64-specific headers.  Though simple "Hello World" type
programs work, anything relying on machine-specific types might fail in
various interesting ways.  You have been warned. :)

MFC r209867:
Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from:	projects/ppc64

MFC r215439:
Let gcc and ld know where to find 32 bit libraries on amd64.

Reviewed by:	arch@@
Approved by:	kib (mentor)
@
text
@a305 9
.if ${TARGET_ARCH} == "amd64"
	echo 'static const char *const multilib_raw[] = { \
	    ". !m64 !m32;", \
	    "64:../lib m64 !m32;", \
	    "32:../lib32 !m64 m32;", NULL };'			> ${.TARGET}
	echo 'static const char *const multilib_matches_raw[] = { \
	    "m64 m64;", "m32 m32;", NULL };'			>> ${.TARGET}
	echo 'static const char *multilib_options = "m64/m32";'	>> ${.TARGET}
.else
d310 1
a311 2
.endif
	echo 'static const char *multilib_extra = "";'		>> ${.TARGET}
@


1.91.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/gnu/usr.bin/cc/cc_tools/Makefile 219648 2011-03-14 22:51:51Z dim $
@


1.91.2.2.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.91.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/gnu/usr.bin/cc/cc_tools/Makefile 219648 2011-03-14 22:51:51Z dim $
@


1.91.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.91.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.91.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.90
log
@SVN rev 182579 on 2008-08-31 23:38:28Z by obrien

Turn cc_tools/Makefile and Makefile.tgt into a "linear" read.  Shared
parts of the configuration aren't duplicated, and arch-specific exceptions
are made "in-place".  Also clean up the FreeBSD/amd64 config a little.
@
text
@d36 1
d49 1
a49 1
.if ${TARGET_ARCH} == "arm"
@


1.89
log
@Use LC_ALL=C before awk generating "optionlist"
(and before two other awk calls, just to be safe)
Without it sorting is broken for locales with ASCII collating equivalence
like (v,w) in sv_SE
@
text
@d41 1
a41 1
.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
d43 1
a43 1
.endif
d47 2
a48 4
TARGET_INC+=	${GCC_CPU}/freebsd.h
TARGET_INC+=	${GCC_CPU}/freebsd64.h
TARGET_INC+=	freebsd64-fix.h
.elif ${TARGET_ARCH} == "arm"
d50 2
d53 1
d55 4
a59 2
.else
TARGET_INC+=	${GCC_CPU}/freebsd.h
@


1.88
log
@Fix compiles when user chooses to disable both ObjC and C++ support in
GCC.

Reported by: bz
@
text
@d219 1
a219 1
	awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET}
d222 1
a222 1
	awk -f ${GCCDIR}/opt-functions.awk \
d227 1
a227 1
	awk -f ${GCCDIR}/opt-functions.awk \
@


1.88.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/gnu/usr.bin/cc/cc_tools/Makefile 170039 2007-05-28 00:25:07Z kan $
@


1.88.12.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.88.12.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/gnu/usr.bin/cc/cc_tools/Makefile 170039 2007-05-28 00:25:07Z kan $
@


1.88.10.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.88.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.88.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.87
log
@Back out the addition of -static to LDFLAGS; I'm pretty confident
that the build failure was caused by a computer/sources date/time
mismatch that caused GCC tools to be mistakenly rebuilt again at
an inappropriate time during buildworld, re-linking them against
new libraries instead of host's installed libraries and thus making
them not runnable by the host.  Normally they are only built in
the early stage of buildworld (build-tools) that links them against
shared libraries of the host, but if either the system clock or
modification date/time on source files is set incorrectly, make(1)
can be foolished into thinking that tools are stale and will rebuild
them again, now in the "target" environment which is not suitable
for building helper apps that are to be run during buildworld.

OK'ed by:	kan
@
text
@d257 1
a257 1
gencheck.h:
d261 1
@


1.86
log
@Work-around for upgrading from a pre-symbol-versioned world.

Blame-to: cperciva
@
text
@a5 1
LDFLAGS+=	-static
@


1.85
log
@Update bmake glue to build GCC 4.2.

Also:
        Switch FreeBSD to use libgcc_s.so.1.

        Use dl_iterate_phdr to locate shared objects' exception frame
        info instead of depending on older register_frame_info machinery.
        This allows us to avoid depending on libgcc_s.so.1 in binaries
        that do not use exception handling directly. As an additional
        benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.

        Build newly added libgomp.so.1 library, the runtime support
        bits for OpenMP.

        Build LGPLed libssp library. Our libc provides our own
        BSD-licensed SSP callbacks implementation, so this library
        is only built to benefit applications that have hadcoded
        knowledge of libssp.so and libssp_nonshared.a. When linked
        in from command line, these libraries override libc
        implementation.
@
text
@d6 1
@


1.84
log
@Add additional support for generating code for the arm.  There's still
a few issues in other parts of the tree, but those will be resolved
separately.

Submitted by: cogenet@@
Reviewed by: kan@@, obrien@@
MFC After: 5 days
@
text
@a4 12
#
# This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk
# is such a !@@#!*#% nightmare because of how it reprograms the dependencies,
# suffix rules, SRCS, etc.  It's easiest to cheat by using bsd.prog.mk and
# SRCS to get dependencies.
#

#
# ../Makefile.inc will put an absolute path to our objdir in CFLAGS.
# Prevent mkdep from using it, so that we don't have to give rules for
# aliases of generated headers.
#
d9 2
a10 147
.PATH: ${GCCDIR} ${GCCDIR}/f

CFLAGS+=	-DGENERATOR_FILE

#
#-----------------------------------------------------------------------
# Build 'pocket' libiberty exclusively for build tools use.

LIBIBERTY_SRCS=	choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
	dyn-string.c fibheap.c getpwd.c getruntime.c hashtab.c hex.c \
	lbasename.c make-temp-file.c md5.c obstack.c partition.c pex-unix.c \
	physmem.c splay-tree.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
LIBIBERTY_OBJS=	${LIBIBERTY_SRCS:R:S/$/.o/g}

SRCS+=	${LIBIBERTY_SRCS}

LIBIBERTY=libiberty.a
${LIBIBERTY}: ${LIBIBERTY_OBJS}
	@@rm -f ${.TARGET}
	@@${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
	${RANLIB} ${.TARGET}
CLEANFILES+=	${LIBIBERTY}

#
#-----------------------------------------------------------------------
# options
OPTION_FILES=${GCCDIR}/f/lang.opt ${GCCDIR}/c.opt ${GCCDIR}/common.opt

.ORDER: options.h options.c
options.h options.c: opts.sh ${OPTION_FILES}
	/bin/sh ${GCCDIR}/opts.sh mv options.c options.h ${OPTION_FILES}

GENSRCS+=	options.c options.h
CLEANFILES+=	options.c options.h

#-----------------------------------------------------------------------
# insn-* gunk

.for F in attr codes config flags constants
insn-$F.h: gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > insn-$F.h
GENSRCS+=	insn-$F.h
.endfor

.for F in conditions
insn-$F.c: gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > insn-$F.c
GENSRCS+=	insn-$F.c
.endfor

GENSRCS+=	gen-time-stamp
gen-time-stamp: genattr genattrtab genconditions genconstants genemit \
		genextract gengtype genopinit genoutput genpeep genrecog
	touch ${.TARGET}

.for F in attr codes config emit extract flags opinit output peep recog
gen$F: gen$F.o rtl.o print-rtl.o bitmap.o gensupport.o  ggc-none.o \
	read-rtl.o insn-conditions.o min-insn-modes.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

GENSRCS+=	gen$F.c
CLEANFILES+=	gen$F
.endfor

#
# genattrtab needs more complex build rule
#
genattrtab : genattrtab.o rtl.o print-rtl.o bitmap.o gensupport.o ggc-none.o \
	read-rtl.o insn-conditions.o genautomata.o varray.o min-insn-modes.o \
	errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm

GENSRCS+=	genattrtab.c
CLEANFILES+=	genattrtab

#
# genconstants and genconditions cannot depend on insn-conditions.o
# they should be liked with dummy-conditions.o stubs instead
#
.for F in constants conditions
gen$F: gen$F.o rtl.o bitmap.o gensupport.o ggc-none.o read-rtl.o dummy-conditions.o min-insn-modes.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

GENSRCS+=	gen$F.c
CLEANFILES+=	gen$F
.endfor

.for F in modes check genrtl preds
gen$F: gen$F.o errors.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

GENSRCS+=	gen$F.c
CLEANFILES+=	gen$F
.endfor

.ORDER: genrtl.c genrtl.h
genrtl.c genrtl.h: gengenrtl
	./gengenrtl > genrtl.c
	./gengenrtl -h > genrtl.h

GENSRCS+=	genrtl.c genrtl.h

SRCS+=	bitmap.c dummy-conditions.c errors.c genautomata.c gensupport.c \
	ggc-none.c print-rtl.c read-rtl.c rtl.c varray.c

#-----------------------------------------------------------------------
# insn modes stuff.

.ORDER: insn-modes.c insn-modes.h
insn-modes.h: genmodes
	./genmodes -h > insn-modes.h

insn-modes.c: genmodes
	./genmodes > insn-modes.c

min-insn-modes.c: genmodes
	./genmodes -m > min-insn-modes.c

GENSRCS+= insn-modes.c min-insn-modes.c insn-modes.h

#-----------------------------------------------------------------------
# Common parser stuff.

tree-check.h: gencheck
	./gencheck > ${.TARGET}
GENSRCS+=	tree-check.h

#-----------------------------------------------------------------------
# Predicates stuff.

tm-preds.h: genpreds
	./genpreds > ${.TARGET}
GENSRCS+=	tm-preds.h

#-----------------------------------------------------------------------
# Gengtype

gengtype-lex.c : gengtype-lex.l
	${LEX} -t  ${.ALLSRC} | \
	sed 's/^\(char msg\[\];\)/yyconst \1/' > ${.TARGET}

.ORDER: gengtype-yacc.c gengtype-yacc.h
gengtype-yacc.c gengtype-yacc.h: gengtype-yacc.y
	${YACC} -d -o gengtype-yacc.c ${.ALLSRC}

GENSRCS+=	gengtype-yacc+%DIKED.c gengtype-yacc.h gengtype-lex.c
CLEANFILES+=	gengtype-yacc.c
d12 3
a14 7
gengtype-yacc+%DIKED.c: gengtype-yacc.c
	cat    ${.ALLSRC} > ${.TARGET}
	sed -e "s/xmalloc/malloc/g" \
	    -e "s/xrealloc/realloc/g" \
	    -e "s/malloc/xmalloc/g" \
	    -e "s/realloc/xrealloc/g" \
	    ${.ALLSRC} > ${.TARGET}
d16 1
a16 31
gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

GENSRCS+=	gengtype.c
CLEANFILES+=	gengtype

gengtype-lex.o: gengtype-yacc.h

.ORDER: gtype-desc.c gtype-desc.h
gtype-desc.c gtype-desc.h: gtype-time-stamp
	@@true

GENSRCS+=	gtype-time-stamp
gtype-time-stamp: gengtype ${GTFILES}
	./gengtype
	touch ${.TARGET}

GENSRCS+=	gtype-desc.c gtype-desc.h
CLEANFILES+=	gt-*.h gtype-*.h

#
#-----------------------------------------------------------------------
# Fortran build tools

.if ${MK_FORTRAN} != "no"
gen-time-stamp: fini
fini: fini.o ${LIBIBERTY}
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
SRCS+=		fini.c
CLEANFILES+=	fini
.endif
d24 1
d26 1
a26 1
TARGET_INC=	i386/biarch64.h
a34 1
.if ${TARGET_ARCH} != "alpha"
a36 1
.endif
a39 3
.if ${TARGET_ARCH} == "alpha"
TARGET_INC+=	${GCC_CPU}/elf.h
.endif
d45 6
a50 1
.if ${TARGET_ARCH} == "arm"
d53 2
a54 7
TARGET_INC+=	${GCC_CPU}/${GCC_CPU}.h
. if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
. endif
.endif
.if ${TARGET_ARCH} == "arm"
TARGET_INC+=	freebsd-diked.h
a57 8
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+=	${GCC_CPU}/x86-64.h
TARGET_INC+=	${GCC_CPU}/freebsd64.h
TARGET_INC+=	freebsd64-fix.h
.endif
.if ${TARGET_ARCH} == "powepc"
TARGET_INC+=	altivec-defs.h
.endif
a59 6
#
# Use TARGET_INC as a template and build a list of target specific
# include files for gengtype to scan
#
GCONFIG_H=	${.CURDIR}/auto-host.h

d63 1
a63 1
GCONFIG_H+=	$D/$H
d69 1
a69 1
# Define some variables to make blocks copied from Makefile.in happy
d72 10
a81 4
HASHTAB_H=	${GCCDIR}/hashtab.h
SPLAY_TREE_H=	${GCCDIR}/splay-tree.h
out_file=	${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.c
GTFILES_SRCDIR=	${GCCDIR}
a82 1
#
d84 7
a90 6
#
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
  $(GCONFIG_H) $(HASHTAB_H) $(SPLAY_TREE_H) \
  $(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h  $(srcdir)/rtl.h \
  $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
  $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h \
d92 1
a92 1
  $(srcdir)/c-common.h $(srcdir)/c-tree.h \
d94 1
d96 1
a96 1
  $(srcdir)/dojump.c \
d98 1
a98 1
  $(srcdir)/fold-const.c $(srcdir)/function.c \
d100 3
a102 3
  $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \
  $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/langhooks.c \
  $(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
d104 13
a116 1
  $(out_file)
d118 1
a118 3
#
# Build a list of frontend directories to look into
#
d129 1
a129 7
.if ${MK_FORTRAN} != "no"
GTFILES_LANG_DIR_NAMES+=	f
.endif

#
# Build a list of language specific files for gengtype
#
d144 29
a172 2
#-----------------------------------------------------------------------
# the host/target compiler config.
d174 3
a176 4
COMMONHDRS=	bconfig.h config.h configargs.h gencheck.h multilib.h \
		specs.h safe-ctype.h tconfig.h tm.h tm_p.h gcov-iov.h \
		gtyp-gen.h
GENSRCS+=	${COMMONHDRS}
d178 3
a180 2
MFILE?=	${.CURDIR}/Makefile
${COMMONHDRS}: ${MFILE}
d182 9
a190 8
configargs.h:
	echo 'static const char configuration_arguments[] ='	> ${.TARGET}
	echo '	"FreeBSD/${TARGET_ARCH} system compiler";'	>> ${.TARGET}
	echo 'static const char thread_model[] = "posix";'	>> ${.TARGET}
	echo 'static const struct {'				>> ${.TARGET}
	echo '	const char *name, *value;'			>> ${.TARGET}
	echo '} configure_default_options[] = {'		>> ${.TARGET}
	echo '	{ "NULL", "NULL" } };'				>> ${.TARGET}
d192 2
a193 8
tconfig.h:
	echo '#ifndef GCC_TCONFIG_H'			> ${.TARGET}
	echo '#define GCC_TCONFIG_H'			>> ${.TARGET}
	echo '#ifdef IN_GCC'				>> ${.TARGET}
	echo '# include "ansidecl.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo '#define USED_FOR_TARGET'			>> ${.TARGET}
	echo '#endif /* GCC_TCONFIG_H */'		>> ${.TARGET}
d195 1
d197 4
a200 3
	echo '#ifndef GCC_BCONFIG_H'			> ${.TARGET}
	echo '#define GCC_BCONFIG_H'			>> ${.TARGET}
	echo '#include "auto-host.h"'			>> ${.TARGET}
a203 4
	echo '#ifdef IN_GCC'				>> ${.TARGET}
	echo '# include "ansidecl.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo '#endif /* GCC_BCONFIG_H */'		>> ${.TARGET}
d205 2
a206 3
gencheck.h:
	echo '#include "cp/cp-tree.def"'		> ${.TARGET}
	echo '#include "objc/objc-tree.def"'		>> ${.TARGET}
d208 24
a231 17
multilib.h:
	echo 'static const char *const multilib_raw[] = { \
	    "aout maout;", "elf !maout;", NULL };'	> ${.TARGET}
	echo 'static const char *const multilib_matches_raw[] = { \
	    "maout maout;", "melf melf;", NULL };'	>> ${.TARGET}
	echo 'static const char *multilib_extra = "";'	>> ${.TARGET}
	echo 'static const char *multilib_options = "";'>> ${.TARGET}
	echo 'static const char *const multilib_exclusions_raw[] = { \
	    NULL };'					>> ${.TARGET}

specs.h:
	echo '#include "cp/lang-specs.h"'		> ${.TARGET}
	echo '#include "f/lang-specs.h"'		>> ${.TARGET}
	echo '#include "objc/lang-specs.h"'		>> ${.TARGET}

config.h: bconfig.h
	echo '#include <bconfig.h>'			> ${.TARGET}
d233 1
d235 4
a238 14
	echo '#ifndef GCC_TM_H'				> ${.TARGET}
	echo '#define GCC_TM_H'				>> ${.TARGET}
.if defined(TARGET_CPU_DEFAULT)
	echo "#define TARGET_CPU_DEFAULT (${TARGET_CPU_DEFAULT})" >> ${.TARGET}
.endif
	echo '#ifdef IN_GCC'				>> ${.TARGET}
.for H in ${TARGET_INC}
	echo '#include "$H"'				>> ${.TARGET}
.endfor
	echo '#if !defined GENERATOR_FILE && !defined USED_FOR_TARGET' >> ${.TARGET}
	echo '# include "insn-constants.h"'		>> ${.TARGET}
	echo '# include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
a241 1
	echo '#endif /* GCC_TM_H */'			>> ${.TARGET}
d243 4
d248 13
a260 2
	echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"'	>> ${.TARGET}
	echo '#include "tm-preds.h"'				>> ${.TARGET}
d262 1
a262 16
safe-ctype.h:
	echo '#include <ctype.h>'				> ${.TARGET}
.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM \
    ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL
	echo '#define ${Z}	${Z:L}'				>> ${.TARGET}
.endfor
	echo "#define ISIDST(x)		\
		((x) == '_' || isalpha(x))"			>> ${.TARGET}
	echo "#define ISIDNUM(x)	\
		(isdigit(x) || ISIDST(x))"			>> ${.TARGET}
	echo "#define IS_VSPACE(x)	\
		((x) == '\n' || (x) == '\r')"			>> ${.TARGET}
	echo "#define IS_NVSPACE(x)	\
		(!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))"	>> ${.TARGET}
	echo "#define IS_SPACE_OR_NUL(x)	\
		(isspace(x) || (x) == '\0')"			>> ${.TARGET}
d264 3
a266 1
gtyp-gen.h:
d268 1
a268 1
	echo "static const char *srcdir = "			>> ${.TARGET}
d270 1
a270 1
	echo "static const char *lang_files[] = {"		>> ${.TARGET}
d275 1
a275 1
	echo "static const char *langs_for_lang_files[] = {"	>> ${.TARGET}
d280 1
a280 1
	echo "static const char *all_files[] = {"		>> ${.TARGET}
d285 2
a286 2
	echo "static const char *lang_dir_names[] = { \"c\", "	>> ${.TARGET}
.for F in ${GTFILES_LANG_DIR_NAMES}
d291 3
d295 16
a310 1
	echo "#define GCOV_VERSION ((gcov_unsigned_t)0x33303470)" >> ${.TARGET}
d312 176
a487 20
.if ${TARGET_ARCH} == "arm"
freebsd-diked.h: ${GCCDIR}/../../gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff
	cp ${GCCDIR}/config/arm/freebsd.h freebsd.h
	patch freebsd.h ${.ALLSRC}
	mv freebsd.h ${.TARGET}
COMMONHDRS+=	freebsd-diked.h
CLEANFILES+=    freebsd.h.orig

# Make sure freebsd-diked.h is built when tm.h is built for csu's sake
tm.h:	freebsd-diked.h

${MD_FILE}: ${MFILE}
	cp ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md .
	ln -sf ${GCCDIR}/config/${GCC_CPU}/fpa.md .
	ln -sf ${GCCDIR}/config/${GCC_CPU}/cirrus.md .
	ln -sf ${GCCDIR}/config/${GCC_CPU}/iwmmxt.md .
	patch ${GCC_CPU}.md ${.CURDIR}/arm.md.diff
	mv ${GCC_CPU}.md ${.TARGET}
CLEANFILES+=	arm-diked.md ${GCC_CPU}.md.orig fpa.md cirrus.md iwmmxt.md
.endif
d489 1
a489 1
# General things.
d491 11
a501 2
SRCS+=		${GENSRCS}
CLEANFILES+=	${GENSRCS}
d503 5
a507 1
all:		${SRCS}
a508 1
.include <bsd.prog.mk>
d516 9
d526 2
a527 1
CLEANFILES+=	${OBJS}
d529 2
d532 2
a533 2
# Fudge pre-dependfile dependencies of objects in much the same way as
# bsd.prog.mk would do if we defined PROG.
d535 2
a536 37
${OBJS}: ${COMMONHDRS}

dummy-conditions.o:
gencheck.o:
genmodes.o:

genpreds.o: insn-modes.h
genconstants.o: insn-modes.h genrtl.h
gengtype.o: insn-modes.h genrtl.h gtyp-gen.h
rtl.o: insn-modes.h gtype-desc.h genrtl.h
bitmap.o: insn-modes.h gtype-desc.h genrtl.h
ggc-none.o: gtype-desc.h
gensupport.o: insn-modes.h genrtl.h
varray.o: gtype-desc.h
genautomata.o: insn-modes.h genrtl.h
genconditions.o: insn-modes.h genrtl.h
gencodes.o: insn-modes.h genrtl.h
genconfig.o: insn-modes.h genrtl.h
print-rtl.o: insn-modes.h genrtl.h tm-preds.h tree-check.h
read-rtl.o: insn-modes.h genrtl.h
genattr.o: insn-modes.h genrtl.h
genemit.o: insn-modes.h genrtl.h
genflags.o: insn-modes.h genrtl.h
genopinit.o: insn-modes.h genrtl.h
genoutput.o: insn-modes.h genrtl.h
genpeep.o: insn-modes.h genrtl.h
genrecog.o: insn-modes.h genrtl.h
genextract.o: genrtl.h insn-config.h
genattrtab.o: insn-modes.h gtype-desc.h genrtl.h
genrtl.o: insn-modes.h genrtl.h gtype-desc.h

insn-conditions.o: insn-constants.h tm-preds.h
insn-modes.o: insn-modes.h
min-insn-modes.o: insn-modes.h
gtype-desc.o: insn-modes.h insn-config.h insn-codes.h tree-check.h

.endif
@


1.83
log
@Fix three whitespace nits.

I think these are from kan@@...
@
text
@d218 1
d220 1
d240 11
d252 1
d474 20
@


1.82
log
@Reimplementation of world/kernel build options.  For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
@
text
@a51 1
	
d156 1
a156 1
# Gengtype 
d502 1
a502 1
read-rtl.o: insn-modes.h genrtl.h 
@


1.81
log
@Update bmake glue for GCC 3.4.4.
@
text
@d3 2
d202 1
a202 1
.if !defined(NO_FORTRAN)
d300 1
a300 1
.if !defined(NO_CXX)
d304 1
a304 1
.if !defined(NO_OBJC)
d308 1
a308 1
.if !defined(NO_FORTRAN)
@


1.81.2.1
log
@Whitespace sync with HEAD.

Approved by:	re(ken)
@
text
@d50 1
d155 1
a155 1
# Gengtype
d501 1
a501 1
read-rtl.o: insn-modes.h genrtl.h
@


1.81.2.2
log
@MFC: add some preliminary ARM support

Approved by:	re(KEN)
@
text
@a215 1
.if ${TARGET_ARCH} != "arm"
a216 1
.endif
a235 8
.if ${TARGET_ARCH} == "arm"
TARGET_INC+=	${GCC_CPU}/elf.h
TARGET_INC+=	${GCC_CPU}/aout.h
TARGET_INC+=	${GCC_CPU}/${GCC_CPU}.h
. if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
. endif
.endif
@


1.81.2.3
log
@Move our ".mcount" bits around a little.
@
text
@d250 1
@


1.81.2.4
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/gnu/usr.bin/cc/cc_tools/Makefile 178301 2008-04-18 16:06:46Z obrien $
@


1.81.2.3.2.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.80
log
@A fix from rev. 1.52 of gnu/usr.bin/cc/cc_tools/Makefile was lost
in rev. 1.57.  Fix this regression by making cc_tools a new-style
build-tool in Makefile.inc1.  For details of what has been fixed,
please see the gnu/usr.bin/cc/cc_tools/Makefile,v 1.52 commit log.

Caught this by accidentally touching param.h while in the process
of cross-buildworld for amd64.
@
text
@d283 1
d290 2
a291 1
  $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c  $(out_file)
@


1.79
log
@Consolidate libiberty files in one place and avoid listing some
of them in several places.

Noticed by:	bsdimp
@
text
@a75 2
build-tools: gen$F

a86 2
build-tools: genattrtab

a99 2
build-tools: gen$F

a107 2
build-tools: gen$F

a201 1
build-tools: fini
a463 1
build-tools:	${SRCS}
@


1.79.2.1
log
@MFC: Makefile.inc1,v 1.440 and gnu/usr.bin/cc/cc_tools/Makefile,v 1.80.

Ensure that .depend file in cc_tools has correct libraries and headers
(host versions, not target).

Approved by:	re (kensmith)
@
text
@d76 2
d89 2
d104 2
d114 2
d210 1
d473 1
@


1.78
log
@Bmake glue for GCC 3.4.2-prerelease.
@
text
@d28 3
a30 4
	dyn-string.c errors.c fibheap.c \
	getpwd.c getruntime.c hashtab.c hex.c lbasename.c make-temp-file.c \
	md5.c obstack.c partition.c pexecute.c physmem.c splay-tree.c xexit.c \
	xmalloc.c xmemdup.c xstrdup.c xstrerror.c xexit.c
d79 1
a79 1
	read-rtl.o insn-conditions.o min-insn-modes.o ${LIBIBERTY}
d93 1
a93 1
	${LIBIBERTY}
d106 1
a106 1
gen$F: gen$F.o rtl.o bitmap.o gensupport.o ggc-none.o read-rtl.o dummy-conditions.o min-insn-modes.o ${LIBIBERTY}
d116 1
a116 1
gen$F: gen$F.o ${LIBIBERTY}
d130 2
a131 3
SRCS+=	bitmap.c concat.c dummy-conditions.c genautomata.c \
	gensupport.c getruntime.c ggc-none.c hashtab.c \
	obstack.c physmem.c print-rtl.c read-rtl.c rtl.c varray.c xmemdup.c
@


1.77
log
@Revise previous commit - I managed to mess up a 1-line change and broke
amd64 world.  The csu code evalues this Makefile with a different origin.
@
text
@d19 1
a19 1
.PATH: ${GCCDIR}
d23 33
d79 2
a80 2
gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o \
	ggc-none.o hashtab.o read-rtl.o concat.o insn-conditions.o
d92 3
a94 3
genattrtab : genattrtab.o rtl.o obstack.o print-rtl.o bitmap.o errors.o \
	gensupport.o ggc-none.o hashtab.o read-rtl.o concat.o \
	insn-conditions.o genautomata.o varray.o getruntime.o
d107 1
a107 2
gen$F: gen$F.o rtl.o obstack.o bitmap.o errors.o gensupport.o \
       ggc-none.o hashtab.o read-rtl.o concat.o dummy-conditions.o
d114 1
a114 1
.for F in check genrtl preds
d117 1
a117 1
gen$F: gen$F.o
d131 1
a131 1
SRCS+=	bitmap.c concat.c dummy-conditions.c errors.c genautomata.c \
d136 15
d186 1
a186 1
gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o xmemdup.o
d206 13
d223 1
a223 1
# The list of headers to go into tconfig.h
d225 3
a227 1
TARGET_INC=	ansidecl.h
d254 3
d263 1
a263 1
GCONFIG_H=	${.OBJDIR}/tconfig.h ${.CURDIR}/auto-host.h
d278 1
d285 6
a290 5
GTFILES = $(GCONFIG_H) $(srcdir)/location.h \
  $(HASHTAB_H) \
  $(srcdir)/bitmap.h $(srcdir)/function.h  $(srcdir)/rtl.h $(srcdir)/optabs.h \
  $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h $(srcdir)/real.h \
  $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h $(srcdir)/cselib.h \
d292 3
a294 4
  $(srcdir)/basic-block.h \
  $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c \
  $(srcdir)/dwarf2out.c $(srcdir)/emit-rtl.c \
  $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
d298 1
a298 1
  $(srcdir)/reg-stack.c \
d300 1
a300 2
  $(srcdir)/tree.c $(srcdir)/varasm.c \
  $(out_file)
d339 4
a342 3
COMMONHDRS=	config.h hconfig.h multilib.h options.h specs.h tconfig.h \
		tm_p.h configargs.h safe-ctype.h
GENSRCS+=	${COMMONHDRS} gencheck.h gtyp-gen.h
d351 4
d356 20
a375 3
hconfig.h:
	echo '#include "auto-host.h"'			> ${.TARGET}
	echo '#include <tconfig.h>'			>> ${.TARGET}
a390 5
options.h:
	echo '#include "cp/lang-options.h"'		> ${.TARGET}
	echo '#include "f/lang-options.h"'		>> ${.TARGET}
	echo '#include "objc/lang-options.h"'		>> ${.TARGET}

d396 2
a397 6
config.h:
	echo '#include <hconfig.h>'			> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'			>> ${.TARGET}
	echo '#include "insn-constants.h"'		>> ${.TARGET}
	echo '#include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
d399 5
a403 16
tconfig.h:
	echo 'struct rtx_def;'				> ${.TARGET}
	echo 'typedef struct rtx_def *rtx;'		>> ${.TARGET}
	echo 'struct rtvec_def;'			>> ${.TARGET}
	echo 'typedef struct rtvec_def *rtvec;'		>> ${.TARGET}
	echo 'union tree_node;'				>> ${.TARGET}
	echo 'typedef union tree_node *tree;'		>> ${.TARGET}
	echo '#ifndef GTY'				>> ${.TARGET}
	echo '# define GTY(x)'				>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo ''						>> ${.TARGET}
.if ${TARGET_ARCH} == "amd64"
	echo '#include "i386/biarch64.h"'		>> ${.TARGET}
.endif
.if ${TARGET_ARCH} == "ia64"
	echo '#define TARGET_CPU_DEFAULT (MASK_GNU_AS|MASK_GNU_LD)' >>${.TARGET}
d405 1
d409 4
a412 2
	echo '#ifndef POSIX'				>> ${.TARGET}
	echo '# define POSIX'				>> ${.TARGET}
a415 1
	echo '#define EXTRA_CC_MODES 1'			>> ${.TARGET}
d417 1
d423 1
a423 1
safe-ctype.h: Makefile
a463 1
	echo "#define	xexit exit"				>> ${.TARGET}
d465 2
d474 2
a475 1
all: ${SRCS}
d490 1
a490 10
# bsd.prog.mk would do if we defined PROG.  There are complications to
# avoid circular dependencies.  First, only make most objects depend on
# all headers.  Filter out the objects that would cause problems (i.e.,
# objects that will be used to create programs that will generate headers).
#
${OBJS}: ${SRCS:M*.h:Ngtype-desc.h:Ngenrtl.h:Ntree-check.h:Ntm-preds.h:Ninsn-*.h}

${OBJS:Ngencheck.o:Ngengenrtl.o:Ngenpreds.o}: tree-check.h tm-preds.h genrtl.h

${OBJS:Ngengtype*.o:Nxmemdup.o:Ngengenrtl.o:Ngencheck.o:Ngenpreds.o}: gtype-desc.h
d492 1
a492 1
genextract.o: insn-config.h
d494 33
a526 1
insn-conditions.o: insn-constants.h
@


1.76
log
@The gcc/config/i386/freebsd64.h file neglects to override the default
(bogus, application name space) mcount function name on amd64.  Override
it here instead.

I've done it this way to avoid touching gcc source while 3.4 is in
progress, and this is the smallest, lowest impact I could come up with.
Adding a patch touches about 10-14 lines of Makefile, this touches only 1.
This will likely go away with the 3.4 import.

I spoke with Alexander about this a few days ago, but waited until after
sorting out some of the other bugs in the userland profiling.
@
text
@d190 1
a190 1
TARGET_INC+=	${.CURDIR}/freebsd64-fix.h
@


1.75
log
@Backed out the residue of rev.1.13 (bogus addition of -static to CFLAGS).
Makeworld will add -static in the correct place if needed and possible.
Self-hosted builds can just use the system default.

Fixed some nearby style bugs (code unrelated to its comment, and comment
formatting).
@
text
@d190 1
@


1.74
log
@Do not treat make variables as Perl variables.
@
text
@d10 1
d14 2
a15 2

CFLAGS+=	-I. -static -DGENERATOR_FILE
d20 2
@


1.73
log
@Fixed "make clean".
@
text
@d256 1
a256 1
$L_GTFILES!=	sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles'
d258 1
a258 1
$L_GTFILES!=	sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles'
d260 1
a260 2
GTFILES+=	${$L_GTFILES}
.for F in ${$L_GTFILES}
d265 1
@


1.72
log
@Removed duplicate SRCS.
@
text
@d410 1
@


1.71
log
@Update bmake bits to build GCC 3.3.1-prerelease.
@
text
@d97 1
a97 1
	gensupport.c getruntime.c ggc-none.c hashtab.c insn-conditions.c \
@


1.70
log
@Add missing quote after cut/paste error in last commit. :-(
@
text
@d14 1
a14 1
CFLAGS+=	-I.
d18 1
a18 3
.PATH: ${GCCDIR} ${GCCDIR}/cp		${GCCDIR}/../libiberty

CFLAGS+=	-static -DGENERATOR_FILE
d23 1
a23 1
.for F in attr codes config flags
d29 6
d36 2
a37 1
gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrecog
d43 2
a44 1
gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o        ggc-none.o hashtab.o read-rtl.o
d51 18
a68 1
.for F in attrtab
d71 2
a72 1
gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport.o        ggc-none.o hashtab.o read-rtl.o
a78 2
SRCS+=		bitmap.c errors.c gensupport.c        ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c read-rtl.c

d96 4
d115 153
d272 1
a272 1
GENSRCS+=	${COMMONHDRS} gencheck.h
d279 1
a279 1
	echo '	"FreeBSD/${TARGET_ARCH} system compiler";'		>> ${.TARGET}
d313 1
a313 1
	echo '#include "insn-codes.h"'			>> ${.TARGET}
d324 3
d334 3
a336 26
	echo '#include "ansidecl.h"'			>> ${.TARGET}
	echo '#include "${GCC_CPU}/${GCC_CPU}.h"'	>> ${.TARGET}
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
	echo '#include "${GCC_CPU}/att.h"'		>> ${.TARGET}
.endif
.if ${TARGET_ARCH} != "alpha"
	echo '#include "dbxelf.h"'			>> ${.TARGET}
	echo '#include "elfos.h"'			>> ${.TARGET}
.endif
	echo '#include <freebsd-native.h>'		>> ${.TARGET}
	echo '#include "freebsd-spec.h"'		>> ${.TARGET}
	echo '#include "freebsd.h"'			>> ${.TARGET}
.if ${TARGET_ARCH} == "alpha"
	echo '#include "${GCC_CPU}/elf.h"'		>> ${.TARGET}
.endif
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
	echo '#include "${GCC_CPU}/sysv4.h"'		>> ${.TARGET}
.endif
.endif
	echo '#include "${GCC_CPU}/freebsd.h"'		>> ${.TARGET}
.if ${TARGET_ARCH} == "amd64"
	echo '#include "${GCC_CPU}/x86-64.h"' 		>> ${.TARGET}
	echo '#include "${GCC_CPU}/freebsd64.h"'	>> ${.TARGET}
.endif
	echo '#include "defaults.h"'			>> ${.TARGET}
d340 3
a342 2
.if ${TARGET_ARCH} != "ia64"
	echo '#define CONFIG_SJLJ_EXCEPTIONS 0'		>> ${.TARGET}
d366 27
d418 7
a424 1
${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngenpreds.o:Ngensupport.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nread-rtl.o:Nrtl.o}: ${SRCS:M*.h}
d426 1
a426 2
# Force these to be made absolustly first w/-j
${OBJS}: ${COMMONHDRS}
a427 9
# Next, make each of the problematic objects depend on only most headers.
# Filter out the headers that would cause problems (and a few more when it
# is inconvenient to filter precisely).
#
bitmap.o genattr.o gencodes.o genconfig.o genflags.o gensupport.o obstack.o print-rtl.o \
    read-rtl.o rtl.o: ${SRCS:M*.h:Ninsn-*.h}
gencheck.o: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h}
gengenrtl.o: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h}
genpreds.o: ${COMMONHDRS}
@


1.69
log
@Configure gcc in biarch mode for amd64 so that the -m32 flag is enabled
for things like boot blocks etc.

Reviewed by:  kan
@
text
@d147 1
a147 1
	echo '#include "i386/biarch64.h"		>> ${.TARGET}
@


1.68
log
@Lock GCC w/o -m32 into 64-bit mode.
@
text
@a145 1
# XXX: consider including i386/biarch64.h instead of below
d147 1
a147 1
	echo '#define TARGET_64BIT_DEFAULT 1'		>>${.TARGET}
@


1.67
log
@We're changing the platform name from x86[_-]86 to amd64.
@
text
@d146 4
@


1.66
log
@Add multilib_options variable definition.

Approved by:	obrien
@
text
@d151 1
a151 1
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "x86_64"
d164 1
a164 1
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "x86_64"
d170 2
a171 2
.if ${TARGET_ARCH} == "x86_64"
	echo '#include "${GCC_CPU}/${TARGET_ARCH:S/_/-/}.h"' >> ${.TARGET}
@


1.65
log
@We're going to have to use a TARGET_ARCH of "x86_64" rather than "x86-64"
to make building GCC happy.
@
text
@d117 1
@


1.64
log
@Use a more API denoting way to handle what is in libc and what isn't.
@
text
@d150 1
a150 1
.if ${TARGET_ARCH} == "i386"
d163 1
a163 1
.if ${TARGET_ARCH} != "i386"
d169 2
a170 1
.if ${TARGET_ARCH} == "x86-64"
@


1.63
log
@Make it possible to build a cross compiler for alpha,
ia64 and sparc64 on systems that do not have atoll(3).
The "cross" here doesn't necessarily mean cross-arch.
@
text
@a21 4
.if defined(BOOTSTRAPPING)
CFLAGS+=	-DBOOTSTRAPPING
.endif

@


1.62
log
@Add x86-64 bits.
@
text
@d22 4
@


1.61
log
@The IA-64 config needs to know that we are using GNU ld & as.

Submitted by:	peter
@
text
@d169 3
@


1.60
log
@Touching the sjlj setting on IA-64 makes things not build.

Submitted by:	peter
@
text
@d145 3
@


1.59
log
@Gather up the stragglers that depends on genrtl.h.  This is -j10 safe now.
@
text
@d170 1
d172 1
@


1.58
log
@This was *very* -j unsafe.  Add a dependency on the common generated
headers to mostly make it -j1 safe.
@
text
@d227 2
a228 2
bitmap.o genattr.o gencodes.o genconfig.o genflags.o obstack.o print-rtl.o \
    rtl.o: ${SRCS:M*.h:Ninsn-*.h}
@


1.57
log
@Bmake bits for Gcc 3.1.

Partially made possible by:	Wilko.Bulte@@compaq.com
@
text
@d220 3
@


1.56
log
@A little more reorg.
@
text
@a14 1
CFLAGS+=	-static
d18 3
a20 1
.PATH: ${GCCDIR} ${GCCDIR}/cp
d38 1
a38 1
gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o
d48 1
a48 1
gen$F: gen$F.o rtl.o rtlanal.o print-rtl.o obstack.o bitmap.o
d55 1
a55 1
SRCS+=		bitmap.c obstack.c print-rtl.c rtl.c rtlanal.c
d57 1
a57 1
.for F in check genrtl
d69 2
a70 1
	./gengenrtl genrtl.h genrtl.c
a74 19
# C hash codes
c-gperf.h: c-parse.gperf
	gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
	    ${GCCDIR}/c-parse.gperf > ${.TARGET}
GENSRCS+=	c-gperf.h

#-----------------------------------------------------------------------
# C++ hash codes
gxx-hash.h: gxx.gperf
	gperf -p -j1 -g -o -t -N is_reserved_word '-k1,4,7,$$' \
	    ${GCCDIR}/cp/gxx.gperf >gxx-hash.h
GENSRCS+=	gxx-hash.h

# make a link the the Cygnus used name for now -- hopes are they will change it
hash.h: gxx-hash.h
	ln -sf ${.ALLSRC} ${.TARGET}
GENSRCS+=	hash.h

#-----------------------------------------------------------------------
d82 7
d91 2
a92 1
COMMONHDRS=	config.h hconfig.h multilib.h options.h specs.h tconfig.h tm.h
d95 11
a105 5
config.h hconfig.h:
	echo '#include "auto-host.h"'				> ${.TARGET}
	echo '#include "gansidecl.h"'				>> ${.TARGET}
	echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"'	>> ${.TARGET}
	echo '#include "hwint.h"'				>> ${.TARGET}
d112 1
a112 1
	echo 'static char *multilib_raw[] = { \
d114 1
a114 1
	echo 'static char *multilib_matches_raw[] = { \
d116 3
a118 1
	echo 'static char *multilib_extra = "";'	>> ${.TARGET}
d123 1
d130 7
d138 9
a146 6
	echo '#include "gansidecl.h"'				> ${.TARGET}
	echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"'	>> ${.TARGET}

# KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !!
tm.h:
	echo '#include "${TARGET_ARCH}/${TARGET_ARCH}.h"'	> ${.TARGET}
d148 11
a158 1
	echo '#include "${TARGET_ARCH}/att.h"'			>> ${.TARGET}
d160 3
a162 4
	echo '#include <freebsd.h>'				>> ${.TARGET}
	echo '#include "dbxelf.h"'				>> ${.TARGET}
.if exists(${GCCDIR}/config/${TARGET_ARCH}/elf.h)
	echo '#include "${TARGET_ARCH}/elf.h"'			>> ${.TARGET}
a163 3
	echo '#include "${TARGET_ARCH}/freebsd.h"'		>> ${.TARGET}
.if ${TARGET_ARCH} == "i386"
	echo '#include "${TARGET_ARCH}/perform.h"'		>> ${.TARGET}
d165 27
a191 1
	echo '#include <freebsd-native.h>'			>> ${.TARGET}
a200 2
build-tools: depend

d218 1
a218 1
${OBJS:Nbitmap.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Nobstack.o:Nprint-rtl.o:Nrtl.o}: ${SRCS:M*.h}
d228 1
@


1.55
log
@Remove some local cruft that snuck in yesterday.
@
text
@d15 1
d37 2
a38 2
gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o
	${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d48 1
a48 1
	${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d60 1
a60 1
	${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
@


1.54
log
@Get rid of GCC_ARCH, and just use plain TARGET_ARCH.
We got rid of the MIPS le/be stuff that needed this a long time ago.
@
text
@a14 1
WARNS=		0
@


1.53
log
@Move the creation of the insn-*.c files from cc_tools to cc_int.
This gets rid of a cross build problem we have because we build
everything in cc_tools during the `make build-tools' (or `make depend')
stage.
@
text
@d15 1
d105 4
a108 4
	echo '#include "auto-host.h"'			> ${.TARGET}
	echo '#include "gansidecl.h"'			>> ${.TARGET}
	echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"'	>> ${.TARGET}
	echo '#include "hwint.h"'			>> ${.TARGET}
d131 2
a132 2
	echo '#include "gansidecl.h"'			> ${.TARGET}
	echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"'	>> ${.TARGET}
d136 3
a138 3
	echo '#include "${GCC_ARCH}/${GCC_ARCH}.h"'	> ${.TARGET}
.if ${GCC_ARCH} == "i386"
	echo '#include "${GCC_ARCH}/att.h"'		>> ${.TARGET}
d140 4
a143 4
	echo '#include <freebsd.h>'			>> ${.TARGET}
	echo '#include "dbxelf.h"'			>> ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_ARCH}/elf.h)
	echo '#include "${GCC_ARCH}/elf.h"'		>> ${.TARGET}
d145 3
a147 3
	echo '#include "${GCC_ARCH}/freebsd.h"'		>> ${.TARGET}
.if ${GCC_ARCH} == "i386"
	echo '#include "${GCC_ARCH}/perform.h"'		>> ${.TARGET}
d149 1
a149 1
	echo '#include <freebsd-native.h>'		>> ${.TARGET}
@


1.52
log
@We need to build ``.depend'' early in the "build-tools" for the GCC
"build-tools".  If we do not do this, the "depend" stage of
"buildworld" will build ``.depend'' and it will record the wrong
library and header dependencies (DESTDIR=${WORLDTMP}).  Even worse,
the "all" stage may clobber build-architecture-format build tools
built in the "build-tools" stage with target-architecture-format ones.

Submitted by:	ru
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.51 2001/03/02 03:00:41 obrien Exp $
d29 3
a31 5
.for F in attrtab emit extract opinit output peep recog
insn-$F.c: gen$F ${MD_FILE}
	./gen$F ${MD_FILE} > insn-$F.c
GENSRCS+=	insn-$F.c
.endfor
@


1.52.2.1
log
@Changes in order to compile GCC 3.0.2.

Really irritating changes are the "forced" layering of malloc + friends
in order to use the GNU versions.  Sorry, we have a *very* fine malloc,
and we will use it.  Period.  Even more irritating is that the GNU people
now want to replace ctype also!!  So we partially dike it out here.
@
text
@d1 1
a1 1
# $FreeBSD$
d14 1
a14 1
CFLAGS+=	-DGENERATOR_FILE -I.
a22 8
CLEANFILES+=	gensupport+%DIKED.c
gensupport+%DIKED.c: gensupport.c
	sed \
	    -e 's/^xmalloc/DONT_xmalloc/g'	\
	    -e 's/^xrealloc/DONT_xrealloc/g'	\
	    -e 's/^xstrdup/DONT_xstrdup/g'	\
	${.ALLSRC} > ${.TARGET}

d29 5
a33 3
GENSRCS+=	gen-time-stamp
gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrecog
	touch ${.TARGET}
d38 1
a38 1
gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport+%DIKED.o ggc-none.o hashtab.o #safe-ctype.o
d48 1
a48 1
gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport+%DIKED.o ggc-none.o hashtab.o
d55 1
a55 1
SRCS+=		bitmap.c errors.c gensupport+%DIKED.c ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c
d61 1
a61 1
	${CC} -static -DGENERATOR_FILE ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d69 1
a69 2
	./gengenrtl > genrtl.c
	./gengenrtl -h > genrtl.h
d74 19
d102 1
a102 2
COMMONHDRS=	config.h hconfig.h multilib.h options.h specs.h tconfig.h tm.h \
		tm_p.h configargs.h safe-ctype.h
a104 7
${COMMONHDRS}: ${.CURDIR}/Makefile

configargs.h:
	echo 'static const char configuration_arguments[] ='	> ${.TARGET}
	echo '	"FreeBSD/${GCC_ARCH} system compiler";'		>> ${.TARGET}
	echo 'static const char thread_model[] = "posix";'	>> ${.TARGET}

a108 1
	echo '#include "defaults.h"'			>> ${.TARGET}
a109 7
	echo '#ifndef POSIX'				>> ${.TARGET}
	echo '# define POSIX'				>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'			>> ${.TARGET}
	echo '#include "insn-codes.h"'			>> ${.TARGET}
	echo '#include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
d116 1
a116 1
	echo 'static const char *const multilib_raw[] = { \
d118 1
a118 1
	echo 'static const char *const multilib_matches_raw[] = { \
d120 1
a120 3
	echo 'static const char *multilib_extra = "";'	>> ${.TARGET}
	echo 'static const char *const multilib_exclusions_raw[] = { \
	    NULL };'					>> ${.TARGET}
a124 1
	echo '#include "objc/lang-options.h"'		>> ${.TARGET}
a133 6
	echo '#include "defaults.h"'			>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'			>> ${.TARGET}
	echo '#include "insn-codes.h"'			>> ${.TARGET}
	echo '#include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo '#define USING_SJLJ_EXCEPTIONS 0'		>> ${.TARGET}
d135 1
a135 1
#	KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !!
d137 1
a137 2
	echo '#include "gansidecl.h"'			> ${.TARGET}
	echo '#include "${GCC_ARCH}/${GCC_ARCH}.h"'	>> ${.TARGET}
a140 1
	echo '#include <freebsd-native.h>'		>> ${.TARGET}
d142 1
a149 8
	echo '#include "defaults.h"'			>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'			>> ${.TARGET}
	echo '#include "insn-codes.h"'			>> ${.TARGET}
	echo '#include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}

tm_p.h:
	echo '#include "${GCC_ARCH}/${GCC_ARCH}-protos.h"' > ${.TARGET}
a150 4
	echo '#ifndef GENERATOR_FILE'			>> ${.TARGET}
	echo '#include "insn-codes.h"'			>> ${.TARGET}
	echo '#include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
d160 2
d179 1
a179 1
${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngensupport+%DIKED.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nrtl.o}: ${SRCS:M*.h}
a189 13

#GENSRCS+=	safe-ctype.h
${OBJS} gensupport+%DIKED.o: safe-ctype.h
safe-ctype.h: Makefile
	echo '#include <ctype.h>'	> ${.TARGET}
.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL
	echo '#define	${Z}	${Z:L}'	>> ${.TARGET}
.endfor
	echo "#define	ISIDST(x)	((x) == '_' || isalpha(x))"	>> ${.TARGET}
	echo "#define	ISIDNUM(x)	(isdigit(x) || ISIDST(x))"	>> ${.TARGET}
	echo "#define	IS_VSPACE(x)	((x) == '\n' || (x) == '\r')"	>> ${.TARGET}
	echo "#define	IS_NVSPACE(x)	(!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))"	>> ${.TARGET}
	echo "#define	IS_SPACE_OR_NUL(x)	(isspace(x) || (x) == '\0')"	>> ${.TARGET}
@


1.52.2.2
log
@MFC: remove 2.6.3 cc_int shlib cruft and s/GNU_ARCH/TARGET_ARCH/g.
@
text
@d98 1
a98 1
	echo '	"FreeBSD/${TARGET_ARCH} system compiler";'		>> ${.TARGET}
d102 12
a113 12
	echo '#include "auto-host.h"'				> ${.TARGET}
	echo '#include "gansidecl.h"'				>> ${.TARGET}
	echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"'	>> ${.TARGET}
	echo '#include "defaults.h"'				>> ${.TARGET}
	echo '#include "hwint.h"'				>> ${.TARGET}
	echo '#ifndef POSIX'					>> ${.TARGET}
	echo '# define POSIX'					>> ${.TARGET}
	echo '#endif'						>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'				>> ${.TARGET}
	echo '#include "insn-codes.h"'				>> ${.TARGET}
	echo '#include "insn-flags.h"'				>> ${.TARGET}
	echo '#endif'						>> ${.TARGET}
d139 8
a146 8
	echo '#include "gansidecl.h"'				> ${.TARGET}
	echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"'	>> ${.TARGET}
	echo '#include "defaults.h"'				>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'				>> ${.TARGET}
	echo '#include "insn-codes.h"'				>> ${.TARGET}
	echo '#include "insn-flags.h"'				>> ${.TARGET}
	echo '#endif'						>> ${.TARGET}
	echo '#define USING_SJLJ_EXCEPTIONS 0'			>> ${.TARGET}
d150 4
a153 4
	echo '#include "gansidecl.h"'				> ${.TARGET}
	echo '#include "${TARGET_ARCH}/${TARGET_ARCH}.h"'	>> ${.TARGET}
.if ${TARGET_ARCH} == "i386"
	echo '#include "${TARGET_ARCH}/att.h"'			>> ${.TARGET}
d155 4
a158 4
	echo '#include <freebsd-native.h>'			>> ${.TARGET}
	echo '#include <freebsd.h>'				>> ${.TARGET}
.if exists(${GCCDIR}/config/${TARGET_ARCH}/elf.h)
	echo '#include "${TARGET_ARCH}/elf.h"'			>> ${.TARGET}
d160 3
a162 3
	echo '#include "${TARGET_ARCH}/freebsd.h"'		>> ${.TARGET}
.if ${TARGET_ARCH} == "i386"
	echo '#include "${TARGET_ARCH}/perform.h"'		>> ${.TARGET}
d164 5
a168 5
	echo '#include "defaults.h"'				>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'				>> ${.TARGET}
	echo '#include "insn-codes.h"'				>> ${.TARGET}
	echo '#include "insn-flags.h"'				>> ${.TARGET}
	echo '#endif'						>> ${.TARGET}
d171 6
a176 6
	echo '#include "${TARGET_ARCH}/${TARGET_ARCH}-protos.h"' > ${.TARGET}
	echo '#include <freebsd-native.h>'			>> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'				>> ${.TARGET}
	echo '#include "insn-codes.h"'				>> ${.TARGET}
	echo '#include "insn-flags.h"'				>> ${.TARGET}
	echo '#endif'						>> ${.TARGET}
@


1.52.2.3
log
@Bmake bits for GCC 3.1.
@
text
@d14 1
a14 1
CFLAGS+=	-I.
a19 2
CFLAGS+=	-static -DGENERATOR_FILE

d23 8
d44 2
a45 2
gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o        ggc-none.o hashtab.o read-rtl.o
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d54 2
a55 2
gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport.o        ggc-none.o hashtab.o read-rtl.o
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d61 1
a61 1
SRCS+=		bitmap.c errors.c gensupport.c        ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c read-rtl.c
d63 1
a63 1
.for F in check genrtl preds
d67 1
a67 1
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
a87 7
# Predicates stuff.

tm-preds.h: genpreds
	./genpreds > ${.TARGET}
GENSRCS+=	tm-preds.h

#-----------------------------------------------------------------------
d90 1
a90 1
COMMONHDRS=	config.h hconfig.h multilib.h options.h specs.h tconfig.h \
d94 1
a94 2
MFILE?=	${.CURDIR}/Makefile
${COMMONHDRS}: ${MFILE}
d101 13
a113 3
hconfig.h:
	echo '#include "auto-host.h"'			> ${.TARGET}
	echo '#include <tconfig.h>'			>> ${.TARGET}
d138 9
a146 6
config.h:
	echo '#include <hconfig.h>'			> ${.TARGET}
	echo '#ifndef GENERATOR_FILE'			>> ${.TARGET}
	echo '#include "insn-codes.h"'			>> ${.TARGET}
	echo '#include "insn-flags.h"'			>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
d149 3
a151 11
tconfig.h:
	echo '#ifdef IN_GCC'				> ${.TARGET}
	echo 'struct rtx_def;'				>> ${.TARGET}
	echo 'typedef struct rtx_def *rtx;'		>> ${.TARGET}
	echo 'struct rtvec_def;'			>> ${.TARGET}
	echo 'typedef struct rtvec_def *rtvec;'		>> ${.TARGET}
	echo 'union tree_node;'				>> ${.TARGET}
	echo 'typedef union tree_node *tree;'		>> ${.TARGET}
	echo ''						>> ${.TARGET}
	echo '#include "ansidecl.h"'			>> ${.TARGET}
	echo '#include "${GCC_CPU}/${GCC_CPU}.h"'	>> ${.TARGET}
d153 1
a153 1
	echo '#include "${GCC_CPU}/att.h"'		>> ${.TARGET}
d155 4
a158 3
.if ${TARGET_ARCH} != "alpha"
	echo '#include "dbxelf.h"'			>> ${.TARGET}
	echo '#include "elfos.h"'			>> ${.TARGET}
d160 3
a162 5
	echo '#include <freebsd-native.h>'		>> ${.TARGET}
	echo '#include "freebsd-spec.h"'		>> ${.TARGET}
	echo '#include "freebsd.h"'			>> ${.TARGET}
.if ${TARGET_ARCH} == "alpha"
	echo '#include "${GCC_CPU}/elf.h"'		>> ${.TARGET}
d164 5
a168 12
.if ${TARGET_ARCH} != "i386"
.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
	echo '#include "${GCC_CPU}/sysv4.h"'		>> ${.TARGET}
.endif
.endif
	echo '#include "${GCC_CPU}/freebsd.h"'		>> ${.TARGET}
	echo '#include "defaults.h"'			>> ${.TARGET}
	echo '#ifndef POSIX'				>> ${.TARGET}
	echo '# define POSIX'				>> ${.TARGET}
	echo '#endif'					>> ${.TARGET}
	echo '#define CONFIG_SJLJ_EXCEPTIONS 0'		>> ${.TARGET}
	echo '#endif /* IN_GCC */'			>> ${.TARGET}
d171 5
a175 2
	echo '#ifdef IN_GCC'					> ${.TARGET}
	echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"'	>> ${.TARGET}
a176 18
	echo '#include "tm-preds.h"'				>> ${.TARGET}

safe-ctype.h: Makefile
	echo '#include <ctype.h>'				> ${.TARGET}
.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM \
    ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL
	echo '#define ${Z}	${Z:L}'				>> ${.TARGET}
.endfor
	echo "#define ISIDST(x)		\
		((x) == '_' || isalpha(x))"			>> ${.TARGET}
	echo "#define ISIDNUM(x)	\
		(isdigit(x) || ISIDST(x))"			>> ${.TARGET}
	echo "#define IS_VSPACE(x)	\
		((x) == '\n' || (x) == '\r')"			>> ${.TARGET}
	echo "#define IS_NVSPACE(x)	\
		(!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))"	>> ${.TARGET}
	echo "#define IS_SPACE_OR_NUL(x)	\
		(isspace(x) || (x) == '\0')"			>> ${.TARGET}
d203 1
a203 1
${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngenpreds.o:Ngensupport.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nread-rtl.o:Nrtl.o}: ${SRCS:M*.h}
a212 1
genpreds.o: ${COMMONHDRS}
d214 13
@


1.52.2.4
log
@Remove the #ifdef IN_GCC junk.  We *know* we are building GCC with these
bits.  Also remove comment about keeping in sync with other instances in
the source tree -- it was too easy to get out of sync, so the other
instances now use this instance.
@
text
@d137 1
d139 2
a140 1
	echo 'struct rtx_def;'				> ${.TARGET}
d173 1
d176 1
d178 1
@


1.51
log
@Include `dbxelf.h' via tm.h (the approved FSF/GNU way) vs. in our MI header.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.50 2000/12/03 00:11:19 obrien Exp $
d159 2
@


1.50
log
@tm.h should include the platform specific ELF header if it exists.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.49 2000/03/23 10:18:22 obrien Exp $
d135 1
a135 1
#	KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !!
d142 1
@


1.49
log
@Clean up the FreeBSD configuration files -- includes removing the usage
of svr4.h on the i386, and moving all the shared arch neutral bits into
the FreeBSD general config header.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.48 2000/01/29 12:38:21 obrien Exp $
d142 3
@


1.48
log
@"Rev.1.45 of cc_tools/Makefile was a wrong fix for a problem introduced
in rev.1.44 (the egcs to gcc switch).  The problem is that print-rtl.o
is now needed to build some tools, but it wasn't added to the list of
objects which are specially handled because they are prerequisites for
tools."

Submitted by:	bde
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.47 2000/01/24 09:17:07 obrien Exp $
a139 1
	echo '#include "svr4.h"'			>> ${.TARGET}
@


1.48.2.1
log
@MFC: rev 1.49 [don't include svr4.h as it is not needed by the FreeBSD
               config cleanup]
@
text
@d1 1
a1 1
# $FreeBSD$
d140 1
@


1.48.2.2
log
@MFC: rev 1.50 (include platform elf.h if exists)
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.48.2.1 2000/07/04 05:42:47 obrien Exp $
a141 3
.if exists(${GCCDIR}/config/${GCC_ARCH}/elf.h)
	echo '#include "${GCC_ARCH}/elf.h"'		>> ${.TARGET}
.endif
@


1.48.2.3
log
@MFC: rev 1.51 (include `dbxelf.h' via tm.h)
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.48.2.2 2001/03/02 09:21:12 obrien Exp $
d135 1
a135 1
# KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !!
a141 1
	echo '#include "dbxelf.h"'			>> ${.TARGET}
@


1.48.2.4
log
@MFC: rev 1.52 (build .depend during "build-world" stage)
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.48.2.3 2001/03/02 09:24:15 obrien Exp $
a158 2

build-tools: depend
@


1.48.2.5
log
@MFC: move creation of insn-*.c files from cc_tools to cc_int, to improve
     the situation of cross builds.
@
text
@d1 1
a1 1
# $FreeBSD$
d29 5
a33 3
GENSRCS+=	gen-time-stamp
gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrecog
	touch ${.TARGET}
@


1.48.2.6
log
@MFC: update to Gcc 2.95.4
@
text
@a14 1
CFLAGS+=	-static
d36 2
a37 2
gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d47 1
a47 1
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d59 1
a59 1
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d104 4
a107 4
	echo '#include "auto-host.h"'				> ${.TARGET}
	echo '#include "gansidecl.h"'				>> ${.TARGET}
	echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"'	>> ${.TARGET}
	echo '#include "hwint.h"'				>> ${.TARGET}
d130 2
a131 2
	echo '#include "gansidecl.h"'				> ${.TARGET}
	echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"'	>> ${.TARGET}
d135 3
a137 3
	echo '#include "${TARGET_ARCH}/${TARGET_ARCH}.h"'	> ${.TARGET}
.if ${TARGET_ARCH} == "i386"
	echo '#include "${TARGET_ARCH}/att.h"'			>> ${.TARGET}
d139 4
a142 4
	echo '#include <freebsd.h>'				>> ${.TARGET}
	echo '#include "dbxelf.h"'				>> ${.TARGET}
.if exists(${GCCDIR}/config/${TARGET_ARCH}/elf.h)
	echo '#include "${TARGET_ARCH}/elf.h"'			>> ${.TARGET}
d144 3
a146 3
	echo '#include "${TARGET_ARCH}/freebsd.h"'		>> ${.TARGET}
.if ${TARGET_ARCH} == "i386"
	echo '#include "${TARGET_ARCH}/perform.h"'		>> ${.TARGET}
d148 1
a148 1
	echo '#include <freebsd-native.h>'			>> ${.TARGET}
@


1.48.2.7
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/gnu/usr.bin/cc/cc_tools/Makefile 98520 2002-06-20 23:13:31Z obrien $
@


1.47
log
@Simply cc_tools/Makefile by moving the parser generation to the respective
backends.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.46 2000/01/23 22:46:00 obrien Exp $
d67 1
a67 1
.ORDER: genrtl.c genrtl.h print-rtl.o
d180 2
a181 2
bitmap.o genattr.o gencodes.o genconfig.o genflags.o obstack.o rtl.o: \
    ${SRCS:M*.h:Ninsn-*.h}
@


1.46
log
@I *hate* using "i" in variables, looks too much like "1" or "l".
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.45 1999/11/17 15:50:45 obrien Exp $
a19 2
CFLAGS+=	-I${GCCDIR}/objc

a98 30
#-----------------------------------------------------------------------
# C parser
.ORDER: c-parse.c c-parse.h
c-parse.c c-parse.h: c-parse.in
	sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
	    -e "/^ifc$$/d" -e "/^end ifc$$/d" \
	    ${GCCDIR}/c-parse.in > c-parse.y
	${YACC} -d -o c-parse.c c-parse.y
	mv c-parse.y c-parse.y.out

GENSRCS+=	c-parse.c c-parse.h
CLEANFILES+=	c-parse.y c-parse.y.out		# insurance

#-----------------------------------------------------------------------
# objc parser
.ORDER: objc-parse.c objc-parse.h
objc-parse.c objc-parse.h: c-parse.in
	sed -e "/^ifc$$/,/^end ifc$$/d" \
	    -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
	    ${GCCDIR}/c-parse.in > objc-parse.y
	${YACC} -d -o objc-parse.c objc-parse.y
	mv objc-parse.y objc-parse.y.out

GENSRCS+=	objc-parse.c objc-parse.h
CLEANFILES+=	objc-parse.y objc-parse.y.out	# insurance

#-----------------------------------------------------------------------
# C++ parser done in its own makefile
#-----------------------------------------------------------------------
# CPP parser done in its own makefile
@


1.45
log
@Build genrtl.h before print-rtl.o.

Submitted by:	John Hay <jhay@@mikom.csir.co.za> (basic idea, changed by me)
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.44 1999/11/15 04:16:14 obrien Exp $
d25 4
a28 4
.for i in attr codes config flags
insn-$i.h: gen$i ${MD_FILE}
	./gen$i ${MD_FILE} > insn-$i.h
GENSRCS+=	insn-$i.h
d31 4
a34 4
.for i in attrtab emit extract opinit output peep recog
insn-$i.c: gen$i ${MD_FILE}
	./gen$i ${MD_FILE} > insn-$i.c
GENSRCS+=	insn-$i.c
d37 2
a38 2
.for i in attr codes config emit extract flags opinit output peep recog
build-tools: gen$i
d40 1
a40 1
gen$i: gen$i.o rtl.o obstack.o print-rtl.o bitmap.o
d43 2
a44 2
GENSRCS+=	gen$i.c
CLEANFILES+=	gen$i
d47 2
a48 2
.for i in attrtab
build-tools: gen$i
d50 1
a50 1
gen$i: gen$i.o rtl.o rtlanal.o print-rtl.o obstack.o bitmap.o
d53 2
a54 2
GENSRCS+=	gen$i.c
CLEANFILES+=	gen$i
d59 2
a60 2
.for i in check genrtl
build-tools: gen$i
d62 1
a62 1
gen$i: gen$i.o
d65 2
a66 2
GENSRCS+=	gen$i.c
CLEANFILES+=	gen$i
@


1.44
log
@Cut over the system compiler from from EGCS 1.1.2 to GCC 2.95.2.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.43 1999/11/15 00:29:00 obrien Exp $
d69 1
a69 1
.ORDER: genrtl.c genrtl.h
@


1.43
log
@Purely cosmetic changes to lineup targets.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.42 1999/10/30 08:08:29 obrien Exp $
d40 1
a40 1
gen$i: gen$i.o rtl.o obstack.o bitmap.o
d135 1
a135 1
GENSRCS+=	${COMMONHDRS}
d139 1
d141 5
d161 1
d164 2
a165 1
	echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"'	> ${.TARGET}
d167 1
d174 1
d206 1
a206 1
${OBJS:Nbitmap.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Nobstack.o:Nrtl.o}: ${SRCS:M*.h}
d214 1
a214 1
gencheck.o: ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h}
@


1.42
log
@`make' will fail if hash.h exists for some reason and gxx-hash needs to be
rebuilt.  Fix this.

Submitted by:	bde
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.41 1999/10/12 20:27:53 obrien Exp $
d138 2
a139 2
	echo '#include "auto-host.h"' > ${.TARGET}
	echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET}
d143 1
a143 1
	    "aout maout;", "elf !maout;", NULL };' > ${.TARGET}
d145 2
a146 2
	    "maout maout;", "melf melf;", NULL };' >> ${.TARGET}
	echo 'static char *multilib_extra = "";' >> ${.TARGET}
d149 2
a150 2
	echo '#include "cp/lang-options.h"' > ${.TARGET}
	echo '#include "f/lang-options.h"' >> ${.TARGET}
d153 2
a154 2
	echo '#include "cp/lang-specs.h"' > ${.TARGET}
	echo '#include "f/lang-specs.h"'    >> ${.TARGET}
d157 1
a157 1
	echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' > ${.TARGET}
d160 1
a160 1
	echo '#include "${GCC_ARCH}/${GCC_ARCH}.h"' > ${.TARGET}
d162 2
a163 2
	echo '#include "${GCC_ARCH}/att.h"' >> ${.TARGET}
	echo '#include "svr4.h"' >> ${.TARGET}
d165 1
a165 1
	echo '#include "${GCC_ARCH}/freebsd.h"' >> ${.TARGET}
d167 1
a167 1
	echo '#include "${GCC_ARCH}/perform.h"' >> ${.TARGET}
d169 1
a169 1
	echo '#include <freebsd-native.h>' >> ${.TARGET}
@


1.41
log
@Add a comment explaing the linking and segrated the old and new cases a little.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.40 1999/10/12 20:25:11 obrien Exp $
d91 1
a91 1
	ln -s ${.ALLSRC} ${.TARGET}
@


1.40
log
@Change the name of the file generaged from gxx.gperf from "hash.h" to
"gxx-hash.h" with hopes of getting Cygnus to do the same.  We create a link
to the old name for now.
@
text
@d1 1
a1 1
# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.39 1999/08/27 23:35:17 peter Exp $
d87 1
d89 1
d92 1
a92 1
GENSRCS+=	gxx-hash.h hash.h
@


1.39
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
d84 1
a84 1
hash.h: gxx.gperf
d86 5
a90 2
	    ${GCCDIR}/cp/gxx.gperf >hash.h
GENSRCS+=	hash.h
@


1.38
log
@Make gcc work on the Alpha again.  alpha/alpha.h is used instead of svr4.h
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.37 1999/08/16 09:55:16 obrien Exp $
@


1.37
log
@Rev 1.36 also includes functional chagnes I intended to commit seperately.
Configuration header inclusion has been moved around to reduce diffs from
the offical GCC distribution.  We now generate the same ``tm.h'' produced by
gcc's `configure' script [minus all the "#ifdef IN_GCC"'s].

Jeff Law of EGCS/Cygus says the new "approved" way of doing configure-related
includes is to list them all in ``tm.h'' rather than having the architure
config headers include large numbers of other configure headers.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.36 1999/08/16 04:10:44 obrien Exp $
d158 1
a159 1
	echo '#include "svr4.h"' >> ${.TARGET}
@


1.36
log
@Purely cosmetic cleanups.
 - Id tag layout wrong.
 - "FOO =" -> "FOO=".
 - 4 space indention on continuation lines rather than a <tab>

Basic idea checked by:	bde
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.35 1999/08/14 22:40:01 obrien Exp $
@


1.35
log
@Rather than deleting the grammer files during building, move them out of the
way.  This way they are available for inspection when debugging problems.
@
text
@d1 1
a1 3
#
# $Id: Makefile,v 1.34 1999/07/28 07:22:06 obrien Exp $
#
d13 1
a13 1
#
d79 1
a79 1
		${GCCDIR}/c-parse.gperf > ${.TARGET}
d86 1
a86 1
		${GCCDIR}/cp/gxx.gperf >hash.h
d156 4
@


1.34
log
@Use Yacc rather than Bison.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.33 1999/07/28 07:19:38 obrien Exp $
d106 1
a106 1
	rm -f c-parse.y
d109 1
a109 1
CLEANFILES+=	c-parse.y		# insurance
d119 1
a119 1
	rm -f objc-parse.y
d122 1
a122 1
CLEANFILES+=	objc-parse.y		# insurance
@


1.33
log
@The Unix way is arguments come before an input file name, not after.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.32 1999/04/28 18:48:08 obrien Exp $
d105 1
a105 1
	${BISON} -d -o c-parse.c c-parse.y
d118 1
a118 1
	${BISON} -d -o objc-parse.c objc-parse.y
@


1.32
log
@Rather than hack config/freebsd.h to contain our hacks for a native compiler,
just include them in tm.h (as built from cc/cc_tools/Makefile).

This will reduce the diffs from the vendor sources.

Excellent idea by:	jdp
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.31 1999/04/22 20:12:21 obrien Exp $
d105 1
a105 1
	${BISON} -d c-parse.y -o c-parse.c 
d118 1
a118 1
	${BISON} -d objc-parse.y -o objc-parse.c 
@


1.31
log
@Sorry didn't get this in the last commit: MACHINE_ARCH changes courtesy
of Warner Losh <imp@@village.org>.  (he's got plans for FreeBSD mips :-))
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.30 1999/04/22 19:35:16 obrien Exp $
d162 1
@


1.30
log
@Use `GNU_ARCH' in most places where `MACHINE_ARCH' was used.  Building for
mips has some particularlies.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.28 1999/04/18 09:44:36 obrien Exp $
@


1.29
log
@Have config/i386/freebsd.h directly include att.h.  I have no idea why stock
EGCS doesn't just do this.  None of the rest of our other platforms will need
this file.
@
text
@d136 1
a136 1
	echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET}
d154 1
a154 1
	echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' > ${.TARGET}
d157 4
a160 4
	echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
	echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
	echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
@


1.28
log
@Add FORTRAN support.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.27 1999/04/11 04:32:42 bde Exp $
a157 3
.if ${MACHINE_ARCH} == "i386"
	echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
.endif
@


1.27
log
@Cleaned up egcs changes (mainly to minimise diffs with the gcc version
and restore order to sorted lists).
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.26 1999/04/11 04:11:27 bde Exp $
d147 1
a147 1
	#echo '#include "f/lang-options.h"' >> ${.TARGET}
d151 1
a151 1
	#echo '#include "f/lang-specs.h"'    >> ${.TARGET}
@


1.26
log
@Fixed unusable dependencies in `.depend'.  The following comment in the
code still applies, but the code attached to it had rotted:

# ../Makefile.inc will put an absolute path to our objdir in CFLAGS.
# Prevent mkdep from using it, so that we don't have to give rules for
# aliases of generated headers.

Many other makefiles seem to have the same bug (i.e., spelling "." as
"${.OBJDIR}" or as an even more complicated alias in -I directives).
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.25 1999/04/09 18:46:48 bde Exp $
d20 2
a23 2
.PATH: ${GCCDIR} ${GCCDIR}/cp

d49 1
a49 1
.for i in check genrtl
d52 1
a52 1
gen$i: gen$i.o
d59 1
a59 3
.ORDER: genrtl.c genrtl.h
genrtl.h genrtl.c: gengenrtl
	./gengenrtl genrtl.h genrtl.c
d61 1
a61 3
GENSRCS+=	genrtl.c genrtl.h

.for i in attrtab
d64 1
a64 1
gen$i: gen$i.o rtl.o rtlanal.o print-rtl.o obstack.o bitmap.o
d71 6
a76 1
SRCS+=		bitmap.c print-rtl.c rtl.c rtlanal.c obstack.c
d92 1
a92 1
# common parser stuff
d131 1
a131 1
COMMONHDRS=	config.h hconfig.h options.h specs.h tconfig.h tm.h multilib.h
d138 6
a143 2
tconfig.h:
	echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' > ${.TARGET}
d153 3
a164 5

multilib.h: genmultilib
	echo 'static char *multilib_raw[] = {"aout maout;", "elf !maout;", NULL};' > multilib.h
	echo 'static char *multilib_matches_raw[] = {"maout maout;", "melf melf;", NULL};' >> multilib.h
	echo 'static char *multilib_extra = "";' >> multilib.h
@


1.25
log
@Fixed world breakage.  Fixed (?) building with -jN (N > 1).

The previous commit made things worse by breaking the -j0 case and
moving around the breakage for the -jN case.  The fix involves
restoring .ORDER statements that were deleted in the previous commit,
removing wrong special handling of tree-check.h, and rewriting the
generation of fudged dependencies based on an idea I got from the
previous commit (filter out problematic objects first).
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.24 1999/04/08 23:37:46 obrien Exp $
d16 1
a16 1
CFLAGS+=	-I${GCCDIR}/objc
d19 2
@


1.24
log
@Another fix for -jN building -- the last fix didn't fix it for everybody.

Submitted by:	Luoqi Chen <luoqi@@watermarkgroup.com>
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.23 1999/04/08 15:11:44 peter Exp $
d57 1
a90 4
.for i in c objc
$i-parse.c: tree-check.h
.endfor

d93 1
a93 2

CLEANFILES+=	tree-check.h
d97 1
d110 1
d180 16
a195 17
# Fudge pre-dependfile dependencies of objects the same as bsd.prog.mk
# would do if we defined PROG, except for leaving out dependencies on
# insn-*.h because these dependencies would be circular.
#
${OBJS:Ngengenrtl.o}: ${SRCS:M*.h:Ninsn-*.h}

# Give all dependencies on insn-*.h explicitly
# This suffices for `make -j<any> depend', and after that all
# the dependencies will be in .depend since all .c source files are in
# SRCS.
#
genattrtab.o genextract.o: insn-config.h
insn-attrtab.o: insn-attr.h insn-config.h
insn-emit.o: insn-codes.h insn-config.h insn-flags.h
insn-opinit.o: insn-codes.h insn-config.h insn-flags.h
insn-output.o: insn-attr.h insn-codes.h insn-config.h insn-flags.h
insn-recog.o: insn-config.h
@


1.23
log
@Clean up the multilib stuff so that it actually works..
cc -aout now works again.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.22 1999/04/08 12:26:07 obrien Exp $
a100 1
.ORDER: c-parse.c c-parse.h
a112 1
.ORDER: objc-parse.c objc-parse.h
d186 1
a186 3
# XXX pre-egcs we used something simular to this line.  Now it causes cycles...
# ${OBJS}: ${SRCS:M*.h:Ninsn-*.h:Ntree-check.h:Ngenrtl.h}
${OBJS}: ${COMMONHDRS:M*.h}
a198 2

genattr.o gencodes.o genconfig.o genemit.o genextract.o genflags.o genopinit.o genoutput.o genpeep.o genrecog.o: genrtl.h
@


1.22
log
@Remove some of the dependencies.  This removes the cycles I was getting on
`make -j 8' builds.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.21 1999/04/08 09:57:51 obrien Exp $
d161 2
a162 3
	echo 'static char *multilib_raw[] = {"aout maout;elf !maout;", NULL};' > multilib.h
	echo 'static char *orig_port_multilib_raw[] = {".;", NULL};' >> multilib.h
	echo 'static char *multilib_matches_raw[] = {NULL};' >> multilib.h
@


1.21
log
@Due to other explicit dependancies, don't treat tree-check.h as a SRCS.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.20 1999/04/08 09:21:52 obrien Exp $
d189 3
a191 1
${OBJS}: ${SRCS:M*.h:Ninsn-*.h:Ngenrtl.h}
@


1.20
log
@Fix a circular dependancy.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.18 1999/04/05 10:18:50 peter Exp $
d97 1
a97 1
GENSRCS+=	tree-check.h
d189 1
a189 1
${OBJS}: ${SRCS:M*.h:Ninsn-*.h:Ntree-check.h:Ngenrtl.h}
@


1.19
log
@alpha/freebsd-elf.h is being folded into alpha/freebsd.h

Submitted by:	Hidetoshi Shimokawa <simokawa@@sat.t.u-tokyo.ac.jp>
@
text
@d60 1
a60 2
#GENSRCS+=	genrtl.c genrtl.h
CLEANFILES+=	genrtl.c genrtl.h
d97 1
a97 2
##GENSRCS+=	tree-check.h
CLEANFILES+=	tree-check.h
d189 1
a189 1
${OBJS}: ${SRCS:M*.h:Ninsn-*.h}
@


1.18
log
@Fix type mismatch..
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.17 1999/04/04 20:46:52 obrien Exp $
a159 2
.elif ${MACHINE_ARCH} == "alpha"
	echo '#include "${MACHINE_ARCH}/freebsd-elf.h"' >> ${.TARGET}
@


1.17
log
@Conditionalize one more i386'ism.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.16 1999/04/04 20:40:45 obrien Exp $
d168 1
a168 1
	echo 'static char **multilib_extra = "";' >> multilib.h
@


1.16
log
@Attempt at creating the right ``tm.h'' file for the Alpha.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.15 1999/04/04 16:36:34 obrien Exp $
d154 1
d156 1
@


1.15
log
@Minimum set of changes to switch from Gcc 2.7.2 (in contrib/gcc) to Egcs 1.1.2
(in contrib/egcs)
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.16 1999/03/05 04:55:03 obrien Exp $
d156 1
d158 3
@


1.14
log
@Split up rule for ${COMMONHDRS} so that `make -j N' doesn't create the
6 headers up to 6 times concurrently.  Debugged by Don Lewis
(Don.Lewis@@tsc.tdk.com).

Fixed some disorder.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.13 1998/08/20 21:45:46 jb Exp $
d16 1
a16 1
CFLAGS+=	-I.
d20 1
a20 22
#-----------------------------------------------------------------------
# Bytecode components

.for i in arity opcode opname
build-tools: bi-$i

bc-$i.h: bi-$i bytecode.def
	./bi-$i < ${GCCDIR}/bytecode.def > bc-$i.h

bi-$i: bi-$i.o bi-parser.o bi-lexer.o bi-reverse.o
	${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}

GENSRCS+=	bc-$i.h bi-$i.c
CLEANFILES+=	bi-$i
.endfor

.ORDER: bi-parser.c bi-parser.h
bi-parser.c bi-parser.h: bi-parser.y
	${BISON} ${BISONFLAGS} -d ${.ALLSRC} -o bi-parser.c

SRCS+=		bi-lexer.c bi-reverse.c
GENSRCS+=	bi-parser.c bi-parser.h
d40 1
a40 1
gen$i: gen$i.o rtl.o obstack.o
d47 16
d66 1
a66 1
gen$i: gen$i.o rtl.o rtlanal.o print-rtl.o obstack.o
d73 1
a73 2
SRCS+=		print-rtl.c rtl.c rtlanal.c obstack.c

d89 13
d134 1
a134 1
COMMONHDRS=	config.h hconfig.h options.h specs.h tconfig.h tm.h
d137 7
a143 2
config.h hconfig.h tconfig.h:
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > ${.TARGET}
d146 2
d149 3
a151 2
	echo '#include "cp/lang-specs.h"'> ${.TARGET}
	echo '#include "f2c-specs.h"'    >> ${.TARGET}
d153 10
a162 1
	echo '#include "${MACHINE_ARCH}/freebsd.h"' > ${.TARGET}
d185 1
a185 1
# bc-*.h and insn-*.h because these dependencies would be circular.
d187 1
a187 1
${OBJS}: ${SRCS:M*.h:Nbc-*.h:Ninsn-*.h}
d189 2
a190 2
# Give all dependencies on bc-*.h and insn-*.h explicitly (none here for
# bc-*.h).  This suffices for `make -j<any> depend', and after that all
d200 2
@


1.14.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.13
log
@Make the build tools static to avoid trying to use the shared loader
before it is installed.

This upsets Bruce because the host boostrap build forces tools to be
static anyway. He says I'm abusing NOTOOLS in src/Makefile by using
it to do a aout->elf transition build. One day I'll find a place to
install host tools like these to allow a true cross build.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.12 1998/07/07 01:46:41 bde Exp $
d127 2
a128 10
COMMONHDRS=	config.h hconfig.h tconfig.h tm.h options.h specs.h

${COMMONHDRS}:
	echo '#include "${MACHINE_ARCH}/freebsd.h"'     > tm.h
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > config.h
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > hconfig.h
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > tconfig.h
	echo '#include "cp/lang-options.h"'             > options.h
	echo '#include "cp/lang-specs.h"'               > specs.h
	echo '#include "f2c-specs.h"'                   >> specs.h
d130 9
a138 1
GENSRCS+=	${COMMONHDRS}
@


1.12
log
@Added a `build-tools' target for internal tools.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.11 1998/04/23 16:30:51 bde Exp $
d30 1
a30 1
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d62 1
a62 1
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
d72 1
a72 1
	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
@


1.11
log
@Fixed missing dependencies.  The critical missing one was of bi-lexer.o
on bi-parser.h.  Not having it sometimes (only with `make -j') triggered
a bug suite that led to ordinary cpp output being put in .depend files.
Various bugs (the main one only with `make -j') prevented timely detection
of failure to build and install gnu/usr.bin/cc.  Eventually the missing
${WORLDTMP}/usr/libexec/cpp caused ${WORLDTMP}/usr/bin/cpp to be invoked
by cc, and this version of cpp is not suitable for such invocation.
Ordinary cpp output was put in .depend files when cpp terminated options
processing before seeing the -M flag.

Cleaned up.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.10 1998/03/23 11:50:38 bde Exp $
d24 2
d59 2
d69 2
@


1.10
log
@Honour -static in LDLAGS.  ld without -Bstatic is happy to choose
static libraries if there are no shared libraries in the search path,
but gcc without -static blindly attempts to link crt0.o.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.9 1998/03/12 12:52:24 bde Exp $
d12 6
d24 1
a24 1
bc-$i.h:	bi-$i bytecode.def
d27 1
a27 1
bi-$i:	bi-$i.o bi-parser.o bi-lexer.o bi-reverse.o
d30 2
a31 3
SRCS+= bc-$i.h
LOCOBJS+= bi-$i.o
CLEANFILES+= bi-$i bi-$i.o
d35 1
a35 1
bi-parser.c bi-parser.h:	bi-parser.y
d38 2
a39 4
SRCS+= bi-parser.c bi-parser.h

LOCOBJS+= bi-lexer.o bi-parser.o bi-reverse.o
CLEANFILES+= bi-lexer.o bi-parser.o bi-reverse.o
d44 2
a45 2
.for i in config flags codes attr
insn-$i.h:	gen$i ${MD_FILE}
d47 1
a47 1
SRCS+= insn-$i.h
d50 2
a51 2
.for i in emit recog opinit extract peep attrtab output
insn-$i.c:	gen$i ${MD_FILE}
d53 1
a53 1
SRCS+= insn-$i.c
d56 2
a57 2
.for i in config flags codes emit opinit recog extract peep attr output
gen$i:	gen$i.o rtl.o obstack.o
d60 2
a61 3
gen$i.o:	gen$i.c ${RTL_H}
LOCOBJS+= gen$i.o
CLEANFILES+= gen$i gen$i.o
d65 1
a65 1
gen$i:	gen$i.o rtl.o rtlanal.o print-rtl.o obstack.o
d68 2
a69 3
gen$i.o:	gen$i.c ${RTL_H}
LOCOBJS+= gen$i.o
CLEANFILES+= gen$i gen$i.o
d72 1
a72 2
LOCOBJS+= print-rtl.o rtl.o rtlanal.o obstack.o
CLEANFILES+= print-rtl.o rtl.o rtlanal.o obstack.o
d79 1
a79 1
SRCS+=	c-gperf.h
d86 1
a86 1
SRCS+=	hash.h
d98 2
a99 2
SRCS+=	c-parse.c c-parse.h
CLEANFILES+= c-parse.y		# insurance
d111 2
a112 2
SRCS+=	objc-parse.c objc-parse.h
CLEANFILES+= objc-parse.y		# insurance
d132 1
a132 1
SRCS+=	${COMMONHDRS}
d135 8
a142 2
# Everything in ${SRCS} is generated
CLEANFILES+=	${SRCS}
d145 1
a145 1
all:		${SRCS}
d147 11
a157 7
#-----------------------------------------------------------------------
# We kept ${LOCOBJS} separate from ${OBJS} because adding all the
# objects to ${OBJS} would give too many (cyclic) dependencies.
# Add just enough dependencies for `make -j 1000' to work.
${LOCOBJS}: ${COMMONHDRS}
genattrtab.o:	insn-config.h
genextract.o:	insn-config.h
d159 12
a170 1
.include <bsd.prog.mk>
@


1.9
log
@Fixed `make -jN depend' (N >= 2) by removing the beforedepend
target.  .ORDER doesn't work right, but is used for things related
to the depend target.  It "works" for the depend target by skipping
the build of .depend when N >= 2 and there is a non-default
beforedepend target with no rules.  Recent fixes made almost all
the beforedepend targets in the tree a no-op except for this bug.

Removed vestiges of elf and aout targets.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.8 1998/03/08 05:29:49 peter Exp $
d22 1
a22 1
	${CC} ${.ALLSRC} -o ${.TARGET}
d55 1
a55 1
	${CC} ${.ALLSRC} -o ${.TARGET}
d64 1
a64 1
	${CC} ${.ALLSRC} -o ${.TARGET}
@


1.8
log
@First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.

This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc.  So for now, the support is pretty much dormant.

The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files).  The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.

The initial idea came from i386/osfrose.h which is a dual rose/elf format
target.  These two are not as diverse as a.out and elf it would seem.

The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores.  The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes.  This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)

The default format is a.out (still), nobody should see any major changes.

With both elf and a.out tools and libraries installed:

[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!

[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!

Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)

Reviewed by: sos, jdp
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.7 1998/03/06 13:34:36 bde Exp $
a132 1
CLEANFILES+=	elf aout
d139 1
a139 1
all:		${COMMONHDRS} ${SRCS}
a141 2
beforedepend:	${COMMONHDRS}

@


1.7
log
@Fixed `make -jN' for large N.  The usual method of pretending that all
objects depend on all generated headers doesn't work because it gives
cyclic dependencies.  Give enough dependencies explicitly.  We no
longer need to use .SINGLESHELL for `make depend'.  .SINGLESHELL was
more of a bottleneck than usual because `make depend' makes everything.

Fixed some spelling and English errors.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.6 1998/01/25 09:47:46 jb Exp $
a118 10
# Everything in ${SRCS} is generated
CLEANFILES+=	${SRCS}

#-----------------------------------------------------------------------
all:		${BINFORMAT} ${SRCS}

#-----------------------------------------------------------------------
beforedepend:	${BINFORMAT}

#-----------------------------------------------------------------------
d123 1
a123 4
${COMMONHDRS}:	${BINFORMAT}

aout:
	@@rm -f elf
a130 12
	@@touch aout

elf:
	@@rm -f aout
	echo '#include "${MACHINE_ARCH}/freebsd-elf.h"' > tm.h
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > config.h
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > hconfig.h
	echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > tconfig.h
	echo '#include "cp/lang-options.h"'             > options.h
	echo '#include "cp/lang-specs.h"'               > specs.h
	echo '#include "f2c-specs.h"'                   >> specs.h
	@@touch elf
d134 10
@


1.6
log
@Change MACHINE -> MACHINE_ARCH so that the design make sense on those
machines where the processor chip determines the compiler, and where
multiple machines use the same architecture.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.5 1998/01/11 04:13:25 jb Exp $
d7 1
a7 1
# is such a !@@#!*#% nightmare because of how it reporgrams the dependencies,
d24 2
a26 2
SRCS+= bc-$i.h

d35 1
d58 1
d67 1
d71 1
d115 1
a115 1
# C++ parser done in it's own makefile
d117 1
a117 1
# CPP parser done in it's own makefile
d119 1
a119 1
# All generates sources are cleaned
a125 5
# Make 'depend' in compat mode
.if make(depend)
.SINGLESHELL:
.endif

d131 4
d157 9
a165 1
CLEANFILES+=	config.h hconfig.h tconfig.h tm.h options.h specs.h elf aout
@


1.5
log
@More i386 -> ${MACHINE} changes to make this Makefile machine
independent. It makes it look like you can get aout on alpha, but
that's just your imagination. The makefile above gives you no choice.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.4 1997/10/05 09:39:07 jkh Exp $
d134 7
a140 7
	echo '#include "${MACHINE}/freebsd.h"'     > tm.h
	echo '#include "${MACHINE}/xm-freebsd.h"'  > config.h
	echo '#include "${MACHINE}/xm-freebsd.h"'  > hconfig.h
	echo '#include "${MACHINE}/xm-freebsd.h"'  > tconfig.h
	echo '#include "cp/lang-options.h"'        > options.h
	echo '#include "cp/lang-specs.h"'          > specs.h
	echo '#include "f2c-specs.h"'              >> specs.h
d145 7
a151 7
	echo '#include "${MACHINE}/freebsd-elf.h"' > tm.h
	echo '#include "${MACHINE}/xm-freebsd.h"'  > config.h
	echo '#include "${MACHINE}/xm-freebsd.h"'  > hconfig.h
	echo '#include "${MACHINE}/xm-freebsd.h"'  > tconfig.h
	echo '#include "cp/lang-options.h"'        > options.h
	echo '#include "cp/lang-specs.h"'          > specs.h
	echo '#include "f2c-specs.h"'              >> specs.h
@


1.4
log
@Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@@nnd.itfs.nsk.su>
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.3 1997/02/22 15:44:58 peter Exp $
d134 7
a140 7
	echo '#include "i386/freebsd.h"'     > tm.h
	echo '#include "i386/xm-freebsd.h"'  > config.h
	echo '#include "i386/xm-freebsd.h"'  > hconfig.h
	echo '#include "i386/xm-freebsd.h"'  > tconfig.h
	echo '#include "cp/lang-options.h"'  > options.h
	echo '#include "cp/lang-specs.h"'    > specs.h
	echo '#include "f2c-specs.h"'        >> specs.h
d145 7
a151 7
	echo '#include "i386/freebsd-elf.h"' > tm.h
	echo '#include "i386/xm-freebsd.h"'  > config.h
	echo '#include "i386/xm-freebsd.h"'  > hconfig.h
	echo '#include "i386/xm-freebsd.h"'  > tconfig.h
	echo '#include "cp/lang-options.h"'  > options.h
	echo '#include "cp/lang-specs.h"'    > specs.h
	echo '#include "f2c-specs.h"'        >> specs.h
@


1.3
log
@Revert $FreeBSD$ to $Id$
@
text
@d2 1
a2 1
# $Id$
d29 1
d31 1
a31 1
	${BISON} ${BISONFLAGS} -d ${.ALLSRC} -o ${.TARGET}
d86 1
d99 1
d120 6
@


1.2
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.1
log
@Man the lifeboats!  Tie down the hatches!  Red alert! Activate gcc-2.7.2.1!

(the old cc has been tagged with "gcc_2_6_3_final" so we have a reference
 point in case of unforseen disasters...)

This has the objc backend active, and I think I've managed to get the
f77 f2c support through in one piece, but I don't know fortran to test it.

A 'make world' change and libobjc commit will follow.

If you normally do 'make -DNOCLEAN world', do not do so this time, I know
it can fail with groff.

This version of gcc makes a **LOT** more warnings on our kernel.
@
text
@d2 1
a2 1
# $Id$
@


1.1.2.1
log
@MFC: parallelize
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.1 1996/09/19 15:47:16 peter Exp $
a28 1
.ORDER: bi-parser.c bi-parser.h
d30 1
a30 1
	${BISON} ${BISONFLAGS} -d ${.ALLSRC} -o bi-parser.c
a84 1
.ORDER: c-parse.c c-parse.h
a96 1
.ORDER: objc-parse.c objc-parse.h
a116 6

#-----------------------------------------------------------------------
# Make 'depend' in compat mode
.if make(depend)
.SINGLESHELL:
.endif
@


1.1.2.2
log
@Remove all traces of BINFORMAT here.  It is not meaningful in 2.2 nor will
it ever be meaningful in 2.2.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.1.2.1 1997/10/26 22:47:42 jkh Exp $
d119 1
a119 1
all:		aout ${SRCS}
d127 1
a127 1
beforedepend:	aout
d133 1
d143 12
a154 1
CLEANFILES+=	config.h hconfig.h tconfig.h tm.h options.h specs.h aout
@


1.1.2.3
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@

