Changeset 52324


Ignore:
Timestamp:
Jun 14, 2009, 7:03:40 AM (11 years ago)
Author:
toby@…
Message:

Merge universal-sanity branch. Changes are relatively straightforward, although somewhat risky:

  • remove universal_sysroot/universal_target options
  • hardcode the 10.4u SDK for Tiger/PPC, only platform that needs it
Location:
trunk/base
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/base

  • trunk/base/aclocal.m4

    r51849 r52324  
    491491AC_DEFUN([MP_UNIVERSAL_OPTIONS],[
    492492
    493     AC_ARG_WITH(universal-target,[AS_HELP_STRING([--with-universal-target=MDT],[Universal MACOSX_DEPLOYMENT_TARGET version])], UNIVERSAL_TARGET=${withval})
    494     AC_ARG_WITH(universal-sysroot,[AS_HELP_STRING([--with-universal-sysroot=SDK],[Universal SDK sysroot (with complete path)])], UNIVERSAL_SYSROOT=${withval})
    495493    AC_ARG_WITH(universal-archs,[AS_HELP_STRING([--with-universal-archs="CPU"],[Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
    496 
    497         MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
    498 
    499         if test "x$UNIVERSAL_TARGET" = "x"; then
    500             UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
    501         fi
    502 
    503         if test "x$UNIVERSAL_SYSROOT" = "x"; then
    504             if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
    505                 UNIVERSAL_SYSROOT=${DEVELOPER_DIR}/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
    506             else
    507                 UNIVERSAL_SYSROOT=${DEVELOPER_DIR}/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
    508             fi
    509         fi
    510494
    511495        if test "x$UNIVERSAL_ARCHS" = "x"; then
    512496            UNIVERSAL_ARCHS="ppc i386"
    513497        fi
    514    
    515     AC_MSG_CHECKING([for Universal MDT version])
    516     AC_MSG_RESULT([$UNIVERSAL_TARGET])
    517     AC_SUBST(UNIVERSAL_TARGET)
    518 
    519     AC_MSG_CHECKING([for Universal SDK sysroot])
    520     AC_MSG_RESULT([$UNIVERSAL_SYSROOT])
    521     AC_SUBST(UNIVERSAL_SYSROOT)
    522498
    523499    AC_MSG_CHECKING([for Universal CPU architectures])
  • trunk/base/configure

    r51958 r52324  
    677677CPP
    678678UNIVERSAL_ARCHS
    679 UNIVERSAL_SYSROOT
    680 UNIVERSAL_TARGET
    681679MPFRAMEWORKSDIR
    682680MPAPPLICATIONSDIR
     
    832830with_applications_dir
    833831with_frameworks_dir
    834 with_universal_target
    835 with_universal_sysroot
    836832with_universal_archs
    837833enable_readline
     
    15231519  --with-applications-dir Applications installation directory.
    15241520  --with-frameworks-dir   Frameworks installation directory.
    1525   --with-universal-target=MDT
    1526                           Universal MACOSX_DEPLOYMENT_TARGET version
    1527   --with-universal-sysroot=SDK
    1528                           Universal SDK sysroot (with complete path)
    15291521  --with-universal-archs="CPU"
    15301522                          Universal CPU architectures (space separated)
     
    80788070
    80798071
    8080 # Check whether --with-universal-target was given.
    8081 if test "${with_universal_target+set}" = set; then
    8082   withval=$with_universal_target; UNIVERSAL_TARGET=${withval}
    8083 fi
    8084 
    8085 
    8086 # Check whether --with-universal-sysroot was given.
    8087 if test "${with_universal_sysroot+set}" = set; then
    8088   withval=$with_universal_sysroot; UNIVERSAL_SYSROOT=${withval}
    8089 fi
    8090 
    8091 
    80928072# Check whether --with-universal-archs was given.
    80938073if test "${with_universal_archs+set}" = set; then
     
    80968076
    80978077
    8098         MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
    8099 
    8100         if test "x$UNIVERSAL_TARGET" = "x"; then
    8101             UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
    8102         fi
    8103 
    8104         if test "x$UNIVERSAL_SYSROOT" = "x"; then
    8105             if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
    8106                 UNIVERSAL_SYSROOT=${DEVELOPER_DIR}/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
    8107             else
    8108                 UNIVERSAL_SYSROOT=${DEVELOPER_DIR}/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
    8109             fi
    8110         fi
    8111 
    81128078        if test "x$UNIVERSAL_ARCHS" = "x"; then
    81138079            UNIVERSAL_ARCHS="ppc i386"
    81148080        fi
    8115 
    8116     { $as_echo "$as_me:$LINENO: checking for Universal MDT version" >&5
    8117 $as_echo_n "checking for Universal MDT version... " >&6; }
    8118     { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_TARGET" >&5
    8119 $as_echo "$UNIVERSAL_TARGET" >&6; }
    8120 
    8121 
    8122     { $as_echo "$as_me:$LINENO: checking for Universal SDK sysroot" >&5
    8123 $as_echo_n "checking for Universal SDK sysroot... " >&6; }
    8124     { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_SYSROOT" >&5
    8125 $as_echo "$UNIVERSAL_SYSROOT" >&6; }
    8126 
    81278081
    81288082    { $as_echo "$as_me:$LINENO: checking for Universal CPU architectures" >&5
  • trunk/base/doc/macports.conf.5

    r51232 r52324  
    162162.Ic Default:
    163163yes
    164 .It Va universal_target
    165 The MACOSX_DEPLOYMENT_TARGET to use for +universal variant
    166 .br
    167 .Ic Example:
    168 10.4
    169 .It Va universal_sysroot
    170 The SDK "sysroot" full path to use for +universal variant
    171 .br
    172 .Ic Example:
    173 /Developer/SDKs/MacOSX10.4u.sdk
    174164.It Va universal_archs
    175165The machine architectures to use for +universal variant
  • trunk/base/doc/macports.conf.in

    r51849 r52324  
    9090# Options for Universal Binaries (+universal variant)
    9191
    92 # MACOSX_DEPLOYMENT_TARGET
    93 universal_target        @UNIVERSAL_TARGET@
    94 
    95 # the SDK "sysroot" to use
    96 universal_sysroot       @UNIVERSAL_SYSROOT@
    97 
    9892# machine architectures
    9993universal_archs         @UNIVERSAL_ARCHS@
  • trunk/base/src/macports1.0/macports.tcl

    r52160 r52324  
    4646        rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
    4747        mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
    48         applications_dir frameworks_dir developer_dir universal_target universal_sysroot universal_archs \
     48        applications_dir frameworks_dir developer_dir universal_archs \
    4949        macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip"
    5050    variable user_options "submitter_name submitter_email submitter_key"
     
    5555        rsync_options rsync_dir startupitem_type place_worksymlink \
    5656        mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
    57         applications_dir frameworks_dir developer_dir universal_target universal_sysroot universal_archs $user_options"
     57        applications_dir frameworks_dir developer_dir universal_archs $user_options"
    5858
    5959    # deferred options are only computed when needed.
     
    351351    global macports::buildnicevalue
    352352    global macports::buildmakejobs
    353     global macports::universal_target
    354     global macports::universal_sysroot
    355353    global macports::universal_archs
    356354
     
    652650
    653651    # Default mp universal options
    654     if {![info exists macports::universal_target]} {
    655         if {[file exists ${macports::developer_dir}/SDKs/MacOSX10.5.sdk]} {
    656             set macports::universal_target "10.5"
    657         } else {
    658             set macports::universal_target "10.4"
    659         }
    660     }
    661     if {![info exists macports::universal_sysroot]} {
    662         if {[file exists ${macports::developer_dir}/SDKs/MacOSX10.5.sdk]} {
    663             set macports::universal_sysroot "${macports::developer_dir}/SDKs/MacOSX10.5.sdk"
    664         } else {
    665             set macports::universal_sysroot "${macports::developer_dir}/SDKs/MacOSX10.4u.sdk"
    666         }
    667     }
    668652    if {![info exists macports::universal_archs]} {
    669653        set macports::universal_archs {ppc i386}
  • trunk/base/src/port1.0/portconfigure.tcl

    r51924 r52324  
    129129default configure.pkg_config_path   {}
    130130
    131 options configure.universal_target configure.universal_sysroot configure.universal_archs configure.universal_args configure.universal_cflags configure.universal_cppflags configure.universal_cxxflags configure.universal_ldflags
    132 default configure.universal_target      {${universal_target}}
    133 default configure.universal_sysroot     {${universal_sysroot}}
     131options configure.universal_archs configure.universal_args configure.universal_cflags configure.universal_cppflags configure.universal_cxxflags configure.universal_ldflags
    134132default configure.universal_archs       {${universal_archs}}
    135133default configure.universal_args        {--disable-dependency-tracking}
     
    197195# internal function to determine the CPPFLAGS for the compiler
    198196proc portconfigure::configure_get_universal_cppflags {args} {
    199     global configure.universal_sysroot
     197    global os.arch os.major
    200198    set flags ""
    201199    # include sysroot in CPPFLAGS too (twice), for the benefit of autoconf
    202     if {[info exists configure.universal_sysroot]} {
    203         set flags "-isysroot ${configure.universal_sysroot}"
     200    if {${os.arch} == "powerpc" && ${os.major} == "8"} {
     201        set flags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
    204202    }
    205203    return $flags
     
    208206# internal function to determine the CFLAGS for the compiler
    209207proc portconfigure::configure_get_universal_cflags {args} {
    210     global configure.universal_sysroot configure.universal_target
     208    global os.arch os.major
    211209    set flags [configure_get_universal_archflags]
    212210    # these flags should be valid for C/C++ and similar compiler frontends
    213     if {[info exists configure.universal_sysroot]} {
    214         set flags "-isysroot ${configure.universal_sysroot} ${flags}"
     211    if {${os.arch} == "powerpc" && ${os.major} == "8"} {
     212        set flags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk ${flags}"
    215213    }
    216214    return $flags
     
    219217# internal function to determine the LDFLAGS for the compiler
    220218proc portconfigure::configure_get_universal_ldflags {args} {
    221     global configure.universal_sysroot configure.universal_target
    222     global os.arch
     219    global os.arch os.major
    223220    set flags [configure_get_universal_archflags]
    224221    # works around linking without using the CFLAGS, outside of automake
    225     if {${os.arch} == "powerpc"} {
    226         set flags "-Wl,-syslibroot,${configure.universal_sysroot} ${flags}"
     222    if {${os.arch} == "powerpc" && ${os.major} == "8"} {
     223        set flags "-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk ${flags}"
    227224    }
    228225    return $flags
  • trunk/base/src/port1.0/portmain.tcl

    r51920 r52324  
    123123    # add_default_universal_variant, which is called from mportopen
    124124    option os.universal_supported yes
    125 
    126     if {[info exists variations(universal)] && $variations(universal) == "+"} {
    127         # cannot go into the variant, due to the amount of ports overriding it
    128         eval macosx_deployment_target ${universal_target}
    129     }
    130125}
    131126
  • trunk/base/src/port1.0/portutil.tcl

    r52304 r52324  
    18841884    # Declare default universal variant if universal SDK is installed
    18851885    variant universal {
    1886         pre-fetch {
    1887             if {![file exists ${configure.universal_sysroot}]} {
    1888                 return -code error "Universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail"
    1889             }
    1890         }
    1891 
    18921886        eval configure.args-append ${configure.universal_args}
    18931887        eval configure.cflags-append ${configure.universal_cflags}
Note: See TracChangeset for help on using the changeset viewer.