patch darwin-driver.c to compile gcc 6.3.0

see https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/darwin-driver.c?r1=244010&r2=244009&pathrev=244010
This commit is contained in:
Frederick Zhang 2017-01-28 20:24:46 +11:00
parent f02abb415b
commit 742c8e9610
2 changed files with 20 additions and 0 deletions

View File

@ -65,6 +65,11 @@ if [ $(osxcross-cmp $GCC_VERSION '>' 5.0.0) == 1 ] &&
patch -p1 < $PATCH_DIR/gcc-pr66035.patch
fi
if [ $(osxcross-cmp $GCC_VERSION '==' 6.3.0) == 1 ]; then
# https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/darwin-driver.c?r1=244010&r2=244009&pathrev=244010
patch -p1 < $PATCH_DIR/darwin-driver.c.patch
fi
mkdir -p build
pushd build &>/dev/null

View File

@ -0,0 +1,15 @@
--- trunk/gcc/config/darwin-driver.c 2017/01/03 00:16:13 244009
+++ trunk/gcc/config/darwin-driver.c 2017/01/03 05:36:40 244010
@@ -299,10 +299,10 @@
if (vers_string != NULL)
{
char *asm_major = NULL;
- char *first_period = strchr(vers_string, '.');
+ const char *first_period = strchr(vers_string, '.');
if (first_period != NULL)
{
- char *second_period = strchr(first_period+1, '.');
+ const char *second_period = strchr(first_period+1, '.');
if (second_period != NULL)
asm_major = xstrndup (vers_string, second_period-vers_string);
else