freebsd-native.h revision 195151
11897Swollman/* $FreeBSD: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h 195151 2009-06-28 23:51:39Z kan $ */ 299979Salfred 399979Salfred/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD 499979Salfred source tree so it can be configured appropriately without using 51897Swollman the GNU configure/build mechanism. */ 61897Swollman 71897Swollman#define FREEBSD_NATIVE 1 81897Swollman 91897Swollman/* Fake out gcc/config/freebsd<version>.h. */ 101897Swollman#define FBSD_MAJOR 8 11100441Scharnier#define FBSD_CC_VER 800001 /* form like __FreeBSD_version */ 121897Swollman 131897Swollman#undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ 141897Swollman#undef TOOL_INCLUDE_DIR /* We don't need one for now. */ 15100441Scharnier#undef LOCAL_INCLUDE_DIR /* We don't wish to support one. */ 161897Swollman 171897Swollman/* Look for the include files in the system-defined places. */ 181897Swollman#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/4.2" 19100441Scharnier#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/4.2/backward" 201897Swollman#define GCC_INCLUDE_DIR PREFIX"/include" 211897Swollman#ifdef CROSS_COMPILE 221897Swollman#define CROSS_INCLUDE_DIR PREFIX"/include" 23100441Scharnier#else 241897Swollman#define STANDARD_INCLUDE_DIR PREFIX"/include" 251897Swollman#endif 261897Swollman 27100441Scharnier/* Under FreeBSD, the normal location of the compiler back ends is the 281897Swollman /usr/libexec directory. 291897Swollman 301897Swollman ``cc --print-search-dirs'' gives: 311897Swollman install: STANDARD_EXEC_PREFIX/ 3299979Salfred programs: STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX 331897Swollman libraries: STANDARD_STARTFILE_PREFIX 3412798Swpaul*/ 3512798Swpaul#undef STANDARD_BINDIR_PREFIX /* We don't need one for now. */ 3612798Swpaul#define STANDARD_EXEC_PREFIX PREFIX"/libexec/" 3712798Swpaul#define STANDARD_LIBEXEC_PREFIX PREFIX"/libexec/" 3812798Swpaul#define TOOLDIR_BASE_PREFIX PREFIX 3912798Swpaul#undef MD_EXEC_PREFIX /* We don't want one. */ 4012798Swpaul#define FBSD_DATA_PREFIX PREFIX"/libdata/gcc/" 4112798Swpaul 4212798Swpaul/* Under FreeBSD, the normal location of the various *crt*.o files is the 4312798Swpaul /usr/lib directory. */ 4412798Swpaul 4512798Swpaul#undef MD_STARTFILE_PREFIX /* We don't need one for now. */ 4612798Swpaul#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" 4712798Swpaul#define STARTFILE_PREFIX_SPEC PREFIX"/lib/" 4812798Swpaul 4912798Swpaul#if 0 5012798Swpaul#define LIBGCC_SPEC "%{shared: -lgcc_pic} \ 5112798Swpaul %{!shared: %{!pg: -lgcc} %{pg: -lgcc_p}}" 5212798Swpaul#endif 5312798Swpaul#define LIBSTDCXX_PROFILE "-lstdc++_p" 54100441Scharnier#define MATH_LIBRARY_PROFILE "-lm_p" 5512798Swpaul#define FORTRAN_LIBRARY_PROFILE "-lg2c_p" 56100441Scharnier 5712798Swpaul#define LIBGCC_SPEC "-lgcc" 5812798Swpaul/* For the native system compiler, we actually build libgcc in a profiled 5912798Swpaul version. So we should use it with -pg. */ 6012798Swpaul#define LIBGCC_STATIC_LIB_SPEC "%{pg: -lgcc_p;:-lgcc}" 6112798Swpaul#define LIBGCC_EH_STATIC_LIB_SPEC "%{pg: -lgcc_eh_p;:-lgcc_eh}" 62100441Scharnier 6312798Swpaul/* FreeBSD is 4.4BSD derived */ 6412798Swpaul#define bsd4_4 6512798Swpaul 661897Swollman/* 67100441Scharnier * Link in libssp_nonshared to get local hidden symbol for 681897Swollman * __stack_chk_fail_local into each binary that needs it. 691897Swollman * Linux does this with static part of their libc.so linker script, we reuse 701897Swollman * libssp_nonshared.a for the same purpose. 71100441Scharnier */ 721897Swollman#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}" 731897Swollman