freebsd-native.h revision 172592
154359Sroberto/* $FreeBSD: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h 172592 2007-10-12 17:49:12Z obrien $ */
2285612Sdelphij
3285612Sdelphij/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD
454359Sroberto   source tree so it can be configured appropriately without using
575202Sphk   the GNU configure/build mechanism. */
654359Sroberto
7285612Sdelphij#define FREEBSD_NATIVE 1
854359Sroberto
954359Sroberto/* Fake out gcc/config/freebsd<version>.h.  */
10285612Sdelphij#define	FBSD_MAJOR	8
11285612Sdelphij#define	FBSD_CC_VER	800001		/* form like __FreeBSD_version */
12285612Sdelphij
13285612Sdelphij#undef SYSTEM_INCLUDE_DIR		/* We don't need one for now. */
14285612Sdelphij#undef TOOL_INCLUDE_DIR			/* We don't need one for now. */
15285612Sdelphij#undef LOCAL_INCLUDE_DIR		/* We don't wish to support one. */
16285612Sdelphij
17285612Sdelphij/* Look for the include files in the system-defined places.  */
18285612Sdelphij#define GPLUSPLUS_INCLUDE_DIR		PREFIX"/include/c++/4.2"
1954359Sroberto#define	GPLUSPLUS_BACKWARD_INCLUDE_DIR	PREFIX"/include/c++/4.2/backward"
2054359Sroberto#define GCC_INCLUDE_DIR			PREFIX"/include"
2154359Sroberto#ifdef CROSS_COMPILE
2254359Sroberto#define CROSS_INCLUDE_DIR		PREFIX"/include"
23182007Sroberto#else
2454359Sroberto#define STANDARD_INCLUDE_DIR		PREFIX"/include"
25285612Sdelphij#endif
26285612Sdelphij
27285612Sdelphij/* Under FreeBSD, the normal location of the compiler back ends is the
28285612Sdelphij   /usr/libexec directory.
29285612Sdelphij
30285612Sdelphij   ``cc --print-search-dirs'' gives:
31289997Sglebius   install: STANDARD_EXEC_PREFIX/
32285612Sdelphij   programs: STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX
33285612Sdelphij   libraries: STANDARD_STARTFILE_PREFIX
34285612Sdelphij*/
3554359Sroberto#undef	STANDARD_BINDIR_PREFIX		/* We don't need one for now. */
3654359Sroberto#define	STANDARD_EXEC_PREFIX		PREFIX"/libexec/"
3754359Sroberto#define	STANDARD_LIBEXEC_PREFIX		PREFIX"/libexec/"
3854359Sroberto#define TOOLDIR_BASE_PREFIX		PREFIX
3954359Sroberto#undef	MD_EXEC_PREFIX			/* We don't want one. */
4054359Sroberto#define	FBSD_DATA_PREFIX		PREFIX"/libdata/gcc/"
4182502Sroberto
42285612Sdelphij/* Under FreeBSD, the normal location of the various *crt*.o files is the
4382502Sroberto   /usr/lib directory.  */
44285612Sdelphij
4554359Sroberto#undef  MD_STARTFILE_PREFIX		/* We don't need one for now. */
4654359Sroberto#define STANDARD_STARTFILE_PREFIX	PREFIX"/lib/"
47285612Sdelphij#define STARTFILE_PREFIX_SPEC		PREFIX"/lib/"
48285612Sdelphij
4954359Sroberto#if 0
50285612Sdelphij#define LIBGCC_SPEC		"%{shared: -lgcc_pic} \
5154359Sroberto    %{!shared: %{!pg: -lgcc} %{pg: -lgcc_p}}"
5254359Sroberto#endif
5354359Sroberto#define LIBSTDCXX_PROFILE	"-lstdc++_p"
54285612Sdelphij#define MATH_LIBRARY_PROFILE	"-lm_p"
55132455Sroberto#define FORTRAN_LIBRARY_PROFILE	"-lg2c_p"
56285612Sdelphij
57132455Sroberto#define LIBGCC_SPEC		"-lgcc"
58285612Sdelphij/* For the native system compiler, we actually build libgcc in a profiled
59285612Sdelphij   version.  So we should use it with -pg.  */
60285612Sdelphij#define LIBGCC_STATIC_LIB_SPEC	  "%{pg: -lgcc_p;:-lgcc}"
61285612Sdelphij#define LIBGCC_EH_STATIC_LIB_SPEC "%{pg: -lgcc_eh_p;:-lgcc_eh}"
62285612Sdelphij
63285612Sdelphij/* FreeBSD is 4.4BSD derived */
64285612Sdelphij#define bsd4_4
65285612Sdelphij