Ticket #31734: patch-use-apple-gcc42.diff

File patch-use-apple-gcc42.diff, 4.9 KB (added by royliu@…, 13 years ago)

Use apple-gcc42 to compile VirtualBox (revision 2).

  • Portfile

    old new  
    4242                    sha1    19a801444102a10d2b62ab35daacb7ddc415bab0 \
    4343                    rmd160  1bf368464ac0d431ac799e4710835f3426a9a5f6
    4444
     45# TODO: Use the apple-gcc42 compiler because Xcode 4.2 no longer provides gcc-4.2 and builds with llvm-gcc-4.2 crash.
     46depends_build-append        port:apple-gcc42
     47
    4548depends_lib-append          port:curl \
    4649                            port:libidl \
    4750                            path:lib/pkgconfig/libxml-2.0.pc:libxml2 \
  • files/patch-build.diff

    old new  
    99 endif
    1010 
    1111 # Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
    12 @@ -1781,11 +1781,13 @@
     12@@ -1781,11 +1781,11 @@
    1313    if "$(VBOX_XCODE_VERSION_MAJOR)" == "4"
    1414     VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
    1515     VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
    1616-    VBOX_MACOSX_GCC_INFIX ?= -4.2
    17 +    VBOX_MACOSX_GCC_PREFIX ?= llvm-
    18 +    VBOX_MACOSX_GCC_SUFFIX ?= -4.2
     17+    VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
    1918    else
    2019     VBOX_DEF_MACOSX_VERSION_MIN ?= 10.5
    2120     VBOX_DARWIN_NO_COMPACT_LINKEDIT ?= $(VBOX_LD_no_compact_linkedit)
    2221-    VBOX_MACOSX_GCC_INFIX ?= -4.0
    23 +    VBOX_MACOSX_GCC_PREFIX ?= llvm-
    24 +    VBOX_MACOSX_GCC_SUFFIX ?= -4.2
     22+    VBOX_MACOSX_GCC_INFIX ?= -apple-4.0
    2523    endif
    2624   else
    2725    if $(VBOX_XCODE_VERSION_MAJOR) >= 4
    28 @@ -1793,28 +1795,30 @@
     26@@ -1793,14 +1795,14 @@
    2927    endif
    3028    VBOX_DEF_MACOSX_VERSION_MIN ?= 10.4
    3129    VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
    3230-   VBOX_MACOSX_GCC_INFIX ?= -4.0
    33 +   VBOX_MACOSX_GCC_PREFIX ?=
    34 +   VBOX_MACOSX_GCC_SUFFIX ?= -4.0
     31+   VBOX_MACOSX_GCC_INFIX ?= -apple-4.0
    3532   endif
    3633  else
    3734   if $(VBOX_XCODE_VERSION_MAJOR) < 4 && "$(VBOX_XCODE_VERSION)" != "3.2"
     
    3936   endif
    4037   VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
    4138-  VBOX_MACOSX_GCC_INFIX ?= -4.2
    42 +  VBOX_MACOSX_GCC_PREFIX ?= llvm-
    43 +  VBOX_MACOSX_GCC_SUFFIX ?= -4.2
     39+  VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
    4440   VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
    4541  endif
    46 - TOOL_GCC4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    47 - TOOL_GCC4MACHO_CXX = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    48 - TOOL_GCC4MACHO_AS  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    49 - TOOL_GCC4MACHO_LD  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    50 - TOOL_GCC4MACHO_LD_SYSMOD = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    51 - TOOL_GXX4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    52 - TOOL_GXX4MACHO_CXX = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    53 - TOOL_GXX4MACHO_OBJC= gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden
    54 - TOOL_GXX4MACHO_OBJCXX = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden -fvisibility-inlines-hidden
    55 - TOOL_GXX4MACHO_AS  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    56 - TOOL_GXX4MACHO_LD  = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    57 - TOOL_GXX4MACHO_LD_SYSMOD = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    58 + TOOL_GCC4MACHO_CC  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    59 + TOOL_GCC4MACHO_CXX = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    60 + TOOL_GCC4MACHO_AS  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    61 + TOOL_GCC4MACHO_LD  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    62 + TOOL_GCC4MACHO_LD_SYSMOD = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    63 + TOOL_GXX4MACHO_CC  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    64 + TOOL_GXX4MACHO_CXX = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    65 + TOOL_GXX4MACHO_OBJC= $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden
    66 + TOOL_GXX4MACHO_OBJCXX = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden -fvisibility-inlines-hidden
    67 + TOOL_GXX4MACHO_AS  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    68 + TOOL_GXX4MACHO_LD  = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    69 + TOOL_GXX4MACHO_LD_SYSMOD = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
    70   ifeq ($(VBOX_DEF_MACOSX_VERSION_MIN),10.4)
    71    ifeq ($(origin VBOX_DARWIN_CLASSIC_LINKER),undefined)
    72     VBOX_DARWIN_CLASSIC_LINKER := $(shell ld -v 2>&1 )
     42  TOOL_GCC4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
    7343@@ -2063,22 +2063,22 @@
    7444 VBOX_GCC32_CHECK_CXX = $(2)
    7545 else
  • files/patch-vde.diff

    old new  
    11--- configure.orig      2011-08-15 19:38:16.000000000 -0500
    22+++ configure   2011-08-15 19:38:16.000000000 -0500
    3 @@ -2555,7 +2555,7 @@
     3@@ -2553,7 +2553,7 @@
    44 fi
    55 
    66 # VDE