summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2010-05-12 19:59:32 +0000
committerobrien <obrien@FreeBSD.org>2010-05-12 19:59:32 +0000
commit32d515bca08d5a57d36e859c775db4f8d1d3f789 (patch)
tree079227511007b180b9d7535b8f0783545e890925 /gnu/usr.bin/cc
parentbb926aa7a5eb2340e321ec4c8579a65e08a0994a (diff)
downloadFreeBSD-src-32d515bca08d5a57d36e859c775db4f8d1d3f789.zip
FreeBSD-src-32d515bca08d5a57d36e859c775db4f8d1d3f789.tar.gz
Non-GCC gcc compatible compilers may provide the same multimedia intrinsic
headers as GCC, but of their own implementation. So put the GCC ones into their own header "namespace". Requested by: ed
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r--gnu/usr.bin/cc/Makefile.inc2
-rw-r--r--gnu/usr.bin/cc/cc_tools/freebsd-native.h6
-rw-r--r--gnu/usr.bin/cc/include/Makefile2
3 files changed, 7 insertions, 3 deletions
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index f797dc7..1b7cbce 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -6,6 +6,7 @@
.if !defined(__CC_MAKEFILE_INC__)
__CC_MAKEFILE_INC__= ${MFILE}
+GCCVER= 4.2
GCCDIR= ${.CURDIR}/../../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs
@@ -15,6 +16,7 @@ GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs
MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md
GCC_TARGET= ${TARGET_ARCH}-undermydesk-freebsd
+CFLAGS+= -DGCCVER=\"${GCCVER}\"
CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H
CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\"
#CFLAGS+= -DWANT_COMPILER_INVARIANTS
diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h
index 6f7fd7b..db4dd89 100644
--- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h
+++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h
@@ -15,9 +15,9 @@
#undef LOCAL_INCLUDE_DIR /* We don't wish to support one. */
/* Look for the include files in the system-defined places. */
-#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/4.2"
-#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/4.2/backward"
-#define GCC_INCLUDE_DIR PREFIX"/include"
+#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/"GCCVER
+#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/"GCCVER"/backward"
+#define GCC_INCLUDE_DIR PREFIX"/include/gcc/"GCCVER
#ifdef CROSS_COMPILE
#define CROSS_INCLUDE_DIR PREFIX"/include"
#else
diff --git a/gnu/usr.bin/cc/include/Makefile b/gnu/usr.bin/cc/include/Makefile
index 875cc1f..210218a 100644
--- a/gnu/usr.bin/cc/include/Makefile
+++ b/gnu/usr.bin/cc/include/Makefile
@@ -2,6 +2,8 @@
.include "../Makefile.inc"
+INCSDIR=${INCLUDEDIR}/gcc/${GCCVER}
+
.PATH: ${GCCDIR}/config/${GCC_CPU}
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
OpenPOWER on IntegriCloud