This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Here is a patch for gcc 2.8.1 for use in building gcc 2.8.1 as a cross compiler. I didn't make one sooner as I was kind of hoping someone else would beat me to it. Please note that I'm doing this on my own and doesn't represent the FSF or Cygnus. In another message I'll send out an updated `one-tree' script. This file is in ftp://ftp.cygnus.com/pub/embedded/crossgcc/crossgcc-gcc-2.8.1.patch --- This is the "crossgcc" patch for gcc 2.8.1. It makes gcc-2.8.1 build using the "one-tree" method. To apply this patch: cd gcc-2.8.1 patch -p1 < this-file Send comments or bug reports to crossgcc@cygnus.com. Tue May 19 22:31:20 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (deduced.h): Only run scan-types if $(SYSTEM_HEADER_DIR) exists. (stmp-fixproto): Simlarly for running fixproto. * cross-make (SYSTEM_HEADER_DIR): Now $(tooldir)/sys-include. Fri Oct 10 13:46:56 1997 Doug Evans <dje@canuck.cygnus.com> * configure.in: Handle --with-newlib. * Makefile.in (LIBGCC2_CFLAGS): Add @inhibit_libc@. Sun Sep 7 09:59:08 1997 Jan-Jaap van der Heijden (J.J.vanderHeijden@student.utwente.nl) * configure.in: Make symlink to as-new rather than as.new. Similarly for ld-new. * configure: Rebuilt. <Various people at Cygnus> * config/i386/x-go32: New file. * configure.in: Don't build objc unless --enable-objc. (i386-go32): Set xmake_file to x-go32. * configure: Regenerate. diff -rcp2N /tege/gcc/gcc-2.8.1/config/i386/x-go32 ./config/i386/x-go32 *** /tege/gcc/gcc-2.8.1/config/i386/x-go32 Wed Dec 31 16:00:00 1969 --- ./config/i386/x-go32 Sat Mar 15 16:44:28 1997 *************** *** 0 **** --- 1,2 ---- + # FIXME: Protoize doesn't build on go32, so disable it. + LANGUAGES = c c++ objective-c *** /tege/gcc/gcc-2.8.1/configure.in Sat Feb 28 12:58:12 1998 --- ./configure.in Thu Jul 9 13:09:00 1998 *************** *** 860,865 **** --- 860,866 ---- xm_file=i386/xm-go32.h tm_file=i386/go32.h tmake_file=i386/t-go32 + xmake_file=i386/x-go32 ;; i[[34567]]86-pc-msdosdjgpp*) xm_file=i386/xm-go32.h *************** *** 3017,3031 **** # If we have gas in the build tree, make a link to it. if [[ -f ../gas/Makefile ]]; then ! rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null fi # If we have ld in the build tree, make a link to it. if [[ -f ../ld/Makefile ]]; then if [[ x$use_collect2 = x ]]; then ! rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null else ! rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null fi fi --- 3018,3032 ---- # If we have gas in the build tree, make a link to it. if [[ -f ../gas/Makefile ]]; then ! rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null fi # If we have ld in the build tree, make a link to it. if [[ -f ../ld/Makefile ]]; then if [[ x$use_collect2 = x ]]; then ! rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null else ! rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null fi fi *************** *** 3038,3043 **** --- 3039,3051 ---- # The odd quoting in the next line works around # an apparent bug in bash 1.12 on linux. ${srcdir}/[[*]]/config-lang.in) ;; + # Don't build objc unless explicitly enabled since it doesn't + # "just work" in cross compilers (stdio.h,ctype.h "missing"). + ${srcdir}/objc/config-lang.in) + if [[ x$enable_objc = xyes ]]; then + subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" + fi + ;; *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;; esac done *************** *** 3162,3167 **** --- 3170,3185 ---- fi echo "source ${srcdir}/.gdbinit" >> .gdbinit fi + + # If this is using newlib, then define inhibit_libc in + # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of + # libgcc.a, but that's OK because newib should have its own version of + # assert.h. + inhibit_libc= + if [[ x$with_newlib = xyes ]]; then + inhibit_libc=-Dinhibit_libc + fi + AC_SUBST(inhibit_libc) # Process the language and host/target makefile fragments. ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" *** /tege/gcc/gcc-2.8.1/configure Sat Feb 28 18:02:02 1998 --- ./configure Thu Jul 9 13:09:17 1998 *************** *** 3354,3359 **** --- 3354,3360 ---- xm_file=i386/xm-go32.h tm_file=i386/go32.h tmake_file=i386/t-go32 + xmake_file=i386/x-go32 ;; i[34567]86-pc-msdosdjgpp*) xm_file=i386/xm-go32.h *************** *** 5511,5525 **** # If we have gas in the build tree, make a link to it. if [ -f ../gas/Makefile ]; then ! rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null fi # If we have ld in the build tree, make a link to it. if [ -f ../ld/Makefile ]; then if [ x$use_collect2 = x ]; then ! rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null else ! rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null fi fi --- 5512,5526 ---- # If we have gas in the build tree, make a link to it. if [ -f ../gas/Makefile ]; then ! rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null fi # If we have ld in the build tree, make a link to it. if [ -f ../ld/Makefile ]; then if [ x$use_collect2 = x ]; then ! rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null else ! rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null fi fi *************** *** 5532,5537 **** --- 5533,5545 ---- # The odd quoting in the next line works around # an apparent bug in bash 1.12 on linux. ${srcdir}/[*]/config-lang.in) ;; + # Don't build objc unless explicitly enabled since it doesn't + # "just work" in cross compilers (stdio.h,ctype.h "missing"). + ${srcdir}/objc/config-lang.in) + if [ x$enable_objc = xyes ]; then + subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" + fi + ;; *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; esac done *************** *** 5657,5662 **** --- 5665,5681 ---- echo "source ${srcdir}/.gdbinit" >> .gdbinit fi + + # If this is using newlib, then define inhibit_libc in + # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of + # libgcc.a, but that's OK because newib should have its own version of + # assert.h. + inhibit_libc= + if [ x$with_newlib = xyes ]; then + inhibit_libc=-Dinhibit_libc + fi + + # Process the language and host/target makefile fragments. ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" *************** *** 5905,5910 **** --- 5924,5930 ---- s%@CPP@%$CPP%g s%@manext@%$manext%g s%@objext@%$objext%g + s%@inhibit_libc@%$inhibit_libc%g s%@subdirs@%$subdirs%g s%@all_languages@%$all_languages%g s%@all_boot_languages@%$all_boot_languages%g *** /tege/gcc/gcc-2.8.1/Makefile.in.~1~ Mon Mar 2 17:54:31 1998 --- ./Makefile.in Thu Jul 9 12:04:56 1998 *************** *** 276,282 **** # we use this here because that should be enough, and also # so that -g1 will be tested. LIBGCC2_DEBUG_CFLAGS = -g1 ! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fexceptions # Additional options to use when compiling libgcc2.a. # Some targets override this to -Iinclude --- 276,282 ---- # we use this here because that should be enough, and also # so that -g1 will be tested. LIBGCC2_DEBUG_CFLAGS = -g1 ! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fexceptions @inhibit_libc@ # Additional options to use when compiling libgcc2.a. # Some targets override this to -Iinclude *************** *** 1935,1944 **** # Files related to the fixproto script. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs ! CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \ export CC; \ ! $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h ! mv tmp-deduced.h deduced.h gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS) ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ --- 1935,1949 ---- # Files related to the fixproto script. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs ! if [ -d $(SYSTEM_HEADER_DIR) ]; \ ! then \ ! CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \ export CC; \ ! $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \ ! mv tmp-deduced.h deduced.h; \ ! else \ ! touch deduced.h; \ ! fi gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS) ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ *************** *** 1992,1998 **** else \ : This line works around a 'make' bug in BSDI 1.1.; \ FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ ! $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ touch include/fixed; \ fi touch stmp-fixproto --- 1997,2005 ---- else \ : This line works around a 'make' bug in BSDI 1.1.; \ FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ ! if [ -d $(SYSTEM_HEADER_DIR) ] ; then \ ! $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ ! else true; fi; \ touch include/fixed; \ fi touch stmp-fixproto *** /tege/gcc/gcc-2.8.1/cross-make Sat Feb 10 12:12:59 1996 --- ./cross-make Thu Jul 9 14:26:38 1998 *************** *** 12,18 **** RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET) # Dir to search for system headers. Normally /usr/include. ! SYSTEM_HEADER_DIR = $(tooldir)/include # Don't try to compile the things we can't compile. ALL = all.cross --- 12,19 ---- RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET) # Dir to search for system headers. Normally /usr/include. ! # Use CROSS_INCLUDE_DIR not TOOL_INCLUDE_DIR for other vendor's headers. ! SYSTEM_HEADER_DIR = $(tooldir)/sys-include # Don't try to compile the things we can't compile. ALL = all.cross