This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Dan Kegel wrote: > Now that gcc-4.1.1 rc1 is out, it's time to update crosstool. I'm > looking for someone to lend a hand by collecting an appropriate (i.e. > very conservative) subset of the patches posted to this list, clean > them up (making sure they have the usual few lines at the top > describing their purpose and origin), make sure they apply, and send > 'em to me? That will save wear and tear on my wrists. I'll probably > start working on this myself in about a week, so anything that can be > gathered by Monday or so would help. > Hi Dan. In an attempt to save you some trouble of putting together a new crosstool version I am attaching these four patches I created the other day. I hope these make it to the crosstool-0.43. All except the linux-2.6.16-cygwin.patch are more or less forward ports of patches existing in crosstool already. I've successfully built arm-softloat gcc-4.1.0 and glibc-2.4 with nptl support under cygwin with these patches and the nptl patch that has been posted to this list earlier. I also needed BINUTILS_EXTRA_CONFIG="--disable-werror" to get binutils build to finish in cygwin. Antti Seppälä
Fixes kernel build error when running crosstool with complete kernel sources under cygwin: HOSTLD scripts/kconfig/conf scripts/kconfig/conf.o:conf.c:(.text+0x91): undefined reference to `_libintl_gettext' ... Taken from: http://sourceware.org/ml/crossgcc/2005-07/msg00103.html and rediffed to apply cleanly against 2.6.16 diff -Nru linux-2.6.16-orig/Makefile linux-2.6.16/Makefile --- linux-2.6.16-orig/Makefile 2006-04-22 01:08:29.718750000 +0300 +++ linux-2.6.16/Makefile 2006-04-22 01:09:13.015625000 +0300 @@ -1315,9 +1315,15 @@ # FIXME Should go into a make.lib or something # =========================================================================== +IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no) + quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) +ifeq ($(IS_CYGWIN),yes) + cmd_rmdirs = for i in $(rm-dirs); do rm -rf $$i || echo "error removing $$i" ; done +else cmd_rmdirs = rm -rf $(rm-dirs) +endif quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) cmd_rmfiles = rm -f $(rm-files) diff -Nru linux-2.6.16-orig/scripts/Makefile.host linux-2.6.16/scripts/Makefile.host --- linux-2.6.16-orig/scripts/Makefile.host 2006-04-22 01:08:29.812500000 +0300 +++ linux-2.6.16/scripts/Makefile.host 2006-04-22 01:09:13.062500000 +0300 @@ -78,9 +78,17 @@ ##### # Handle options to gcc. Support building with separate output directory -_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(*F).o) +IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no) + +ifeq ($(IS_CYGWIN),yes) + _hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -I$(ELINOS_PREFIX)/include $(HOSTCFLAGS_$(*F).o) +else + _hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(*F).o) +endif + _hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) $(HOSTCXXFLAGS_$(*F).o) + ifeq ($(KBUILD_SRC),) __hostc_flags = $(_hostc_flags) __hostcxx_flags = $(_hostcxx_flags) diff -Nru linux-2.6.16-orig/scripts/kconfig/Makefile linux-2.6.16/scripts/kconfig/Makefile --- linux-2.6.16-orig/scripts/kconfig/Makefile 2006-04-22 01:08:29.843750000 +0300 +++ linux-2.6.16/scripts/kconfig/Makefile 2006-04-22 01:09:13.062500000 +0300 @@ -96,6 +96,13 @@ mconf-objs := mconf.o zconf.tab.o kxgettext-objs := kxgettext.o zconf.tab.o +IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no) + +ifeq ($(IS_CYGWIN),yes) + HOSTLOADLIBES_conf := -L/lib -lintl + HOSTLOADLIBES_mconf := -L/lib -lintl +endif + ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 endif
Fixes elf/librtld.os: In function `process_envvars': : undefined reference to `__access' ... when building glibc-2.3.x on cygwin Idea from http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch Basically, make glibc use .oST as suffix for 'object static' instead of .oS, since cygwin has trouble distinguishing .os from .oS (Original patch had .on, but .oST is more mnemonic for 'object static') glibc-linuxthreads-2.3.5 also requires a patch, see ../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch [ forward ported to glibc-2.3.5 by Petr Cvachoucek: Message-ID: <4282FCBA.3040000@unicontrols.cz> Date: Thu, 12 May 2005 08:50:34 +0200 From: Petr Cvachoucek <cvachoucek@unicontrols.cz> To: Dan Kegel <dank@kegel.com> CC: crossgcc@sources.redhat.com Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin Hi Dan, following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. -- Petr Cvachoucek Unicontrols a.s. http://www.unicontrols.cz ] [ Forward ported to glibc-2.4 from glibc-2.3.5-cygwin.patch ] diff -Nru glibc-2.4-orig/Makeconfig glibc-2.4/Makeconfig --- glibc-2.4-orig/Makeconfig 2006-03-01 12:35:47.000000000 +0200 +++ glibc-2.4/Makeconfig 2006-04-21 21:04:09.406250000 +0300 @@ -463,7 +463,7 @@ # run the linked programs. link-libc = -Wl,-rpath-link=$(rpath-link) \ $(common-objpfx)libc.so$(libc.so-version) \ - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) + $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) # This is how to find at build-time things that will be installed there. rpath-dirs = math elf dlfcn nss nis rt resolv crypt endif @@ -684,7 +684,7 @@ # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) # to pass different flags for each flavor. libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) -all-object-suffixes := .o .os .op .og .ob .oS +all-object-suffixes := .o .os .op .og .ob .oST object-suffixes := CPPFLAGS-.o = $(pic-default) CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) @@ -740,14 +740,14 @@ ifeq (yes,$(build-shared)) # Build special library that contains the static-only routines for libc. -object-suffixes-for-libc += .oS +object-suffixes-for-libc += .oST # Must build the routines as PIC, though, because they can end up in (users') # shared objects. We don't want to use CFLAGS-os because users may, for # example, make that processor-specific. -CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) -CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 -libtype.oS = lib%_nonshared.a +CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) +CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +libtype.oST = lib%_nonshared.a endif # The assembler can generate debug information too. diff -Nru glibc-2.4-orig/Makerules glibc-2.4/Makerules --- glibc-2.4-orig/Makerules 2006-03-01 06:20:13.000000000 +0200 +++ glibc-2.4/Makerules 2006-04-21 21:05:43.093750000 +0300 @@ -417,7 +417,7 @@ # Bounded pointer thunks are only built for *.ob elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) -elide-routines.oS += $(filter-out $(static-only-routines),\ +elide-routines.oST += $(filter-out $(static-only-routines),\ $(routines) $(aux) $(sysdep_routines)) \ $(elide-bp-thunks) elide-routines.os += $(static-only-routines) $(elide-bp-thunks) @@ -974,7 +974,7 @@ install: $(inst_libdir)/libc.so $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ $(common-objpfx)libc.so$(libc.so-version) \ - $(inst_libdir)/$(patsubst %,$(libtype.oS),\ + $(inst_libdir)/$(patsubst %,$(libtype.oST),\ $(libprefix)$(libc-name)) \ $(+force) (echo '/* GNU ld script';\ @@ -982,7 +982,7 @@ echo ' the static library, so try that secondarily. */';\ cat $<; \ echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ ) > $@.new mv -f $@.new $@ diff -Nru glibc-2.4-orig/extra-lib.mk glibc-2.4/extra-lib.mk --- glibc-2.4-orig/extra-lib.mk 2004-12-03 00:54:47.000000000 +0200 +++ glibc-2.4/extra-lib.mk 2006-04-21 21:04:09.484375000 +0300 @@ -13,7 +13,7 @@ ifneq (,$($(lib)-static-only-routines)) ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) -object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) +object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) endif endif @@ -29,7 +29,7 @@ # Add each flavor of library to the lists of things to build and install. install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) -extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ +extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ $(patsubst %,%$o,$(filter-out \ $($(lib)-shared-only-routines),\ $(all-$(lib)-routines)))) @@ -57,7 +57,7 @@ # Use o-iterator.mk to generate a rule for each flavor of library. -ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) +ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) define o-iterator-doit $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ $(patsubst %,$(objpfx)%$o,\ @@ -65,7 +65,7 @@ $(all-$(lib)-routines))); \ $$(build-extra-lib) endef -object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) +object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) endif @@ -77,9 +77,9 @@ $(build-extra-lib) endif -ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) -$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ - $(patsubst %,$(objpfx)%.oS,\ +ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) +$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ + $(patsubst %,$(objpfx)%.oST,\ $(filter $($(lib)-static-only-routines),\ $(all-$(lib)-routines))) $(build-extra-lib) diff -Nru glibc-2.4-orig/nptl/Makefile glibc-2.4/nptl/Makefile --- glibc-2.4-orig/nptl/Makefile 2006-02-28 11:36:05.000000000 +0200 +++ glibc-2.4/nptl/Makefile 2006-04-21 21:04:09.484375000 +0300 @@ -370,7 +370,7 @@ $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ $(objpfx)libpthread.so$(libpthread.so-version) \ - $(inst_libdir)/$(patsubst %,$(libtype.oS),\ + $(inst_libdir)/$(patsubst %,$(libtype.oST),\ $(libprefix)pthread) \ $(+force) (echo '/* GNU ld script';\ @@ -378,7 +378,7 @@ echo ' the static library, so try that secondarily. */';\ cat $<; \ echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ ')' \ ) > $@.new mv -f $@.new $@ diff -Nru glibc-2.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.4/sysdeps/sparc/sparc32/sparcv9/Makefile --- glibc-2.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 09:46:14.000000000 +0300 +++ glibc-2.4/sysdeps/sparc/sparc32/sparcv9/Makefile 2006-04-21 21:04:09.500000000 +0300 @@ -10,4 +10,4 @@ ASFLAGS-.op += -Wa,-Av9a ASFLAGS-.og += -Wa,-Av9a ASFLAGS-.ob += -Wa,-Av9a -ASFLAGS-.oS += -Wa,-Av9a +ASFLAGS-.oST += -Wa,-Av9a
Fixes errors when building soft-float glibc with gcc: .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3' Taken from openembedded development repository: http://ewi546.ewi.utwente.nl/tmp/viewmtn/file.psp?id=bb3ad83db4bfd3f085d12e2badf483f9bd549130&path=packages/gcc/gcc-4.1.0/arm-softfloat.patch A similar patch exists in crosstool already for gcc-3.4.x but it won't fix all the errors. This patch works also with gcc-4.1.0. Index: gcc-4.0.2/gcc/config/arm/t-linux =================================================================== --- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000 +++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000 @@ -4,7 +4,10 @@ LIBGCC2_DEBUG_CFLAGS = -g0 LIB1ASMSRC = arm/lib1funcs.asm -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx +LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ + _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ + _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ + _fixsfsi _fixunssfsi _floatdidf _floatdisf # MULTILIB_OPTIONS = mhard-float/msoft-float # MULTILIB_DIRNAMES = hard-float soft-float
# Dimitry Andric <dimitry@andric.com>, 2004-05-01 # # * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed # anymore. (The required functions are now in libgcc.) # # Fixes errors like # arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat # collect2: ld returned 1 exit status # make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 # when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat [ original patch forward ported to gcc-4.1.0 ] diff -Nru gcc-4.1.0-orig/gcc/config/arm/linux-elf.h gcc-4.1.0/gcc/config/arm/linux-elf.h --- gcc-4.1.0-orig/gcc/config/arm/linux-elf.h 2005-10-10 04:04:31.000000000 +0300 +++ gcc-4.1.0/gcc/config/arm/linux-elf.h 2006-04-21 16:34:36.000000000 +0300 @@ -49,7 +49,7 @@ %{shared:-lc} \ %{!shared:%{profile:-lc_p}%{!profile:-lc}}" -#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" +#define LIBGCC_SPEC "-lgcc" #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |