Skip to content

Commit a04c842

Browse files
patch 5
1 parent 6334bf1 commit a04c842

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

depends/packages/native_cctools.mk

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ endef
3333
define $(package)_set_vars
3434
$(package)_config_opts=--target=$(host) --disable-lto-support
3535
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
36+
37+
# default (non-darwin) – keep original behaviour
3638
$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang
3739
$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++
3840
endef
@@ -65,17 +67,18 @@ define $(package)_stage_cmds
6567
endef
6668

6769
# ============================================================
68-
# macOS-only overrides (safe, does NOT affect other platforms)
70+
# macOS toolchain build: override compiler for *this* package
71+
# Only hits HOST = x86_64-apple-darwin11, leaves Linux/Win alone
6972
# ============================================================
7073
ifeq ($(host_os),darwin)
7174

72-
# Force REAL CC and CXX used by configure
73-
CC=$(build_prefix)/native/bin/clang
74-
CXX=$(build_prefix)/native/bin/clang++
75+
# Use system GCC/G++ on the Linux runner to build cctools itself
76+
$(package)_cc=gcc
77+
$(package)_cxx=g++
7578

76-
# Prevent ld64 / clang warnings from breaking the build
77-
CFLAGS+= -Wno-unused-command-line-argument
78-
CXXFLAGS+= -Wno-unused-command-line-argument
79-
LDFLAGS+= -Wno-unused-command-line-argument
79+
# (Optional) keep warning noise down
80+
$(package)_cflags+= -Wno-unused-command-line-argument
81+
$(package)_cxxflags+= -Wno-unused-command-line-argument
82+
$(package)_ldflags+= -Wno-unused-command-line-argument
8083

8184
endif

0 commit comments

Comments
 (0)