openwrt-mirror/toolchain
Georgi Valkov dfb8115d0c toolchain: gdb: fix build error with Xcode 16.3
Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 14:38:34 +02:00
..
binutils toolchain/binutils: remove old versions 2024-10-12 22:12:39 +02:00
fortify-headers toolchain/fortify-headers: update download url 2024-09-14 13:55:15 +02:00
gcc toolchain: gcc: drop 110-Fix-MIPS-PR-84790.patch 2024-09-17 21:43:32 +08:00
gdb toolchain: gdb: fix build error with Xcode 16.3 2025-04-16 14:38:34 +02:00
glibc toolchain: glibc: Update glibc 2.38 to recent HEAD 2024-05-04 20:03:47 +02:00
kernel-headers toolchain: assign PKG_CPE_ID 2023-09-19 20:22:59 +02:00
mold toolchain: add mold as additional linker 2023-07-04 20:25:41 +02:00
musl toolchain/musl: add support for renameat2() 2024-06-13 14:16:32 +02:00
nasm toolchain/nasm: update to 2.16.03 2024-09-22 19:06:22 +02:00
wrapper toolchain/wrapper: fill and reference info.mk in staging_dir ext toolchain 2024-04-21 17:59:17 +02:00
build_version toolchain: add a version that can be bumped to force toolchain/target rebuild 2021-11-16 22:02:45 +01:00
Config.in build: conditionally build llvm bpf toolchain by default 2025-02-07 11:16:08 +01:00
info.mk uClibc cleanup: - use full version string (0.9.30.1), instead of base (0.9.30) + extra (.1) - remove support for 0.9.28 and snapshots (building from SVN to be added later) 2009-04-24 02:07:24 +00:00
Makefile toolchain: add mold as additional linker 2023-07-04 20:25:41 +02:00