[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Jeffrey Yasskin [EMAIL PROTECTED] added the comment: I've fixed this in r61436 with a bunch of back pointers to the previous issues. If anyone on old versions sees problems, we can add the flags back conditionally. -- resolution: accepted - fixed status: open - closed type: - compile error _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Jeffrey Yasskin added the comment: Sorry for taking so long to get to this. gcc 4.2.1 still produces the following errors with this patch: gcc -c -fno-strict-aliasing -mno-fused-madd -no-cpp-precomp -g -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/opt/local/include -DPy_BUILD_CORE -o Objects/boolobject.o Objects/boolobject.c gcc: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option -mno-fused-madd make: *** [Objects/boolobject.o] Error 1 I see you dropped the test for -mno-fused-madd. Since gcc-4.2 doesn't support it, I meant I didn't mind if you dropped the flag entirely. It looks like -no-cpp-precomp stuck around because it doesn't actually cause the compile to fail, just to produce a warning message. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Ronald Oussoren added the comment: jyasskin: could you test apple_gcc_flags.diff? That's a version of your patch where configure tests if GCC supports -Wno-long-double and -no- cpp-precomp. NOTE: the patch doesn't update configure, you'll have to run autoconf after applying it. NOTE2: the patch is relative to python's trunk, but should apply to 2.5.x as well. -- resolution: - accepted _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _Index: configure.in === --- configure.in(revision 57620) +++ configure.in(working copy) @@ -818,7 +818,45 @@ ;; # is there any other compiler on Darwin besides gcc? Darwin*) - BASECFLAGS=$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd + BASECFLAGS=$BASECFLAGS -no-cpp-precomp -mno-fused-madd + + # Earlier versions of Xcode/DeveloperTools shipped with GCC 3.x + # which warned about using long double. That warning is + # surpressed using -Wno-long-double, but that flag is not + # available in stock GCC + AC_MSG_CHECKING(whether $CC accepts -Wno-long-double) + ac_save_cc=${CC} + CC=${CC} -Wno-long-double + AC_TRY_RUN([int main(void) { return 0; }], + ac_cv_no_long_double_ok=yes, + ac_cv_no_long_double_ok=no, + ac_cv_no_long_double_ok=no) + CC=$ac_save_cc + AC_MSG_RESULT($ac_cv_no_long_double_ok) + if test $ac_cv_no_long_double_ok = yes; then + BASECFLAGS=$BASECFLAGS -Wno-long-double +fi + + # Even earlier versions of Apple's GCC (appearently before + # GCC 3.1) sported a broken implementation of precompiled headers, + # -no-cpp-precomp disables that functionality, but isn't supported + # by stock GCC. + # XXX: need to check which version of OSX/DeveloperTools ships + # with this broken version of GCC, if that's old enough we can + # drop this check. + AC_MSG_CHECKING(whether $CC accepts -no-cpp-precomp) + ac_save_cc=${CC} + CC=${CC} -no-cpp-precomp + AC_TRY_RUN([int main(void) { return 0; }], + ac_cv_no_precomp_ok=yes, + ac_cv_no_precomp_ok=no, + ac_cv_no_precomp_ok=no) + CC=$ac_save_cc + AC_MSG_RESULT($ac_cv_no_precomp_ok) + if test $ac_cv_no_precomp_ok = yes; then + BASECFLAGS=$BASECFLAGS -no-cpp-precomp +fi + if test ${enable_universalsdk}; then BASECFLAGS=-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS} fi ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Jeffrey Yasskin added the comment: I'm not going to get to this for about a week, but I'll test the patch then. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Changes by Ronald Oussoren: _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Changes by Ronald Oussoren: _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Ronald Oussoren added the comment: Why does you patch test for -mno-fused-madd? If it isn't actually needed for something I'd rather not have that logic in the configure file, determining which bits of that file are actually needed for supported OS-es is hard enough as it is. -Wno-long-double is needed when compiling on old versions of OSX, where long double worked but wasn't actually useful. Keeping that option seems to be harmless. -no-cpp-precomp was necessary for several packages on older releases of OSX. I'll test on a 10.3 box when I have time (which is the oldest I can test on). -- assignee: - ronaldoussoren nosy: +ronaldoussoren _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9
Jeffrey Yasskin added the comment: In http://gcc.gnu.org/ml/gcc/2005-12/msg00368.html, Mike Stump [EMAIL PROTECTED] said This flag [-no-cpp-precomp] should be removed from the compile, it hasn't been needed in a long while (since gcc-3.1). which was released in 2002. I'm happy to remove -mno-fused-madd if you say it's unnecessary. Ronald, do you mean Removing that option [-Wno-long-double] seems to be harmless? Keeping it harms compiles with non-apple gcc's, but I could add it to a block like -mno-fused-madd. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779871 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com