Skip to content

Commit

Permalink
[cctools] don't include objc-runtime.h in print_objc.c and print_bitc…
Browse files Browse the repository at this point in the history
…ode.c.

On macOS 13, Gentoo Prefix fails to compile cctools due to
missing Blocks support in GCC, creating the following error:

/Users/ec2-user/gentoo/MacOSX.sdk/usr/include/objc/runtime.h:373:29: error: expected ')' before '^' token
  373 |                       void (^ _Nonnull block)(Class _Nonnull aClass, BOOL * _Nonnull stop)
      |                             ^
      |                             )

Fortunately the header objc-runtime.h is not strictly necessary.
As a workaround, stop including objc-runtime.h in print_objc.c
and print_bitcode.c.

Signed-off-by: Yifeng Li <tomli@tomli.me>
  • Loading branch information
biergaizi committed Apr 24, 2023
1 parent 3127e33 commit 58967cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion cctools/otool/print_bitcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <dlfcn.h>
#include <xar/xar.h>
#include "mach-o/loader.h"
#include "objc/objc-runtime.h"
#include "stuff/allocate.h"
#include "stuff/bytesex.h"
#include "stuff/symbol.h"
Expand Down
1 change: 0 additions & 1 deletion cctools/otool/print_objc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "stdio.h"
#include "string.h"
#include "mach-o/loader.h"
#include "objc/objc-runtime.h"
#include "stuff/allocate.h"
#include "stuff/bytesex.h"
#include "stuff/symbol.h"
Expand Down

0 comments on commit 58967cf

Please sign in to comment.