Ignore:
Timestamp:
Nov 8, 2011, 9:31:43 PM (8 years ago)
Author:
royliu@…
Message:

virtualbox: use apple-gcc-4.2 if gcc-4.2 not available

Location:
trunk/dports/emulators/virtualbox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/emulators/virtualbox/Portfile

    r87054 r87055  
    5353                            patch-sdk.diff \
    5454                            patch-startup.diff
     55
     56configure.compiler          gcc-4.2
     57
     58# Use the apple-gcc-4.2 compiler because Xcode 4.2 no longer provides gcc-4.2 and builds with llvm-gcc-4.2 crash.
     59if {![file executable ${configure.cc}]} {
     60
     61    depends_build-append    port:apple-gcc42
     62    configure.compiler      apple-gcc-4.2
     63    # Set this explicitly because non-trunk versions of MacPorts don't.
     64    configure.cxx           ${prefix}/bin/g++-apple-4.2
     65}
    5566
    5667configure.pre_args-delete   --prefix=${prefix}
  • trunk/dports/emulators/virtualbox/files/patch-build.diff

    r86992 r87055  
    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
     
    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)
  • trunk/dports/emulators/virtualbox/files/patch-vde.diff

    r86383 r87055  
    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 
Note: See TracChangeset for help on using the changeset viewer.