Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 537826
Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +9 lines)
Line  Link Here
0
-- gcc/libgcov.c
0
++ gcc/libgcov.c
Lines 34-39 Link Here
34
#include "coretypes.h"
34
#include "coretypes.h"
35
#include "tm.h"
35
#include "tm.h"
36
36
37
/* to deal with XBC headers from 10.10 */
38
#ifndef __has_extension
39
#define __has_extension(x) 0
40
#endif
41
#ifndef __has_feature
42
#define __has_feature(x) 0
43
#endif
44
37
/* APPLE LOCAL begin instant off 6414141 */
45
/* APPLE LOCAL begin instant off 6414141 */
38
#if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__arm__)
46
#if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__arm__)
39
#include <vproc.h>
47
#include <vproc.h>
(-)gcc/config/darwin-driver.c.orig (-2 lines)
Lines 174-181 Link Here
174
  version_p = osversion + 1;
174
  version_p = osversion + 1;
175
  if (ISDIGIT (*version_p))
175
  if (ISDIGIT (*version_p))
176
    major_vers = major_vers * 10 + (*version_p++ - '0');
176
    major_vers = major_vers * 10 + (*version_p++ - '0');
177
  if (major_vers > 4 + 9)
178
    goto parse_failed;
179
  if (*version_p++ != '.')
177
  if (*version_p++ != '.')
180
    goto parse_failed;
178
    goto parse_failed;
181
  version_pend = strchr(version_p, '.');
179
  version_pend = strchr(version_p, '.');
(-)gcc/config/darwin-c.c.orig (-13 / +73 lines)
Lines 930-960 Link Here
930
930
931
/* Return the value of darwin_macosx_version_min suitable for the
931
/* Return the value of darwin_macosx_version_min suitable for the
932
   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
932
   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
933
   so '10.4.2' becomes 1042.
933
   so '10.4.2' becomes 1042 and '10.10.2' becomes 101002.
934
   Cap patch level to 9 in the old format.
934
   Print a warning if the version number is not known.  */
935
   Print a warning if the version number is not known.  */
935
static const char *
936
static const char *
936
/* APPLE LOCAL ARM 5683689 */
937
/* APPLE LOCAL ARM 5683689 */
937
macosx_version_as_macro (void)
938
macosx_version_as_macro (void)
938
{
939
{
939
  static char result[] = "1000";
940
  static char result[7] = "1000";
941
  int inputindex = 3, outputindex = 2;
940
942
943
  /* make sure version starts with "10." - makes sure we can safely start
944
   * parsing at inputindex == 3 */
941
  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
945
  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
942
    goto fail;
946
    goto fail;
947
948
  /* first character of minor version needs to be digit */
943
  if (! ISDIGIT (darwin_macosx_version_min[3]))
949
  if (! ISDIGIT (darwin_macosx_version_min[3]))
944
    goto fail;
950
    goto fail;
945
  result[2] = darwin_macosx_version_min[3];
951
946
  if (darwin_macosx_version_min[4] != '\0')
952
  result[outputindex++] = darwin_macosx_version_min[inputindex++];
953
954
  if (ISDIGIT (darwin_macosx_version_min[inputindex])) {
955
    /* Starting with OS X 10.10, the macro ends '00' rather than '0',
956
       i.e. 10.10.x becomes 101000 rather than 10100.  */
957
    result[outputindex++] = darwin_macosx_version_min[inputindex++];
958
    result[4] = '0';
959
    result[5] = '0';
960
    result[6] = '\0';
961
  }
962
963
  /* if we're out of input, leave patch level at 0 or 00 and finish */
964
  if (darwin_macosx_version_min[inputindex] == '\0')
965
    return result;
966
967
  /* a dot *must* follow now */
968
  if (darwin_macosx_version_min[inputindex++] != '.')
969
     goto fail;
970
971
  /* a digit must follow after the dot */
972
  if (! ISDIGIT (darwin_macosx_version_min[inputindex]))
973
     goto fail;
974
975
  /* old-style macro */
976
  if (outputindex == 3)
977
  {
978
    /* one-digit patch level */
979
    if (darwin_macosx_version_min[inputindex + 1] == '\0')
947
    {
980
    {
948
      if (darwin_macosx_version_min[4] != '.')
981
      result[outputindex] = darwin_macosx_version_min[inputindex];
949
	goto fail;
982
      return result;
950
      if (! ISDIGIT (darwin_macosx_version_min[5]))
951
	goto fail;
952
      if (darwin_macosx_version_min[6] != '\0')
953
	goto fail;
954
      result[3] = darwin_macosx_version_min[5];
955
    }
983
    }
956
  else
984
957
    result[3] = '0';
985
    inputindex++;
986
    if (! ISDIGIT (darwin_macosx_version_min[inputindex++]))
987
      goto fail;
988
989
    /* three digits? */
990
    if (darwin_macosx_version_min[inputindex] != '\0')
991
      goto fail;
992
993
    /* no room for another digit. Traditional Apple GCC 4.2.1 doesn't accept
994
     * it but current clang caps it to 9. We choose to be in line with clang. */
995
    result[outputindex] = '9';
996
    return result;
997
  }
998
999
  /* new-style macro */
1000
1001
  /* leave a leading zero if only one digit is following */
1002
  if (darwin_macosx_version_min[inputindex + 1] == '\0') {
1003
    result[outputindex + 1] = darwin_macosx_version_min[inputindex];
1004
    return result;
1005
  }
1006
1007
  result[outputindex++] = darwin_macosx_version_min[inputindex++];
1008
1009
  /* a digit must follow now */
1010
  if (! ISDIGIT (darwin_macosx_version_min[inputindex]))
1011
     goto fail;
1012
1013
  result[outputindex] = darwin_macosx_version_min[inputindex++];
1014
1015
  /* no more input allowed */
1016
  if (darwin_macosx_version_min[inputindex] != '\0')
1017
    goto fail;
958
1018
959
  return result;
1019
  return result;
960
1020

Return to bug 537826