1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-23 06:08:56 +03:00

Upgrade to u-config 0.35.0

Download the release instead of vendoring the amalgamated pkg-config.c,
and generate the amalgamation with its makefile. Also install its
manual page, and point make2compdb.c's credits at u-config itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Christopher Wellons
2026-10-20 06:33:26 -04:00
parent b5d325d774
commit c63edeff8f
3 changed files with 33 additions and 2909 deletions

View File

@@ -153,6 +153,15 @@ ADD --checksum=sha256:$QUILT_SHA256 \
RUN mkdir quilt \
&& tar xzf quilt-$QUILT_VERSION.tar.gz -C quilt --strip-components=1
FROM base AS dl-u-config
ARG U_CONFIG_VERSION=0.35.0 \
U_CONFIG_SHA256=2e42eb04ae1a5c6a3b02f9d7ef126895e24e35825b0d2690345806b21205d250
WORKDIR /dl
ADD --checksum=sha256:$U_CONFIG_SHA256 \
https://github.com/skeeto/u-config/releases/download/v$U_CONFIG_VERSION/u-config-$U_CONFIG_VERSION.tar.gz ./
RUN mkdir u-config \
&& tar xzf u-config-$U_CONFIG_VERSION.tar.gz -C u-config --strip-components=1
FROM base AS dl-ccache
ARG CCACHE_VERSION=4.14.1 \
CCACHE_SHA256=29f10de481ac2c41c91bfabead63d803bd2fe823e09752aade5b0b8704cc4f30 \
@@ -679,6 +688,22 @@ RUN mkdir -p /out/bin \
&& $ARCH-g++ -std=c++20 -O2 -fno-exceptions -s \
-o /out/bin/quilt.exe /out/src/quilt.cpp
FROM cross AS build-u-config
COPY --from=dl-u-config /dl/ /dl/
WORKDIR /dl/u-config
RUN make amalgamation \
&& mkdir -p /out/bin /out/src /out/share/man/man1 \
&& cp pkg-config.c /out/src/ \
&& cp u-config.1 /out/share/man/man1/ \
&& $ARCH-gcc \
-Oz -fno-asynchronous-unwind-tables -fno-builtin -Wl,--gc-sections \
-s -nostdlib -o /out/bin/pkg-config.exe /out/src/pkg-config.c \
-lkernel32 \
&& $ARCH-gcc -DEXE=pkg-config.exe -DCMD=pkg-config \
-Oz -fno-asynchronous-unwind-tables -Wl,--gc-sections -s -nostdlib \
-o /out/bin/$ARCH-pkg-config.exe $PREFIX/src/alias.c -lkernel32
# Build PDCurses once and reuse it for both gdb and ccmake.
FROM cross AS build-pdcurses
COPY --from=dl-pdcurses /dl/pdcurses /dl/pdcurses
@@ -1116,6 +1141,7 @@ COPY --from=dl-ctags /dl/*.* /source/
COPY --from=dl-zstd /dl/*.* /source/
COPY --from=dl-tugz /dl/*.* /source/
COPY --from=dl-quilt /dl/*.* /source/
COPY --from=dl-u-config /dl/*.* /source/
COPY --from=dl-ccache /dl/*.* /source/
COPY --from=dl-ninja /dl/*.* /source/
COPY --from=dl-cmake /dl/*.* /source/
@@ -1131,6 +1157,7 @@ ARG VERSION
COPY --from=build-gendef /out/ $PREFIX/
COPY --from=build-quilt /out/ $PREFIX/
COPY --from=build-u-config /out/ $PREFIX/
COPY --from=build-gdb /out/ $PREFIX/
COPY --from=build-make /out/ $PREFIX/
COPY --from=build-busybox /out/ $PREFIX/
@@ -1162,10 +1189,6 @@ RUN printf "id ICON \"$PREFIX/src/w64devkit.ico\"" >w64devkit.rc \
-Wl,--gc-sections -s -nostdlib \
-o $PREFIX/bin/debugbreak.exe $PREFIX/src/debugbreak.c \
-lkernel32 \
&& $ARCH-gcc \
-Oz -fno-asynchronous-unwind-tables -fno-builtin -Wl,--gc-sections \
-s -nostdlib -o $PREFIX/bin/pkg-config.exe $PREFIX/src/pkg-config.c \
-lkernel32 \
&& $ARCH-gcc \
-O2 -fno-asynchronous-unwind-tables -fno-builtin -Wl,--gc-sections \
-s -nostdlib -o $PREFIX/bin/vc++filt.exe $PREFIX/src/vc++filt.c \
@@ -1178,9 +1201,6 @@ RUN printf "id ICON \"$PREFIX/src/w64devkit.ico\"" >w64devkit.rc \
-Oz -fno-asynchronous-unwind-tables -fno-builtin -Wl,--gc-sections \
-s -nostdlib -o $PREFIX/bin/recycle.exe $PREFIX/src/recycle.c \
-lkernel32 -lshell32 -lmemory \
&& $ARCH-gcc -DEXE=pkg-config.exe -DCMD=pkg-config \
-Oz -fno-asynchronous-unwind-tables -Wl,--gc-sections -s -nostdlib \
-o $PREFIX/bin/$ARCH-pkg-config.exe $PREFIX/src/alias.c -lkernel32 \
&& $ARCH-gcc -DEXE=../share/nsis/bin/makensis.exe -DCMD=makensis \
-Oz -fno-asynchronous-unwind-tables -Wl,--gc-sections -s -nostdlib \
-o $PREFIX/bin/makensis.exe $PREFIX/src/alias.c -lkernel32 \

View File

@@ -208,9 +208,9 @@ static Arena arena_init(isize capacity, byte memory[static capacity])
return a;
}
// Modified from Christopher Wellons pkg-config.c [1]
// Modified from Christopher Wellons u-config [1]
//
// [1] https://github.com/skeeto/w64devkit/blob/master/src/pkg-config.c
// [1] https://github.com/skeeto/u-config/blob/master/src/u-config.c
// Licence: The Unlicense
static byte *arena_alloc(Arena *a, isize count, isize size, isize align)
{
@@ -629,9 +629,9 @@ static Str_Pair str_reverse_cut_any(Str s, Str char_list)
}
}
// Taken from Christopher Wellons pkg-config.c [1]
// Taken from Christopher Wellons u-config [1]
//
// [1] https://github.com/skeeto/w64devkit/blob/master/src/pkg-config.c
// [1] https://github.com/skeeto/u-config/blob/master/src/u-config.c
// Licence: Unlicense
static u32 str_hash(Str s)
{
@@ -4088,9 +4088,9 @@ static Str16 str16_drop_head(Str16 s, isize offset_from_the_start)
// :: Unicode
// Unicode operations
// Modified from Christopher Wellons pkg-config.c [1]
// Modified from Christopher Wellons u-config [1]
//
// [1] https://github.com/skeeto/w64devkit/blob/master/src/pkg-config.c
// [1] https://github.com/skeeto/u-config/blob/master/main_windows.c
// Licence: Unlicense
enum : u32 {
// U+FFFD (<28>) is used to replace an unknown, unrecognised, or unrepresentable character.

File diff suppressed because it is too large Load Diff