Since genuine 80386 machines is officially not supported by FreeBSD. It is safe to enable generation of i486 code by default. This needed to enable atomic built-ins, which greatly speed up concurrent code. In standard C++ library std::string, using locking extensively and atomic built-ins will give noticeable speedup. Needless to say, granting to use i486 instructions by default will speed up some programs which does not explicitly set -march. I opened similar bug report (gnu/148926) regarding system gcc. The problem were solved by enabling some defines in c++config.h related to atomic builtins (since system gcc already generates i486 code by default). Adding -with-arch=i486 to configure options is sufficient for lang/gcc45. The gcc will generate i486 code by default and libstdc++ shipped with it will be auto-configured to use atomic built-ins without need to edit c++config.h manually. I'm attaching the patch which adds -with-arch=i486 for i386 architecture. Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->gerald Over to maintainer (via the GNATS Auto Assign Tool)
The "-mcpu" value i386 looks very unreasonable even for "-arch=i386" since most machines are not actually 80386. I updated my patch to add "--with-cpu=generic" to optimize code for common CPUs. I didn't use "--with-tune=generic" and used "--with-cpu" instead intentionally, to override "cpu" option present in BUILD_ROOT/gcc/configargs.h.
Tijl and me are trying to get this addressed upstream. Gerald
gerald 2011-02-22 18:56:53 UTC FreeBSD ports repository Modified files: lang/gcc46 Makefile distinfo pkg-plist Log: Update to the 20110219 snapshot of GCC 4.6.0. This addresses the pollution of common namespace by share/python/aotcompile.py and share/python/classfile.py which now go into version-specific directories. By means of an extra patch default code generation on i386 defaults to i486 on FreeBSD 6 and above. [1] Submitted by: tijl [1] Reported by: Yuri Karaban <tech@askold.net> [1] PR: 154364 [1] Revision Changes Path 1.479 +1 -1 ports/lang/gcc46/Makefile 1.345 +10 -10 ports/lang/gcc46/distinfo 1.112 +4 -4 ports/lang/gcc46/pkg-plist _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
gerald 2011-02-22 18:57:48 UTC FreeBSD ports repository Added files: lang/gcc46/files patch-default-i486 Log: Update to the 20110219 snapshot of GCC 4.6.0. This addresses the pollution of common namespace by share/python/aotcompile.py and share/python/classfile.py which are now saved in version-specific directories. By means of an extra patch default code generation on i386 now defaults to i486 on FreeBSD 6 and above. [1] Submitted by: tijl [1] Reported by: Yuri Karaban <tech@askold.net> [1] PR: 154364 [1] Revision Changes Path 1.1 +25 -0 ports/lang/gcc46/files/patch-default-i486 (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
gerald 2011-02-22 19:44:39 UTC FreeBSD ports repository Modified files: lang/gcc45 Makefile distinfo Added files: lang/gcc45/files patch-default-i486 Log: Update to the 20110217 snapshot of GCC 4.5.3. By means of an extra patch code generation on i386 now defaults to i486 on FreeBSD 6 and above. [1] Submitted by: tijl [1] Reported by: Yuri Karaban <tech@askold.net> [1] PR: 154364 [1] Revision Changes Path 1.480 +1 -1 ports/lang/gcc45/Makefile 1.346 +10 -10 ports/lang/gcc45/distinfo 1.1 +25 -0 ports/lang/gcc45/files/patch-default-i486 (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed I adjusted lang/gcc45 and lang/gcc46 accordingly and will also push this upstream where it's already approved for GCC 4.6 and I am also thinking GCC 4.5.