Skip to content

Commit

Permalink
gcc6 & gcc7: allow clang to use GCC header files
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusCalhoun-Lopez committed Feb 3, 2017
1 parent 7ae4d65 commit 4f0ad86
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lang/gcc6/Portfile
Expand Up @@ -9,6 +9,9 @@ subport libgcc {}

epoch 2
version 6.3.0
if {${name} eq ${subport}} {
revision 1
}
platforms darwin
categories lang
maintainers mww openmaintainer
Expand Down Expand Up @@ -47,6 +50,9 @@ set major [lindex [split ${version} .-] 0]

platform darwin {
configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}

# see https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00672.html
patchfiles-append patch-float128.diff
}

configure.dir ${workpath}/build
Expand Down
12 changes: 12 additions & 0 deletions lang/gcc6/files/patch-float128.diff
@@ -0,0 +1,12 @@
--- libstdc++-v3/config.h.in.orig 2016-12-12 10:44:08.000000000 -0700
+++ libstdc++-v3/config.h.in 2017-01-14 02:19:10.000000000 -0700
@@ -892,7 +892,9 @@
#undef _GLIBCXX_USE_FCHMODAT

/* Define if __float128 is supported on this host. */
+#ifndef __clang__
#undef _GLIBCXX_USE_FLOAT128
+#endif

/* Defined if gettimeofday is available. */
#undef _GLIBCXX_USE_GETTIMEOFDAY
6 changes: 6 additions & 0 deletions lang/gcc7/Portfile
Expand Up @@ -9,6 +9,9 @@ subport libgcc-devel {}

epoch 1
version 7-20170129
if {${name} eq ${subport}} {
revision 1
}
platforms darwin
categories lang
maintainers mww openmaintainer
Expand Down Expand Up @@ -46,6 +49,9 @@ set major [lindex [split ${version} .-] 0]

platform darwin {
configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}

# see https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00672.html
patchfiles-append patch-float128.diff
}

configure.dir ${workpath}/build
Expand Down
12 changes: 12 additions & 0 deletions lang/gcc7/files/patch-float128.diff
@@ -0,0 +1,12 @@
--- libstdc++-v3/config.h.in.orig 2016-12-12 10:44:08.000000000 -0700
+++ libstdc++-v3/config.h.in 2017-01-14 02:19:10.000000000 -0700
@@ -913,7 +913,9 @@
#undef _GLIBCXX_USE_FCHMODAT

/* Define if __float128 is supported on this host. */
+#ifndef __clang__
#undef _GLIBCXX_USE_FLOAT128
+#endif

/* Defined if gettimeofday is available. */
#undef _GLIBCXX_USE_GETTIMEOFDAY

0 comments on commit 4f0ad86

Please sign in to comment.