This is the mail archive of the crossgcc@sources.redhat.com 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]

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
diff -aur gcc-3.4.3-cygwin/gcc/config/alpha/t-osf4 gcc-3.4.3/gcc/config/alpha/t-osf4
--- gcc-3.4.3-cygwin/gcc/config/alpha/t-osf4	2004-10-18 18:00:48.000000000 +0200
+++ gcc-3.4.3/gcc/config/alpha/t-osf4	2005-05-11 14:45:33.875000000 +0200
@@ -19,7 +19,7 @@
 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
 	rm -f $(SHLIB_SONAME) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
diff -aur gcc-3.4.3-cygwin/gcc/config/arm/t-netbsd gcc-3.4.3/gcc/config/arm/t-netbsd
--- gcc-3.4.3-cygwin/gcc/config/arm/t-netbsd	2004-10-18 18:00:49.000000000 +0200
+++ gcc-3.4.3/gcc/config/arm/t-netbsd	2005-05-11 14:45:52.312500000 +0200
@@ -14,7 +14,7 @@
 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
 	rm -f $(SHLIB_SONAME) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
diff -aur gcc-3.4.3-cygwin/gcc/config/mips/t-iris5-6 gcc-3.4.3/gcc/config/mips/t-iris5-6
--- gcc-3.4.3-cygwin/gcc/config/mips/t-iris5-6	2004-10-18 18:00:51.000000000 +0200
+++ gcc-3.4.3/gcc/config/mips/t-iris5-6	2005-05-11 14:46:10.328125000 +0200
@@ -12,7 +12,7 @@
 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
 	rm -f $(SHLIB_SOLINK) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
diff -aur gcc-3.4.3-cygwin/gcc/config/pa/t-hpux-shlib gcc-3.4.3/gcc/config/pa/t-hpux-shlib
--- gcc-3.4.3-cygwin/gcc/config/pa/t-hpux-shlib	2004-10-18 18:00:51.000000000 +0200
+++ gcc-3.4.3/gcc/config/pa/t-hpux-shlib	2005-05-11 14:46:33.531250000 +0200
@@ -8,7 +8,7 @@
 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
         rm -f $(SHLIB_SONAME) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
         $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
diff -aur gcc-3.4.3-cygwin/gcc/config/sh/t-linux gcc-3.4.3/gcc/config/sh/t-linux
--- gcc-3.4.3-cygwin/gcc/config/sh/t-linux	2004-10-18 18:00:52.000000000 +0200
+++ gcc-3.4.3/gcc/config/sh/t-linux	2005-05-11 14:46:49.765625000 +0200
@@ -25,7 +25,7 @@
 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
 	rm -f $(SHLIB_SOLINK) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	(echo "/* GNU ld script"; \
diff -aur gcc-3.4.3-cygwin/gcc/config/t-libunwind-elf gcc-3.4.3/gcc/config/t-libunwind-elf
--- gcc-3.4.3-cygwin/gcc/config/t-libunwind-elf	2004-10-18 18:00:47.000000000 +0200
+++ gcc-3.4.3/gcc/config/t-libunwind-elf	2005-05-11 14:47:10.109375000 +0200
@@ -15,7 +15,7 @@
 	rm -f $(SHLIB_SOLINK) && \
 	if [ -f $(SHLIBUNWIND_NAME) ]; then \
 	  mv -f $(SHLIBUNWIND_NAME) \
-	     $(SHLIBUNWIND_NAME).`basename $(STAGE_PREFIX)`; \
+	     $(SHLIBUNWIND_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \
 	$(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
diff -aur gcc-3.4.3-cygwin/gcc/config/t-slibgcc-darwin gcc-3.4.3/gcc/config/t-slibgcc-darwin
--- gcc-3.4.3-cygwin/gcc/config/t-slibgcc-darwin	2004-10-18 18:00:47.000000000 +0200
+++ gcc-3.4.3/gcc/config/t-slibgcc-darwin	2005-05-11 14:47:34.265625000 +0200
@@ -17,7 +17,7 @@
 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
 	rm -f $(SHLIB_SOLINK) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
diff -aur gcc-3.4.3-cygwin/gcc/config/t-slibgcc-elf-ver gcc-3.4.3/gcc/config/t-slibgcc-elf-ver
--- gcc-3.4.3-cygwin/gcc/config/t-slibgcc-elf-ver	2004-10-18 18:00:47.000000000 +0200
+++ gcc-3.4.3/gcc/config/t-slibgcc-elf-ver	2005-05-11 14:47:59.359375000 +0200
@@ -17,7 +17,7 @@
 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
 	rm -f $(SHLIB_SOLINK) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
diff -aur gcc-3.4.3-cygwin/gcc/config/t-slibgcc-sld gcc-3.4.3/gcc/config/t-slibgcc-sld
--- gcc-3.4.3-cygwin/gcc/config/t-slibgcc-sld	2004-10-18 18:00:47.000000000 +0200
+++ gcc-3.4.3/gcc/config/t-slibgcc-sld	2005-05-11 14:48:25.968750000 +0200
@@ -14,7 +14,7 @@
 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
 	rm -f $(SHLIB_SOLINK) && \
 	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
+	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 	else true; fi && \
 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
--- glibc-2.3.5/Makeconfig	2005-02-16 11:50:19.000000000 +0100
+++ glibc-2.3.5-cygwin/Makeconfig	2005-05-11 08:24:51.046875000 +0200
@@ -449,7 +449,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
@@ -656,7 +656,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))
@@ -712,14 +712,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 -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
--- glibc-2.3.5/Makerules	2004-12-15 19:52:39.000000000 +0100
+++ glibc-2.3.5-cygwin/Makerules	2005-05-11 08:25:33.578125000 +0200
@@ -416,7 +416,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)
@@ -961,7 +961,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';\
@@ -969,7 +969,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))'\
 	      ')' \
 	) > $@.new
 	mv -f $@.new $@
diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
+++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
@@ -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 -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
+++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
@@ -360,7 +360,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';\
@@ -368,7 +368,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 -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
@@ -10,4 +10,4 @@
 ASFLAGS-.op += -Wa,-Av9a
 ASFLAGS-.og += -Wa,-Av9a
 ASFLAGS-.ob += -Wa,-Av9a
-ASFLAGS-.oS += -Wa,-Av9a
+ASFLAGS-.oST += -Wa,-Av9a
diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
--- glibc-2.3.5/linuxthreads/Makefile	2005-02-16 12:26:38.000000000 +0100
+++ glibc-2.3.5-cygwin/linuxthreads/Makefile	2005-05-11 08:32:50.453125000 +0200
@@ -159,7 +159,7 @@
 install: $(inst_libdir)/libpthread.so
 $(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';\
@@ -167,7 +167,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 $@

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]