[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reverse_cross is supported in gcc-4.2



Hello,

 When DEB_CROSS=yes it looks like it never gets to the 'else' code
that builds the cross compiler. I have tried following patch
succesfully.

diff -urN gcc-4.2-4.2-20070707/debian/rules2
gcc-4.2-4.2-20070707.cross/debian/rules2
--- gcc-4.2-4.2-20070707/debian/rules2	2007-07-09 17:54:48.000000000 +0200
+++ gcc-4.2-4.2-20070707.cross/debian/rules2	2007-07-09 17:52:52.000000000 +0200
@@ -542,8 +542,39 @@
	dh_testdir
	rm -f bootstrap-protocol
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
-ifndef DEB_CROSS
-ifndef REVERSE_CROSS
+ifdef DEB_CROSS
+	: # build cross compiler for $(TARGET_ALIAS)
+	( \
+	  set +e; \
+	  PATH=$(PWD)/bin:$$PATH \
+	  $(SET_LOCPATH) \
+	    $(MAKE) -C $(builddir) $(NJOBS) \
+		CC="$(CC)" \
+		CFLAGS="$(CFLAGS)" \
+		BOOT_CFLAGS="$(BOOT_CFLAGS)" \
+		LDFLAGS="$(LDFLAGS)" \
+		; \
+	  echo $$? > status; \
+	) 2>&1 | tee bootstrap-protocol
+	s=`cat status`; rm -f status; test $$s -eq 0
+else
+ ifdef REVERSE_CROSS
+	: # build cross compiler for $(TARGET_ALIAS)
+	( \
+	  set +e; \
+	  PATH=$(PWD)/bin:$$PATH \
+	  $(SET_LOCPATH) \
+	    $(MAKE) -C $(builddir) $(NJOBS) \
+		CC="$(CC)" \
+		CFLAGS="$(CFLAGS)" \
+		BOOT_CFLAGS="$(BOOT_CFLAGS)" \
+		LDFLAGS="$(LDFLAGS)" \
+		; \
+	  echo $$? > status; \
+	) 2>&1 | tee bootstrap-protocol
+	s=`cat status`; rm -f status; test $$s -eq 0
+ else
+  # Native build
  ifeq ($(with_java),yes)
	mkdir -p bin
	ln -sf /usr/bin/fastjar bin/jar
@@ -604,21 +635,6 @@
	  echo $$? > status; \
	) 2>&1 | tee bootstrap-protocol
	s=`cat status`; rm -f status; test $$s -eq 0
-else
-	: # build cross compiler for $(TARGET_ALIAS)
-	( \
-	  set +e; \
-	  PATH=$(PWD)/bin:$$PATH \
-	  $(SET_LOCPATH) \
-	    $(MAKE) -C $(builddir) $(NJOBS) \
-		CC="$(CC)" \
-		CFLAGS="$(CFLAGS)" \
-		BOOT_CFLAGS="$(BOOT_CFLAGS)" \
-		LDFLAGS="$(LDFLAGS)" \
-		; \
-	  echo $$? > status; \
-	) 2>&1 | tee bootstrap-protocol
-	s=`cat status`; rm -f status; test $$s -eq 0
endif
endif
	-chmod 755 $(srcdir)/contrib/warn_summary

2007/7/9, Hector Oron <hector.oron@gmail.com>:
> If you remove the REVERSE_CROSS ifndef (and matching endif), does it
> build a cross-compiler as normal?

Yes, it builds.

Regards
--
 Héctor Orón



--
Héctor Orón



Reply to: