Hi,
I've a goal of building an autovectoring/optimized GCC/GFortran
v4.2.1 (& newer) on OSX 10.5.1.
I'm starting with source trees pulled from,
http://www.opensource.apple.com/darwinsource/10.5/gcc_42-5531/
svn://gcc.gnu.org/svn/gcc/tags/gcc_4_2_1_release/gcc/fortran
Per instructions, I invoke the build simply with,
mkdir -p build/obj build/dst build/sym
gnumake install RC_OS=macos RC_ARCHS=ppc TARGETS=ppc \
SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \
DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym
That works perfectly for Out-of-the-Box GCC/GFortran.
Next, to turn on auto-vectorization, reading here,
http://gcc.gnu.org/projects/tree-ssa/vectorization.htmlI understand that I must assign
CFLAGS =... -O3 -ftree-vectorize -ftree-vectorizer-verbose=1 ...
Building the "Apple way", so as to include the apple-driver, etc., my understanding is that all configuration occurs in the "APPLE LOCAL",
build_gcc
My questions about this are,
(1) Is that true?
(2) If so, is this a sufficient patch to do the trick, and correctly propagate the CFLAGS through the entire multi-stage build of gcc?
=====================================================
--- build_gcc_ORIG 2007-12-04 12:31:50.000000000 -0800
+++ build_gcc 2007-12-04 12:32:59.000000000 -0800
@@ -33,7 +33,7 @@
# $RC_NONARCH_CFLAGS (and mysteriously prepends '-pipe' thereto).
# We will allow this to override the default $CFLAGS and $CXXFLAGS.
-CFLAGS="-g -O2 ${RC_NONARCH_CFLAGS/-pipe/}"
+CFLAGS="-g -O3 -ftree-vectorize -ftree-vectorizer-verbose=1 ${RC_NONARCH_CFLAGS/-pipe/}"
# This isn't a parameter; it is the architecture of the current machine.
BUILD=`arch | $TRANSLATE_ARCH`
@@ -103,10 +103,12 @@
CONFIGFLAGS="--disable-checking -enable-werror \
--prefix=$DEST_ROOT \
--mandir=\${prefix}/share/man \
- --enable-languages=c,objc,c++,obj-c++ \
+ --enable-languages=c,objc,c++,obj-c++,fortran \
--program-transform-name=/^[cg][^.-]*$/s/$/-$MAJ_VERS/ \
--with-gxx-include-dir=\${prefix}/include/c++/$LIBSTDCXX_VERSION \
--with-slibdir=/usr/lib \
+ --with-gmp=/usr/local/gmp \
+ --with-mpfr=/usr/local/mpfr \
--build=$BUILD-apple-darwin$DARWIN_VERS"
# Figure out how many make processes to run.
=====================================================
(3) Given OSX' recent UNIX-compliance certification, is this Apple-localized building of GCC still needed/recommended?
Or is there a more straighforward, generic process that can now be adopted so as to be able to more easily track progress in the GCC Trunk?
I'd appreciate any advice!
Bob Tompkins