在 2026-1-20 15:56, LIU Hao 写道:
This series of patches allow building the CRT (without tests or anything else) without installing headers first, and finally remove 'mingw-w64-headers/defaults' as done in f183d3b82fbf17ca0ec8ea7fdaee3d82f03b66ec.
Forgot the attachments. `AC_PROG_SED` is now unused, so it may be removed. This series comprises 5 patches. -- Best regards, LIU Hao
From 0e225e44dbd04c4e2e90ff24356fb065ec7e486f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <[email protected]> Date: Mon, 19 Jan 2026 14:48:47 +0100 Subject: [PATCH 1/6] Generate crt/sdks/_mingw_ddk.h with configure script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header `_mingw_ddk.h` is included as `sdks/_mingw_ddk.h` from `_mingw.h` and it must be available before any other target is built. Generate it using the configure script in the correct relative location to that header. Signed-off-by: Markus Mützel <[email protected]> Co-authored-by: LIU Hao <[email protected]> Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-headers/Makefile.am | 6 +----- mingw-w64-headers/configure.ac | 1 + mingw-w64-headers/crt/sdks/_mingw_ddk.h.in | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mingw-w64-headers/Makefile.am b/mingw-w64-headers/Makefile.am index 6ebeda477..2e7d8eaf8 100644 --- a/mingw-w64-headers/Makefile.am +++ b/mingw-w64-headers/Makefile.am @@ -21,8 +21,7 @@ gdiplushead_HEADERS = @GDIPLUSHEAD_LIST@ wrlhead_HEADERS = @WRLHEAD_LIST@ wrlwrappershead_HEADERS = @WRLWRAPPERSHEAD_LIST@ mingwhelperhead_HEADERS = @MINGWHELPERHEAD_LIST@ -nodist_sdkshead_HEADERS = _mingw_ddk.h -noinst_HEADERS = crt/sdks/_mingw_ddk.h.in +sdkshead_HEADERS = crt/sdks/_mingw_ddk.h ddkheaddir = $(baseheaddir)/ddk idlheaddir = $(baseheaddir) @@ -413,6 +412,3 @@ include/prsht.h: ; include/wincrypt.h: ; endif - -_mingw_ddk.h: $(srcdir)/crt/sdks/_mingw_ddk.h.in - $(SED) s/MINGW_HAS_DDK$$/@MINGW_HAS_DDK@/ $< > $@ diff --git a/mingw-w64-headers/configure.ac b/mingw-w64-headers/configure.ac index 3211fbd18..bb2d1455d 100644 --- a/mingw-w64-headers/configure.ac +++ b/mingw-w64-headers/configure.ac @@ -199,6 +199,7 @@ AC_SUBST([DEFAULT_MSVCRT_VERSION]) AC_CONFIG_FILES([ Makefile crt/_mingw.h + crt/sdks/_mingw_ddk.h ]) AC_OUTPUT diff --git a/mingw-w64-headers/crt/sdks/_mingw_ddk.h.in b/mingw-w64-headers/crt/sdks/_mingw_ddk.h.in index 0978eddeb..564e2e8ac 100644 --- a/mingw-w64-headers/crt/sdks/_mingw_ddk.h.in +++ b/mingw-w64-headers/crt/sdks/_mingw_ddk.h.in @@ -1,6 +1,6 @@ #ifndef MINGW_DDK_H #define MINGW_DDK_H -#if MINGW_HAS_DDK +#if @MINGW_HAS_DDK@ #define MINGW_HAS_DDK_H 1 #endif #endif -- 2.52.0
From 5565880a845916c0c4dd9b665068b90fb0a65ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <[email protected]> Date: Mon, 19 Jan 2026 15:08:29 +0100 Subject: [PATCH 2/6] Prefer headers in the source tree and generated headers over installed ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `-isystem` to the preprocessor flags that prefer headers in the source tree or headers the have been generated over ones that have been installed. Signed-off-by: Markus Mützel <[email protected]> Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-crt/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 74f35ea12..f3d45d05b 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -11,11 +11,13 @@ #AUTOMAKE_OPTIONS = color-tests +sysincludes = -isystem $(top_srcdir)/../mingw-w64-headers/include \ + -isystem $(top_srcdir)/../mingw-w64-headers/crt \ + -isystem $(top_builddir)/../mingw-w64-headers/crt if WITHSYSROOT - sysincludes="-I@TARGET_SYSTEM_ROOT@/include" + sysincludes+="-isystem @TARGET_SYSTEM_ROOT@/include" withsys="--with-sysroot=@TARGET_SYSTEM_ROOT@" else - sysincludes= withsys= endif -- 2.52.0
From 799e8caab6ffe8b4b184fbd7b8dc56f1b95e0e94 Mon Sep 17 00:00:00 2001 From: LIU Hao <[email protected]> Date: Tue, 20 Jan 2026 15:58:08 +0800 Subject: [PATCH 3/6] headers: Remove unused `AC_PROG_SED` Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-headers/configure.ac | 3 --- 1 file changed, 3 deletions(-) diff --git a/mingw-w64-headers/configure.ac b/mingw-w64-headers/configure.ac index bb2d1455d..06b50971d 100644 --- a/mingw-w64-headers/configure.ac +++ b/mingw-w64-headers/configure.ac @@ -12,9 +12,6 @@ AM_MAINTAINER_MODE AC_CANONICAL_HOST -# Checks for programs. -AC_PROG_SED - # Search for a usable widl. If PATH is given, search there. Otherwise, search # in $PATH. In all cases, search for a canonicalized name first ($host-widl), # followed by a non-canonicalized name (widl). If these fail, error out. -- 2.52.0
From ebe2d5b11d926c5cef07c02b5c791b12740097fe Mon Sep 17 00:00:00 2001 From: LIU Hao <[email protected]> Date: Tue, 20 Jan 2026 13:38:55 +0800 Subject: [PATCH 4/6] headers: Remove obsolete 'defaults' directory Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-headers/defaults/generate.sh | 3 --- mingw-w64-headers/defaults/include/sdks/_mingw_ddk.h | 6 ------ 2 files changed, 9 deletions(-) delete mode 100755 mingw-w64-headers/defaults/generate.sh delete mode 100644 mingw-w64-headers/defaults/include/sdks/_mingw_ddk.h diff --git a/mingw-w64-headers/defaults/generate.sh b/mingw-w64-headers/defaults/generate.sh deleted file mode 100755 index b5bd08172..000000000 --- a/mingw-w64-headers/defaults/generate.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -sed s/@MINGW_HAS_DDK@/0/ crt/sdks/_mingw_ddk.h.in > defaults/include/sdks/_mingw_ddk.h diff --git a/mingw-w64-headers/defaults/include/sdks/_mingw_ddk.h b/mingw-w64-headers/defaults/include/sdks/_mingw_ddk.h deleted file mode 100644 index 93b2742b2..000000000 --- a/mingw-w64-headers/defaults/include/sdks/_mingw_ddk.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MINGW_DDK_H -#define MINGW_DDK_H -#if 0 -#define MINGW_HAS_DDK_H 1 -#endif -#endif -- 2.52.0
From fc194bd61519c059b536326e1ab117806f718f0c Mon Sep 17 00:00:00 2001 From: LIU Hao <[email protected]> Date: Tue, 20 Jan 2026 13:54:25 +0800 Subject: [PATCH 5/6] headers: Update .gitignore Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-headers/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-headers/.gitignore b/mingw-w64-headers/.gitignore index 17ad3be81..552b80e21 100644 --- a/mingw-w64-headers/.gitignore +++ b/mingw-w64-headers/.gitignore @@ -1,2 +1,2 @@ -_mingw_ddk.h +crt/sdks/_mingw_ddk.h crt/_mingw.h -- 2.52.0
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
