Ticket #40478: gcc48-leo-pt2.patch

File gcc48-leo-pt2.patch, 2.2 KB (added by larryv (Lawrence Velázquez), 11 years ago)

patch generated against GCC 4.8 source

  • Portfile

     
    4040depends_skip_archcheck-append gcc_select ld64 cctools
    4141license_noconflict  gmp mpfr ppl libmpc
    4242
     43patchfiles          PR-40478.patch
     44
    4345set major           4.8
    4446
    4547platform darwin {
  • files/PR-40478.patch

     
     1commit 5afa36223ac98bc13dbc85acc9d9ca9edbd4641c
     2Author: Lawrence Velázquez <larryv@alum.mit.edu>
     3Date:   Sat Sep 14 13:31:49 2013 -0400
     4
     5    Fix broken universal build on Leopard.
     6   
     7    Patch by jeremyhu. See https://trac.macports.org/ticket/40478.
     8
     9diff --git config-apple-verbatim.h config-apple-verbatim.h
     10new file mode 100644
     11index 0000000..1ef40be
     12--- /dev/null
     13+++ config-apple-verbatim.h
     14@@ -0,0 +1,14 @@
     15+#ifdef __APPLE__
     16+
     17+#undef SIZEOF_LONG
     18+
     19+#if __LP64__
     20+#define SIZEOF_LONG 8
     21+#else
     22+#define SIZEOF_LONG 4
     23+#endif
     24+
     25+#undef SIZEOF_VOID_P
     26+#define SIZEOF_VOID_P SIZEOF_LONG
     27+
     28+#endif
     29diff --git gcc/config.in gcc/config.in
     30index 0b07f3e..8e0a7dc 100644
     31--- gcc/config.in
     32+++ gcc/config.in
     33@@ -2041,3 +2041,6 @@
     34 #undef vfork
     35 #endif
     36 
     37+#ifndef USED_FOR_TARGET
     38+#include "../config-apple-verbatim.h"
     39+#endif
     40diff --git libcpp/config.in libcpp/config.in
     41index 1b0b255..8532acb 100644
     42--- libcpp/config.in
     43+++ libcpp/config.in
     44@@ -356,3 +356,5 @@
     45 /* Define to the type of an unsigned integer type wide enough to hold a
     46    pointer, if such a type exists, and if the system does not define it. */
     47 #undef uintptr_t
     48+
     49+#include "../config-apple-verbatim.h"
     50diff --git libdecnumber/config.in libdecnumber/config.in
     51index 98dc67d..a1a344c 100644
     52--- libdecnumber/config.in
     53+++ libdecnumber/config.in
     54@@ -92,3 +92,5 @@
     55 
     56 /* Define to `long int' if <sys/types.h> does not define. */
     57 #undef off_t
     58+
     59+#include "../config-apple-verbatim.h"
     60diff --git libgomp/config.h.in libgomp/config.h.in
     61index 14c7e2a..d69e3f5 100644
     62--- libgomp/config.h.in
     63+++ libgomp/config.h.in
     64@@ -133,3 +133,5 @@
     65 
     66 /* Version number of package */
     67 #undef VERSION
     68+
     69+#include "../config-apple-verbatim.h"