Skip to content

Commit 911b77d

Browse files
eschnettgiordano
authored andcommitted
GCC 14: Update cctools
1 parent 295c7f5 commit 911b77d

File tree

2 files changed

+56
-8
lines changed

2 files changed

+56
-8
lines changed

0_RootFS/gcc_common.jl

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,10 @@ function gcc_script(compiler_target::Platform)
194194
done
195195
fi
196196
197+
# Install libtapi
197198
mkdir -p ${WORKSPACE}/srcdir/apple-libtapi/build
198199
cd ${WORKSPACE}/srcdir/apple-libtapi/build
199-
200200
export TAPIDIR=${WORKSPACE}/srcdir/apple-libtapi
201-
202-
# Install libtapi
203201
cmake ../src/llvm \
204202
-DCMAKE_CXX_FLAGS="-I${TAPIDIR}/src/llvm/projects/clang/include -I${TAPIDIR}/build/projects/clang/include" \
205203
-DLLVM_INCLUDE_TESTS=OFF \
@@ -210,14 +208,55 @@ function gcc_script(compiler_target::Platform)
210208
make install
211209
212210
# Install cctools
211+
cd ${WORKSPACE}/srcdir/cctools-port/cctools
212+
./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 \
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
249+
250+
${WORKSPACE}/srcdir/cctools-port/cctools/configure \
216251
--prefix=${prefix} \
217252
--target=${COMPILER_TARGET} \
218253
--host=${MACHTYPE} \
219-
--with-libtapi=${prefix}
220-
make -j${nproc}
254+
CC=/usr/bin/clang \
255+
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
221260
make install
222261
223262
# Otherwise, we need to install binutils first
@@ -367,7 +406,10 @@ function gcc_script(compiler_target::Platform)
367406
# modern version of C, too modern for the old glibc libraries we are
368407
# trying to build. Various configure tests would fail otherwise. (Why
369408
# declare variables or functions if they default to int anyway?)
370-
GLIBC_CFLAGS="${CFLAGS} -g -O2 -Wno-implicit-int -Wno-implicit-function-declaration -Wno-builtin-declaration-mismatch -Wno-array-parameter"
409+
GLIBC_CFLAGS="${CFLAGS} -g -O2"
410+
if test -d ${WORKSPACE}/srcdir/gcc-14*; then
411+
GLIBC_CFLAGS="${GLIBC_CFLAGS} -Wno-implicit-int -Wno-implicit-function-declaration -Wno-builtin-declaration-mismatch -Wno-array-parameter -Wno-int-conversion"
412+
fi
371413
372414
373415
# Configure glibc

0_RootFS/gcc_sources.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,14 @@ function gcc_sources(gcc_version::VersionNumber, compiler_target::Platform; kwar
170170
binutils_sources = [
171171
GitSource("https://github.com/tpoechtrager/apple-libtapi.git",
172172
"a66284251b46d591ee4a0cb4cf561b92a0c138d8"),
173+
# GitSource("https://github.com/tpoechtrager/cctools-port.git",
174+
# "634a084377ee2e2932c66459b0396edf76da2e9f"),
175+
# # 1300.6.5; API: 1.6.0
176+
# GitSource("https://github.com/tpoechtrager/apple-libtapi.git",
177+
# "aa37c11ad1a817248c9d1578ac99e133875b4eb5"),
178+
# cctools-877.8-ld64-253.9-1
173179
GitSource("https://github.com/tpoechtrager/cctools-port.git",
174-
"634a084377ee2e2932c66459b0396edf76da2e9f"),
180+
"2f128d5d369b688f7a3e872254c2079b87733c0a"),
175181
]
176182
else
177183
# Different versions of GCC should be paired with different versions of Binutils

0 commit comments

Comments
 (0)