From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31316 invoked by alias); 1 Jul 2004 07:37:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31261 invoked from network); 1 Jul 2004 07:37:40 -0000 Received: from unknown (HELO mail.polimi.it) (131.175.12.67) by sourceware.org with SMTP; 1 Jul 2004 07:37:40 -0000 Received: from polimi.it (paride.rett.polimi.it [131.175.65.135]) (authenticated bits=0) by mail.polimi.it (Switch-3.0.5/Switch-3.0.0) with ESMTP id i617bIpT028025; Thu, 1 Jul 2004 09:37:20 +0200 (MEST) Message-ID: <40E3BFD7.4080100@polimi.it> Date: Thu, 01 Jul 2004 07:37:00 -0000 From: Paolo Bonzini User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) MIME-Version: 1.0 To: Alexandre Oliva CC: tromey@redhat.com, Kelley Cook , GCC Patches , Paolo Bonzini , Nathanael Nerode , gdb-patches@sources.redhat.com, binutils@sources.redhat.com Subject: [PATCH] Get more stuff compiled for the build machine References: <40DC4524.10905@gcc.gnu.org> <87acyngzi9.fsf@fleche.redhat.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------040107070805000506030009" X-PMX-Version: 4.6.0.99824, Antispam-Core: 4.6.1.104326, Antispam-Data: 2004.6.30.105672 X-PerlMx-Spam: Gauge=%%XPROB%%II, Probability=12%, Report='LINES_OF_YELLING_3 0.671, UPPERCASE_25_50 0.450, LINES_OF_YELLING 0.001, LINES_OF_YELLING_2 0.001, X_ACCEPT_LANG 0, __MIME_VERSION 0, __TO_MALFORMED_2 0, __REFERENCES 0, __IN_REP_TO 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __BAT_BOUNDARY 0, __UNUSABLE_MSGID 0, __MOZILLA_MSGID 0, __UPPERCASE_25_50 0, QUOTED_EMAIL_TEXT 0, __MIME_TEXT_ONLY 0, __HAS_MSGID 0, __SANE_MSGID 0, __USER_AGENT 0, REFERENCES 0.000, IN_REP_TO 0, USER_AGENT 0.000' X-SW-Source: 2004-07/txt/msg00003.txt.bz2 This is a multi-part message in MIME format. --------------040107070805000506030009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 571 > IIRC Paolo has a patch that gets more stuff compiled for the build > machine. jar could certainly be one of those. Here is the patch, I had posted it to gcc@gcc.gnu.org for comments, but since there were none... Jar is not used yet, but it could as well be. Surely it is easier to add it with this scheme in place. Regtested on a native i686-pc-linux-gnu configuration, and on a pseudo-Canadian with build=i686-pc-linux-gnu, host=i386-pc-linux-gnu, target=i386-pc-openbsd. In both cases the in-tree makeinfo was always used. Ok for mainline and src? Paolo --------------040107070805000506030009 Content-Type: text/plain; name="redo-bison-and-friends-configuration.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="redo-bison-and-friends-configuration.patch" Content-length: 12050 Index: configure.in =================================================================== RCS file: /cvs/src/src/configure.in,v retrieving revision 1.222 diff -u -r1.222 configure.in *** configure.in 22 Jun 2004 01:38:35 -0000 1.222 --- configure.in 23 Jun 2004 09:32:10 -0000 *************** *** 956,962 **** # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. - BISON=${BISON-bison} CC=${CC-${host_alias}-gcc} CFLAGS=${CFLAGS-"-g -O2"} CXX=${CXX-${host_alias}-c++} --- 956,961 ---- *************** *** 966,1014 **** CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} BUILD_PREFIX=${build_alias}- BUILD_PREFIX_1=${build_alias}- - MAKEINFO=${MAKEINFO-makeinfo} - - if test -z "${YACC}" ; then - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/bison; then - YACC="bison -y" - break - fi - if test -f $dir/byacc; then - YACC=byacc - break - fi - if test -f $dir/yacc; then - YACC=yacc - break - fi - done - IFS="$save_ifs" - if test -z "${YACC}" ; then - YACC="bison -y" - fi - fi - - if test -z "${LEX}" ; then - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/flex; then - LEX=flex - break - fi - if test -f $dir/lex; then - LEX=lex - break - fi - done - IFS="$save_ifs" - LEX=${LEX-flex} - fi else # Set reasonable default values for some tools even if not Canadian. --- 965,973 ---- CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} + BUILD_DIR_PREFIX=${build_subdir} BUILD_PREFIX=${build_alias}- BUILD_PREFIX_1=${build_alias}- else # Set reasonable default values for some tools even if not Canadian. *************** *** 1019,1089 **** # in Makefile.in, so can still be overridden by fragments. # This is all going to change when we autoconfiscate... - BISON="\$(USUAL_BISON)" CC_FOR_BUILD="\$(CC)" GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" BUILD_PREFIX= BUILD_PREFIX_1=loser- ! MAKEINFO="\$(USUAL_MAKEINFO)" ! LEX="\$(USUAL_LEX)" ! YACC="\$(USUAL_YACC)" ! ! # If CC is still not set, try to get gcc. ! cc_prog_is_gcc= ! if test -z "${CC}" ; then ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ! for dir in $PATH; do ! test -z "$dir" && dir=. ! if test -f $dir/gcc; then ! CC="gcc" ! cc_prog_is_gcc=yes ! echo 'void f(){}' > conftest.c ! if test -z "`${CC} -g -c conftest.c 2>&1`"; then ! CFLAGS=${CFLAGS-"-g -O2"} ! CXXFLAGS=${CXXFLAGS-"-g -O2"} ! else ! CFLAGS=${CFLAGS-"-O2"} ! CXXFLAGS=${CXXFLAGS-"-O2"} ! fi ! rm -f conftest* ! break ! fi ! done ! IFS="$save_ifs" ! CC=${CC-cc} ! else ! # Determine if we are using gcc. ! cat > conftest.c </dev/null 2>&1; then ! cc_prog_is_gcc=yes ! fi ! rm -f conftest.c ! if test -z "${CFLAGS}"; then ! # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC ! # is set to a version of gcc. ! if test "$cc_prog_is_gcc" = yes; then ! echo 'void f(){}' > conftest.c ! if test -z "`${CC} -g -c conftest.c 2>&1`"; then ! CFLAGS=${CFLAGS-"-g -O2"} ! CXXFLAGS=${CXXFLAGS-"-g -O2"} ! else ! CFLAGS=${CFLAGS-"-O2"} ! CXXFLAGS=${CXXFLAGS-"-O2"} ! fi ! rm -f conftest* ! fi ! fi ! fi # We must set the default linker to the linker used by gcc for the correct # operation of libtool. If LD is not defined and we are using gcc, try to # set the LD default to the ld used by gcc. if test -z "$LD"; then ! if test "$cc_prog_is_gcc" = yes; then case $build in *-*-mingw*) gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; --- 978,996 ---- # in Makefile.in, so can still be overridden by fragments. # This is all going to change when we autoconfiscate... CC_FOR_BUILD="\$(CC)" GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" + BUILD_DIR_PREFIX= BUILD_PREFIX= BUILD_PREFIX_1=loser- ! ! AC_PROG_CC # We must set the default linker to the linker used by gcc for the correct # operation of libtool. If LD is not defined and we are using gcc, try to # set the LD default to the ld used by gcc. if test -z "$LD"; then ! if test "$GCC" = yes; then case $build in *-*-mingw*) gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; *************** *** 1600,1608 **** # Generate default definitions for YACC, M4, LEX. These are used if the # Makefile can't locate these programs in objdir. MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing ! AC_CHECK_PROGS([DEFAULT_YACC], ['bison -y' byacc yacc], [$MISSING bison]) ! AC_CHECK_PROGS([DEFAULT_M4], [gm4 gnum4 m4], [$MISSING m4]) ! AC_CHECK_PROGS([DEFAULT_LEX], [flex lex], [$MISSING flex]) # Create a .gdbinit file which runs the one in srcdir # and tells GDB to look there for source files. --- 1507,1517 ---- # Generate default definitions for YACC, M4, LEX. These are used if the # Makefile can't locate these programs in objdir. MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing ! AC_CHECK_PROG([CONFIGURED_BISON], [bison], [$MISSING bison]) ! AC_CHECK_PROGS([CONFIGURED_YACC], ['bison -y' byacc yacc], [$MISSING bison -y]) ! AC_CHECK_PROGS([CONFIGURED_M4], [gm4 gnum4 m4], [$MISSING m4]) ! AC_CHECK_PROGS([CONFIGURED_LEX], [flex lex], [$MISSING flex]) ! AC_CHECK_PROG([CONFIGURED_MAKEINFO], makeinfo, [$MISSING makeinfo]) # Create a .gdbinit file which runs the one in srcdir # and tells GDB to look there for source files. *************** *** 2138,2143 **** --- 2047,2053 ---- # Miscellanea: directories, flags, etc. AC_SUBST(SET_LIB_PATH) AC_SUBST(RPATH_ENVVAR) + AC_SUBST(BUILD_DIR_PREFIX) AC_SUBST(BUILD_PREFIX) AC_SUBST(BUILD_PREFIX_1) AC_SUBST(gcc_version_trigger) *************** *** 2162,2172 **** AC_SUBST(target_configdirs) # Build tools. - AC_SUBST(BISON) AC_SUBST(CC_FOR_BUILD) - AC_SUBST(LEX) - AC_SUBST(MAKEINFO) - AC_SUBST(YACC) AC_SUBST(config_shell) # Host tools. --- 2072,2078 ---- *************** *** 2184,2192 **** AC_SUBST(CFLAGS) AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS) - AC_SUBST(DEFAULT_YACC) - AC_SUBST(DEFAULT_LEX) - AC_SUBST(DEFAULT_M4) # Target tools. NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar) --- 2090,2095 ---- Index: Makefile.def =================================================================== RCS file: /cvs/src/src/Makefile.def,v retrieving revision 1.25 diff -u -r1.25 Makefile.def *** Makefile.def 9 Jun 2004 08:32:32 -0000 1.25 --- Makefile.def 23 Jun 2004 09:32:10 -0000 *************** *** 26,31 **** --- 26,36 ---- build_modules= { module= libiberty; }; build_modules= { module= libbanshee; }; + build_modules= { module= bison; }; + build_modules= { module= byacc; }; + build_modules= { module= lex; }; + build_modules= { module= m4; }; + build_modules= { module= texinfo; }; host_modules= { module= ash; }; host_modules= { module= autoconf; }; Index: Makefile.tpl =================================================================== RCS file: /cvs/src/src/Makefile.tpl,v retrieving revision 1.106 diff -u -r1.106 Makefile.tpl *** Makefile.tpl 23 Jun 2004 08:36:45 -0000 1.106 --- Makefile.tpl 23 Jun 2004 09:32:10 -0000 *************** *** 233,279 **** CXX_FOR_BUILD = $(CXX) # Special variables passed down in EXTRA_GCC_FLAGS. They are defined # here so that they can be overridden by Makefile fragments. BUILD_PREFIX = @BUILD_PREFIX@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ ! BISON=@BISON@ ! USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ ! echo $$r/bison/bison -L $$s/bison/ ; \ else \ ! echo bison ; \ fi` ! DEFAULT_YACC = @DEFAULT_YACC@ ! YACC=@YACC@ ! USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ ! echo $$r/bison/bison -y -L $$s/bison/ ; \ ! elif [ -f $$r/byacc/byacc ] ; then \ ! echo $$r/byacc/byacc ; \ else \ ! echo ${DEFAULT_YACC} ; \ fi` ! DEFAULT_LEX = @DEFAULT_LEX@ ! LEX=@LEX@ ! USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ ! then echo $$r/flex/flex ; \ ! else echo ${DEFAULT_LEX} ; fi` ! ! DEFAULT_M4 = @DEFAULT_M4@ ! M4 = `if [ -f $$r/m4/m4 ] ; \ ! then echo $$r/m4/m4 ; \ ! else echo ${DEFAULT_M4} ; fi` # For an installed makeinfo, we require it to be from texinfo 4.2 or ! # higher, else we use the "missing" dummy. ! MAKEINFO=@MAKEINFO@ ! USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ ! then echo $$r/texinfo/makeinfo/makeinfo ; \ ! else if (makeinfo --version \ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ ! then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still --- 233,282 ---- CXX_FOR_BUILD = $(CXX) + # Path to the build directory for a Canadian cross, empty otherwise. + BUILD_DIR_PREFIX = @BUILD_DIR_PREFIX@ + # Special variables passed down in EXTRA_GCC_FLAGS. They are defined # here so that they can be overridden by Makefile fragments. BUILD_PREFIX = @BUILD_PREFIX@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ ! CONFIGURED_BISON = @CONFIGURED_BISON@ ! BISON = `if [ -f $$r/$(BUILD_DIR_PREFIX)/bison/bison ] ; then \ ! echo $$r/$(BUILD_DIR_PREFIX)/bison/bison -L $$s/bison/ ; \ else \ ! echo ${CONFIGURED_BISON} ; \ fi` ! CONFIGURED_YACC = @CONFIGURED_YACC@ ! YACC = `if [ -f $$s/$(BUILD_DIR_PREFIX)/bison/bison ] ; then \ ! echo $$r/$(BUILD_DIR_PREFIX)/bison/bison -y -L $$s/bison/ ; \ ! elif [ -f $$s/$(BUILD_DIR_PREFIX)/byacc/byacc ] ; then \ ! echo $$r/$(BUILD_DIR_PREFIX)/byacc/byacc ; \ else \ ! echo ${CONFIGURED_YACC} ; \ fi` ! CONFIGURED_LEX = @CONFIGURED_LEX@ ! LEX = `if [ -f $$r/$(BUILD_DIR_PREFIX)/flex/flex ] ; \ ! then echo $$r/$(BUILD_DIR_PREFIX)/flex/flex ; \ ! else echo ${CONFIGURED_LEX} ; fi` ! ! CONFIGURED_M4 = @CONFIGURED_M4@ ! M4 = `if [ -f $$r/$(BUILD_DIR_PREFIX)/m4/m4 ] ; \ ! then echo $$r/$(BUILD_DIR_PREFIX)/m4/m4 ; \ ! else echo ${CONFIGURED_M4} ; fi` # For an installed makeinfo, we require it to be from texinfo 4.2 or ! # higher, else we use the "missing" dummy. We also pass the subdirectory ! # makeinfo even if only the Makefile is there, because Texinfo builds its ! # manual when made, and it requires its own version. ! CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@ ! MAKEINFO = `if [ -f $$r/$(BUILD_DIR_PREFIX)/texinfo/makeinfo/Makefile ] ; \ ! then echo $$r/$(BUILD_DIR_PREFIX)/texinfo/makeinfo/makeinfo ; \ ! else if (${CONFIGURED_MAKEINFO} --version \ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ ! then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi` # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still *************** *** 1642,1647 **** --- 1647,1658 ---- # are specified by depending on a 'maybe-' target. If you're not sure, # it's safer to use a soft dependency. + # Build modules + all-build-bison: maybe-all-build-texinfo + all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo + all-build-flex: maybe-all-build-texinfo + all-build-texinfo: maybe-all-build-libiberty + # Host modules specific to gcc. # GCC needs to identify certain tools. # GCC also needs the information exported by the intl configure script. --------------040107070805000506030009--