Skip to content

Commit 7efd742

Browse files
committed
[GCC 14] Fix building newer cctools
1 parent 911b77d commit 7efd742

File tree

2 files changed

+7
-39
lines changed

2 files changed

+7
-39
lines changed

0_RootFS/gcc_common.jl

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -212,51 +212,19 @@ function gcc_script(compiler_target::Platform)
212212
./autogen.sh
213213
mkdir -p ${WORKSPACE}/srcdir/cctools_build
214214
cd ${WORKSPACE}/srcdir/cctools_build
215-
# CC=/usr/bin/clang CXX=/usr/bin/clang++ LDFLAGS=-L/usr/lib ${WORKSPACE}/srcdir/cctools-port/cctools/configure \
216-
# --prefix=${prefix} \
217-
# --target=${COMPILER_TARGET} \
218-
# --host=${MACHTYPE} \
219-
# --with-libtapi=${prefix}
220-
221-
# Does not work:
222-
# CFLAGS="-isysroot ${sysroot}"
223-
# CXXFLAGS="-isysroot ${sysroot}"
224-
# CPPFLAGS="-isystem ${sysroot}/usr/include"
225-
# CPPFLAGS="-isystem /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include"
226-
# CPPFLAGS="-isystem /workspace/x86_64-apple-darwin14/destdir/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Kernel.framework/Versions/A/Headers"
227-
228-
# $sysroot:
229-
# /workspace/destdir/x86_64-apple-darwin14/sys-root
230-
# find:
231-
# /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/sys/cdefs.h
232-
# /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/cdefs.h
233-
# /workspace/srcdir/cctools-port/cctools/include/sys/cdefs.h
234-
# /workspace/srcdir/gcc-14.2.0/fixincludes/tests/base/sys/cdefs.h
235-
# /workspace/srcdir/MacOSX10.12.sdk/usr/include/sys/cdefs.h
236-
# /workspace/srcdir/MacOSX10.12.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/cdefs.h
237-
# /workspace/x86_64-apple-darwin14/destdir/x86_64-apple-darwin14/sys-root/usr/include/sys/cdefs.h
238-
# /workspace/x86_64-apple-darwin14/destdir/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/cdefs.h
239-
240-
# find / -name cdefs.h >CDEFS-LOCS
241-
# /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/sys/cdefs.h
242-
# /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/cdefs.h
243-
# /workspace/srcdir/cctools-port/cctools/include/sys/cdefs.h
244-
# /workspace/srcdir/gcc-14.2.0/fixincludes/tests/base/sys/cdefs.h
245-
# /workspace/srcdir/MacOSX10.12.sdk/usr/include/sys/cdefs.h
246-
# /workspace/srcdir/MacOSX10.12.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/cdefs.h
247-
# /workspace/x86_64-apple-darwin14/destdir/x86_64-apple-darwin14/sys-root/usr/include/sys/cdefs.h
248-
# /workspace/x86_64-apple-darwin14/destdir/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/cdefs.h
215+
216+
# TODO: Update RootFS to v3.17 or later, and preinstall libdispatch (and libdispatch-dev only when building GCC 14+ for macOS).
217+
apk add libdispatch libdispatch-dev --repository=http://dl-cdn.alpinelinux.org/alpine/v3.17/community
249218
250219
${WORKSPACE}/srcdir/cctools-port/cctools/configure \
251220
--prefix=${prefix} \
252221
--target=${COMPILER_TARGET} \
253222
--host=${MACHTYPE} \
254223
CC=/usr/bin/clang \
255224
CXX=/usr/bin/clang++ \
256-
CPPFLAGS="-I/workspace/x86_64-apple-darwin14/destdir/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Kernel.framework/Versions/A/Headers" \
257-
LDFLAGS=-L/usr/lib
258-
#TODO make -j${nproc}
259-
make
225+
LDFLAGS=-L/usr/lib \
226+
--with-libtapi=${prefix}
227+
make -j${nproc}
260228
make install
261229
262230
# Otherwise, we need to install binutils first

0_RootFS/gcc_sources.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function gcc_sources(gcc_version::VersionNumber, compiler_target::Platform; kwar
177177
# "aa37c11ad1a817248c9d1578ac99e133875b4eb5"),
178178
# cctools-877.8-ld64-253.9-1
179179
GitSource("https://github.com/tpoechtrager/cctools-port.git",
180-
"2f128d5d369b688f7a3e872254c2079b87733c0a"),
180+
"81f205e8ca6bbf2fdbcb6948132454fd1f97839e"),
181181
]
182182
else
183183
# Different versions of GCC should be paired with different versions of Binutils

0 commit comments

Comments
 (0)