From: Keith M. <kei...@us...> - 2009-02-26 19:12:14
|
Update of /cvsroot/mingw/xscripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8416 Modified Files: ChangeLog x86-mingw32-build.sh Log Message: Improve efficiency of GCC build; add more comments. Index: x86-mingw32-build.sh =================================================================== RCS file: /cvsroot/mingw/xscripts/x86-mingw32-build.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** x86-mingw32-build.sh 22 Feb 2009 15:18:24 -0000 1.7 --- x86-mingw32-build.sh 26 Feb 2009 19:12:03 -0000 1.8 *************** *** 6,10 **** # MinGW cross-compiler for Win32. # ! # Copyright (C) 2006, MinGW Project # Written by Keith Marshall <kei...@us...> # --- 6,10 ---- # MinGW cross-compiler for Win32. # ! # Copyright (C) 2006, 2009, MinGW Project # Written by Keith Marshall <kei...@us...> # *************** *** 32,42 **** --- 32,52 ---- . $script.getopts + # Specify the TARGET identification prefix, to be assigned to the cross + # compiler tool suite, and the operating system element, which may be used + # to qualify source package names. + # TARGET=${1-${TARGET-${TARGET_CPU-"i386"}-${TARGET_OS="mingw32"}}} TARGET_OS=${TARGET_OS-"`echo $TARGET | sed 's,^.*-mingw,mingw,'`"} + # Check how the user wants to progress the build, (default is `interactive'), + # then hand off package selection and set-up to the appropriate helper script. + # assume BUILD_METHOD interactive test "$BUILD_METHOD" = interactive && BUILD_METHOD=dialogue || BUILD_METHOD=batch test -r $script.$BUILD_METHOD && . $script.$BUILD_METHOD + # Check that all required packages are either available locally, + # or can be downloaded from a source repository identified on set-up. + # echo " $script: checking package availability ..." *************** *** 58,61 **** --- 68,73 ---- done + # Prepare for building all selected packages and components. + # prompt " $script: preparing the build tree... " *************** *** 68,71 **** --- 80,93 ---- unrecoverable="$script: unrecoverable error" + # The following pair of variables are used when `making' the GCC components; + # we initialise them here, to restrict the STAGE 1 build to creation of only + # the C language compiler; they are subsequently reset, after completion of + # that STAGE 1 build, to enable the building of any other selected language + # components in STAGE 2. + # + ALL_GCC=all-gcc INSTALL_GCC=install-gcc + + # Progress the build, in two stages. + # for STAGE in 1 2 do for COMPONENT in $BUILD_COMPONENTS *************** *** 95,101 **** gcc) ! test -r gcc-*/configure || $RUN prepare gcc-core-$GCC_VERSION ! if test $STAGE -eq 2 then for FILE in $GCC_LANGUAGE_OPTIONS do --- 117,123 ---- gcc) ! if ! test -r gcc-*/configure then + $RUN prepare gcc-core-$GCC_VERSION for FILE in $GCC_LANGUAGE_OPTIONS do *************** *** 106,119 **** fi $RUN setbuilddir build-gcc . ! $RUN ../gcc-*/configure --prefix="$INSTALL_DIR" --target="$TARGET" \ ! $GLOBAL_BASE_OPTIONS $GCC_BASE_OPTIONS --enable-languages=` ! case $STAGE in 1) echo c ;; 2) echo $GCC_LANGUAGE_SET ;; esac` \ ! --with-sysroot="$INSTALL_DIR" || die $? \ ! "$unrecoverable configuring gcc" ! $RUN $MAKE CFLAGS="$CFLAGS_FOR_GCC" LDFLAGS="$LDFLAGS_FOR_GCC" || die $? \ ! "$unrecoverable building gcc" ! $RUN $MAKE install || die $? \ "$unrecoverable installing gcc" cd "$WORKING_DIR"; test $LEAN_BUILD && rm -rf build-gcc ;; --- 128,145 ---- fi $RUN setbuilddir build-gcc . ! if ! test -r ./config.status ! then ! $RUN ../gcc-*/configure --prefix="$INSTALL_DIR" --target="$TARGET" \ ! $GLOBAL_BASE_OPTIONS $GCC_BASE_OPTIONS --with-sysroot="$INSTALL_DIR" \ ! --enable-languages=$GCC_LANGUAGE_SET || die $? \ ! "$unrecoverable configuring gcc" ! fi ! $RUN $MAKE CFLAGS="$CFLAGS_FOR_GCC" \ ! LDFLAGS="$LDFLAGS_FOR_GCC" $ALL_GCC || die $? \ ! "$unrecoverable building gcc" ! $RUN $MAKE $INSTALL_GCC || die $? \ "$unrecoverable installing gcc" cd "$WORKING_DIR"; test $LEAN_BUILD && rm -rf build-gcc + ALL_GCC="" INSTALL_GCC="" ;; *************** *** 160,163 **** --- 186,191 ---- done + # Clean up when done. + # prompt " $script: cleaning up... " Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/xscripts/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChangeLog 23 Feb 2009 00:17:04 -0000 1.9 --- ChangeLog 26 Feb 2009 19:12:02 -0000 1.10 *************** *** 1,2 **** --- 1,13 ---- + 2009-02-26 Keith Marshall <kei...@us...> + + Improve efficiency of GCC build; add more comments. + + * x86-mingw32-build.sh: Add miscellaneous comments. + (GCC_LANGUAGE_SET): Enable all in STAGE 1 configuration. + (ALL_GCC, INSTALL_GCC): New shell variables; define them; use when... + [COMPONENT == gcc, STAGE == 1]: ...to facilite once-only configuration + with all languages selected, while still building only the C compiler; + reset at end of STAGE 1, to enable remaining languages in STAGE 2. + 2009-02-22 Keith Marshall <kei...@us...> |