Add binutils patch to fix build with non-gnu sed

This commit is contained in:
dhewg 2012-11-27 16:18:22 +01:00
parent 97b86821a0
commit 0a804a8ae4
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,39 @@
diff -burN '--exclude=.git' binutils-2.21.1/ld/emultempl/spuelf.em binutils-2.21.1-PS3/ld/emultempl/spuelf.em
--- binutils-2.21.1/ld/emultempl/spuelf.em 2009-08-10 04:50:56.000000000 -0300
+++ binutils-2.21.1-PS3/ld/emultempl/spuelf.em 2011-05-25 10:15:21.220050910 -0300
@@ -396,7 +396,11 @@
argv[my_argc++] = "-T";
argv[my_argc++] = auto_overlay_file;
argv[my_argc] = 0;
+#if defined(_WIN32)
+ execvp (argv[0], (const char* const*) argv);
+#else
execvp (argv[0], (char *const *) argv);
+#endif
perror (argv[0]);
_exit (127);
}
diff -burN '--exclude=.git' binutils-2.21.1/binutils/Makefile.am binutils-2.21.1-PS3/binutils/Makefile.am
--- binutils-2.21.1/binutils/Makefile.am 2011-07-06 13:27:16.000000000 +0200
+++ binutils-2.21.1-PS3/binutils/Makefile.am 2011-07-06 13:28:06.000000000 +0200
@@ -283,7 +283,7 @@
$(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
embedspu: embedspu.sh Makefile
- sed "/^program_transform_name=/cprogram_transform_name=$(program_transform_name)" < $< > $@
+ awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
chmod a+x $@
# We need these for parallel make.
diff -burN '--exclude=.git' binutils-2.21.1/binutils/Makefile.in binutils-2.21.1-PS3/binutils/Makefile.in
--- binutils-2.21.1/binutils/Makefile.in 2011-07-06 13:27:23.000000000 +0200
+++ binutils-2.21.1-PS3/binutils/Makefile.in 2011-07-06 13:28:35.000000000 +0200
@@ -1295,7 +1295,7 @@
$(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
embedspu: embedspu.sh Makefile
- sed "/^program_transform_name=/cprogram_transform_name=$(program_transform_name)" < $< > $@
+ awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
chmod a+x $@
# We need these for parallel make.

View File

@ -166,6 +166,9 @@ extract "$GCC_TARBALL" "$WIIDEV"
extract "$GMP_TARBALL" "$WIIDEV/$GCC_DIR"
extract "$MPFR_TARBALL" "$WIIDEV/$GCC_DIR"
# http://sourceware.org/bugzilla/show_bug.cgi?id=12964
patch -d $WIIDEV/$BINUTILS_DIR -u -p1 -i $SCRIPTDIR/binutils-2.21.1.patch || die "Error applying binutils patch"
# in-tree gmp and mpfr
mv "$WIIDEV/$GCC_DIR/$GMP_DIR" "$WIIDEV/$GCC_DIR/gmp" || die "Error renaming $GMP_DIR -> gmp"
mv "$WIIDEV/$GCC_DIR/$MPFR_DIR" "$WIIDEV/$GCC_DIR/mpfr" || die "Error renaming $MPFR_DIR -> mpfr"