aboutsummaryrefslogtreecommitdiffstats
path: root/misc/config/cc/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'misc/config/cc/gcc')
-rw-r--r--misc/config/cc/gcc118
1 files changed, 118 insertions, 0 deletions
diff --git a/misc/config/cc/gcc b/misc/config/cc/gcc
new file mode 100644
index 000000000..4514a8c6c
--- /dev/null
+++ b/misc/config/cc/gcc
@@ -0,0 +1,118 @@
+realname "GNU C++"
+
+binary_name "g++"
+
+compile_option "-c"
+output_to_option "-o"
+add_include_dir_option "-I"
+add_lib_dir_option "-L"
+add_lib_option "-l"
+
+lib_opt_flags "-O2 -finline-functions"
+check_opt_flags "-O2"
+lang_flags "-D_REENTRANT -ansi -Wno-long-long"
+warning_flags "-W -Wall"
+
+so_obj_flags "-fPIC"
+debug_flags "-g"
+
+makefile_style unix
+
+<so_link_flags>
+# The default works for GNU ld and several other Unix linkers
+default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
+
+# AIX doesn't seem to have soname support (weird...)
+aix -> "$(CXX) -shared -fPIC"
+
+darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(SONAME)"
+hpux -> "$(CXX) -shared -fPIC -Wl,+h,$(SONAME)"
+solaris -> "$(CXX) -shared -fPIC -Wl,-h,$(SONAME)"
+# Gotta use ld directly on BeOS, their GCC is busted
+beos -> "ld -shared -h $(SONAME)"
+</so_link_flags>
+
+# Using -momit-leaf-frame-pointer would be a huge win (on x86 anyway, why isn't
+# it implemented elsewhere?), but it was added in 3.0 and the current mandate
+# is to continue to support 2.95.x, so we don't use it (yet).
+<mach_opt>
+# Specializations first (they don't need to be, just clearer)
+i386 -> "-mcpu=i686"
+r10000 -> "-mips4"
+alpha-ev67 -> "-mcpu=ev6" # FIXME: GCC 3.1 and on has -march=ev67
+alpha-ev68 -> "-mcpu=ev6"
+alpha-ev7 -> "-mcpu=ev6"
+ppc601 -> "-mpowerpc -mcpu=601"
+sparc64-ultra3 -> "-mcpu=v9 -mtune=ultrasparc3"
+
+# Default family options (SUBMODEL is substitued with the real submodel)
+# Anything after the quotes is what should be *removed* from the submodel name
+# before it's put into SUBMODEL.
+alpha -> "-mcpu=SUBMODEL" alpha-
+amd64 -> ""
+arm -> "-mcpu=SUBMODEL"
+ia32 -> "-march=SUBMODEL"
+hppa -> "-march=SUBMODEL" hppa
+m68k -> "-mSUBMODEL"
+sh -> "-mSUBMODEL" sh
+sparc32 -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus" sparc32-
+sparc64 -> "-mcpu=v9 -mtune=ultrasparc"
+mips32 -> "-mips1 -mcpu=SUBMODEL" mips32-
+mips64 -> "-mips3 -mcpu=SUBMODEL" mips64-
+ppc -> "-mcpu=SUBMODEL" ppc
+ppc64 -> "-mcpu=SUBMODEL" ppc
+</mach_opt>
+
+# Note that the 'linking' bit means "use this for both compiling *and* linking"
+<mach_abi_linking>
+amd64 -> "-m64"
+mips32 -> "-mabi=n32"
+mips64 -> "-mabi=64"
+s390 -> "-m31"
+s390x -> "-m64"
+sparc32 -> "-m32 -mno-app-regs"
+sparc64 -> "-m64 -mno-app-regs"
+ppc64 -> "-m64"
+
+# This should probably be used on most/all targets, but the docs are incomplete
+openbsd -> "-pthread"
+freebsd -> "-pthread"
+netbsd -> "-pthread"
+qnx -> "-fexceptions"
+</mach_abi_linking>
+
+<os>
+aix
+beos
+cygwin
+darwin
+freebsd
+hpux
+irix
+linux
+netbsd
+openbsd
+qnx
+solaris
+tru64
+windows
+</os>
+
+<arch>
+alpha
+amd64
+arm
+hppa
+ia32
+ia64
+m68k
+mips32
+mips64
+ppc
+ppc64
+s390
+s390x
+sh
+sparc32
+sparc64
+</arch>