Opened 12 years ago

Last modified 12 years ago

#33361 closed defect

properly fix mpfr to restore clang usage — at Version 2

Reported by: howarth@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc:
Port: mpfr

Description (last modified by neverpanic (Clemens Lang))

The breakage in mpfr with the Xcode 4.2.0 release was mishandled in macports. The actual cause of the breakage was due to a clang bug which was exposed in when tis support was enabled in clang in the Xcode 4.2.0 release. The mpfr 3.1.0 release tickles this bug because it supports tis if present in the compiler. The possible fixes for this problem is either to require Xcode 4.2.1 or later which has this tis code generation bug fixed,

radr://10291355, "Xcode 4.2 miscompiles tls support in MPFR 3.1.0"

by back porting the fix from llvm.org (r142553 ) for the same issue...

http://llvm.org/bugs/show_bug.cgi?id=11111

The attached Portfile.diff fixes this issue as we have in fink by passing --disable-thread-safe to configure. This has no impact on the build with non-clang compilers as none of them have ever supported tis code generation. For clang, it restores the previous build behavior prior to Xcode 4.2.0 where tis support wasn't available.

Testing on x86_64-apple-darwin11 with Xcode 4.3 shows...

/usr/bin/make  check-TESTS
[tversion] GMP: header 5.0.4, library 5.0.4
[tversion] MPFR tuning parameters from src/x86_64/core2/mparam.h
PASS: tversion
PASS: tinternals
PASS: tinits
PASS: tisqrt
PASS: tsgn
PASS: tcheck
PASS: tisnan
PASS: texceptions
PASS: tset_exp
PASS: tset
PASS: mpf_compat
PASS: mpfr_compat
PASS: reuse
PASS: tabs
PASS: tacos
PASS: tacosh
PASS: tadd
PASS: tadd1sp
PASS: tadd_d
PASS: tadd_ui
PASS: tagm
PASS: tai
PASS: tasin
PASS: tasinh
PASS: tatan
PASS: tatanh
PASS: taway
PASS: tbuildopt
PASS: tcan_round
PASS: tcbrt
PASS: tcmp
PASS: tcmp2
PASS: tcmp_d
PASS: tcmp_ld
PASS: tcmp_ui
PASS: tcmpabs
PASS: tcomparisons
PASS: tconst_catalan
PASS: tconst_euler
PASS: tconst_log2
PASS: tconst_pi
PASS: tcopysign
PASS: tcos
PASS: tcosh
PASS: tcot
PASS: tcoth
PASS: tcsc
PASS: tcsch
PASS: td_div
PASS: td_sub
PASS: tdigamma
PASS: tdim
PASS: tdiv
PASS: tdiv_d
PASS: tdiv_ui
PASS: teint
PASS: teq
PASS: terf
PASS: texp
PASS: texp10
PASS: texp2
PASS: texpm1
PASS: tfactorial
PASS: tfits
PASS: tfma
PASS: tfmod
PASS: tfms
PASS: tfprintf
PASS: tfrac
PASS: tfrexp
PASS: tgamma
PASS: tget_flt
PASS: tget_d
PASS: tget_d_2exp
PASS: tget_f
PASS: tget_ld_2exp
SKIP: tget_set_d64
PASS: tget_sj
PASS: tget_str
PASS: tget_z
PASS: tgmpop
PASS: tgrandom
PASS: thyperbolic
PASS: thypot
PASS: tinp_str
PASS: tj0
PASS: tj1
PASS: tjn
PASS: tl2b
PASS: tlgamma
PASS: tli2
PASS: tlngamma
PASS: tlog
PASS: tlog10
PASS: tlog1p
PASS: tlog2
PASS: tmin_prec
PASS: tminmax
PASS: tmodf
PASS: tmul
PASS: tmul_2exp
PASS: tmul_d
PASS: tmul_ui
PASS: tnext
PASS: tout_str
PASS: toutimpl
PASS: tpow
PASS: tpow3
PASS: tpow_all
PASS: tpow_z
PASS: tprintf
PASS: trandom
PASS: trec_sqrt
PASS: tremquo
PASS: trint
PASS: troot
PASS: tround_prec
PASS: tsec
PASS: tsech
PASS: tset_d
PASS: tset_f
PASS: tset_ld
PASS: tset_q
PASS: tset_si
PASS: tset_sj
PASS: tset_str
PASS: tset_z
PASS: tset_z_exp
PASS: tsi_op
PASS: tsin
PASS: tsin_cos
PASS: tsinh
PASS: tsinh_cosh
PASS: tsprintf
PASS: tsqr
PASS: tsqrt
PASS: tsqrt_ui
PASS: tstckintc
PASS: tstdint
PASS: tstrtofr
PASS: tsub
PASS: tsub1sp
PASS: tsub_d
PASS: tsub_ui
PASS: tsubnormal
PASS: tsum
PASS: tswap
PASS: ttan
PASS: ttanh
PASS: ttrunc
PASS: tui_div
PASS: tui_pow
PASS: tui_sub
PASS: turandom
PASS: tvalist
PASS: ty0
PASS: ty1
PASS: tyn
PASS: tzeta
PASS: tzeta_ui
[tversion] GMP: header 5.0.4, library 5.0.4
[tversion] MPFR tuning parameters from src/x86_64/core2/mparam.h
PASS: tversion
====================
All 160 tests passed
(1 test was not run)
====================
Making check in tune

Change History (3)

Changed 12 years ago by howarth@…

Attachment: Portfile.diff added

Portfile.diff with better fix for Xcode 4.2.0 clang code generation issue in mpfr

comment:1 Changed 12 years ago by howarth@…

An alternative fix would be to prevent mpfr from building if Xcode 4.2.0 was installed as it is the only Xcode release with this clang bug,

comment:2 Changed 12 years ago by neverpanic (Clemens Lang)

Description: modified (diff)
Keywords: devel removed
Milestone: MacPorts 2.0.4

Please use WikiFormatting and don't set the Milestone field.

Note: See TracTickets for help on using tickets.