zlaski      02/09/19 14:02:44

  Modified:    gcc      c-common.c
  Log:
  Bug #: 2925735 MACOSX_DEPLOYMENT_TARGET woes (partial fix)
  Submitted by: zlaski
  Reviewed by: dpatel
  
  Revision  Changes    Path
  1.78      +6 -25     gcc3/gcc/c-common.c
  
  Index: c-common.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/c-common.c,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- c-common.c        2002/09/03 21:00:36     1.77
  +++ c-common.c        2002/09/19 21:02:41     1.78
  @@ -6200,32 +6200,13 @@
        int flags ATTRIBUTE_UNUSED;
        bool *no_add_attrs;
   {
  -  static int ignore_weak_import = 0;
  -
  -  if (! ignore_weak_import)
  +  /* See FIXME comment in c_common_attribute_table.  */
  +  if ((flags & (int) ATTR_FLAG_FUNCTION_DEF) == 0 && DECL_EXTERNAL (*node))
  +    DECL_WEAK_IMPORT (*node) = 1;
  +  else
       {
  -     char *deployment_target = getenv ("MACOSX_DEPLOYMENT_TARGET");
  -     
  -     if (deployment_target == NULL ||
  -         strcmp (deployment_target, "10.1") == 0)
  -       {
  -         ignore_weak_import = 1;
  -         warning ("weak_import attribute ignored when "
  -                  "MACOSX_DEPLOYMENT_TARGET environment "
  -                  "variable is set to 10.1");  
  -       }
  -    }
  -    
  -  if (!ignore_weak_import)
  -    {
  -      /* See FIXME comment in c_common_attribute_table.  */
  -      if ((flags & (int) ATTR_FLAG_FUNCTION_DEF) == 0 && DECL_EXTERNAL (*node))
  -     DECL_WEAK_IMPORT (*node) = 1;
  -      else
  -     {
  -       warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
  -       *no_add_attrs = true;
  -     }
  +      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
  +      *no_add_attrs = true;
       }
       
     return NULL_TREE;
  
  
  


Reply via email to