https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835

            Bug ID: 90835
           Summary: Incompatibilities with macOS 10.15 headers
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: iains at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-apple-darwin19
            Target: x86_64-apple-darwin19
             Build: x86_64-apple-darwin19

Once the issues from PR target/90834 are worked around or fixed, there remain
a couple of bugs in the macOS 10.15/Xcode 11 headers that make them
incompatible
with gcc, breaking the gcc build.

While I mean to report them to Apple, I'm reporting them here either for others
who want to try the same build or in case they aren't fixed upstream in time.

* <Availability.h> lacks fallback definitions of __OSX_AVAILABLE_STARTING and
  friends if the availability attribute isn't supported (as in gcc, unlike
clang).

* <AvailabilityInternal.h> unconditionally uses __has_builtin.  Besides, the
  fixes for lack of the availability attribute in __API_[ADU] are still needed.
  Probably nobody reported them upstream, or perhaps Apple decided to ignore
the
  report?

* <mach-o/dyld.h> unconditionally uses the availability attribute.  Just
commenting
  those uses as I've done is a hack; probably there another weird macro in
  <Availability*.h> that's cleaner here.

* <TargetConditionals.h> unconditionally uses __has_builtin.

With those patches, I managed to complete a mainline bootstrap on Darwin 19; 
make check still running.

Reply via email to