You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
merge https://trac.macports.org/changeset/60662, https://trac.macports.org/changeset/60680, https://trac.macports.org/changeset/62479 from trunk: put relevant build_arch flags in LDFLAGS too
git-svn-id: https://svn.macports.org/repository/macports/branches/release_1_8/base@62480 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
|
||||
Release 1.8.3 (unreleased):
|
||||
|
||||
- Some of the build_arch flags now appear in LDFLAGS as well, fixing
|
||||
several ports when building for a different architecture (jeremyhu in
|
||||
r60662, jmr in r60680)
|
||||
|
||||
- Fixed 'merge' proc for paths with spaces, and for symlinks on Snow
|
||||
Leopard, and added an error message for when 'merge' is not called
|
||||
correctly (ryandesign in r58776, r58777, r58778)
|
||||
|
||||
@@ -153,6 +153,8 @@ default configure.pkg_config_path {}
|
||||
|
||||
options configure.build_arch
|
||||
default configure.build_arch {${build_arch}}
|
||||
options configure.ld_archflags
|
||||
default configure.ld_archflags {[portconfigure::configure_get_ld_archflags]}
|
||||
foreach tool {cc cxx objc f77 f90 fc} {
|
||||
options configure.${tool}_archflags
|
||||
default configure.${tool}_archflags "\[portconfigure::configure_get_archflags $tool\]"
|
||||
@@ -231,6 +233,19 @@ proc portconfigure::configure_get_archflags {tool} {
|
||||
return $flags
|
||||
}
|
||||
|
||||
# internal function to determine the ld flags to select an arch
|
||||
# Unfortunately there's no consistent way to do this when the compiler
|
||||
# doesn't support -arch, because it could be used to link rather than using
|
||||
# ld directly. So we punt and let portfiles deal with that case.
|
||||
proc portconfigure::configure_get_ld_archflags {args} {
|
||||
global configure.build_arch
|
||||
if {${configure.build_arch} != "" && [arch_flag_supported]} {
|
||||
set flags "-arch ${configure.build_arch}"
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
# internal function to determine the "-arch xy" flags for the compiler
|
||||
proc portconfigure::configure_get_universal_archflags {args} {
|
||||
global configure.universal_archs
|
||||
@@ -459,7 +474,7 @@ proc portconfigure::configure_main {args} {
|
||||
global configure.env configure.pipe configure.libs configure.classpath configure.universal_args
|
||||
global configure.perl configure.python configure.ruby configure.install configure.awk configure.bison configure.pkg_config configure.pkg_config_path
|
||||
global configure.ccache configure.distcc configure.cpp configure.javac configure.march configure.mtune
|
||||
foreach tool {cc cxx objc f77 f90 fc} {
|
||||
foreach tool {cc cxx objc f77 f90 fc ld} {
|
||||
global configure.${tool} configure.${tool}_archflags
|
||||
}
|
||||
foreach flags {cflags cppflags cxxflags objcflags ldflags fflags f90flags fcflags} {
|
||||
@@ -552,7 +567,7 @@ proc portconfigure::configure_main {args} {
|
||||
append_list_to_environment_value configure "LDFLAGS" ${configure.universal_ldflags}
|
||||
eval configure.pre_args-append ${configure.universal_args}
|
||||
} else {
|
||||
foreach {tool flags} {cc CFLAGS cxx CXXFLAGS objc OBJCFLAGS f77 FFLAGS f90 F90FLAGS fc FCFLAGS} {
|
||||
foreach {tool flags} {cc CFLAGS cxx CXXFLAGS objc OBJCFLAGS f77 FFLAGS f90 F90FLAGS fc FCFLAGS ld LDFLAGS} {
|
||||
append_list_to_environment_value configure $flags [set configure.${tool}_archflags]
|
||||
if {${configure.march} != {}} {
|
||||
append_list_to_environment_value configure $flags "-march=${configure.march}"
|
||||
|
||||
Reference in New Issue
Block a user