File tree 7 files changed +38
-3
lines changed
src/etc/mingw-fix-include
7 files changed +38
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
28
28
29
29
$$(LLVM_CONFIG_$(1 ) ) : $$(LLVM_DEPS ) $$(LLVM_STAMP_$(1 ) )
30
30
@$$(call E, make: llvm)
31
- $$(Q )$$(MAKE ) -C $$(CFG_LLVM_BUILD_DIR_$(1 ) ) $$(CFG_LLVM_BUILD_ENV )
31
+ $$(Q )$$(MAKE ) -C $$(CFG_LLVM_BUILD_DIR_$(1 ) ) $$(CFG_LLVM_BUILD_ENV_ $( 1 ) )
32
32
$$(Q ) touch $$(LLVM_CONFIG_$(1 ) )
33
33
endif
34
34
Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ AR_i686-pc-mingw32=$(AR)
352
352
CFG_LIB_NAME_i686-pc-mingw32 =$(1 ) .dll
353
353
CFG_LIB_GLOB_i686-pc-mingw32 =$(1 ) -*.dll
354
354
CFG_LIB_DSYM_GLOB_i686-pc-mingw32 =$(1 ) -*.dylib.dSYM
355
- CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600
355
+ CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I $( CFG_SRC_DIR ) src/etc/mingw-fix-include
356
356
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
357
357
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
358
358
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
@@ -361,6 +361,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
361
361
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
362
362
CFG_INSTALL_NAME_i686-pc-mingw32 =
363
363
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi
364
+ CFG_LLVM_BUILD_ENV_i686-pc-mingw32 := CPATH=$(CFG_SRC_DIR ) src/etc/mingw-fix-include
364
365
CFG_EXE_SUFFIX_i686-pc-mingw32 := .exe
365
366
CFG_WINDOWSY_i686-pc-mingw32 := 1
366
367
CFG_UNIXY_i686-pc-mingw32 :=
Original file line number Diff line number Diff line change 24
24
# working under these assumptions).
25
25
26
26
# Hack for passing flags into LIBUV, see below.
27
- LIBUV_FLAGS_i386 = -m32 -fPIC
27
+ LIBUV_FLAGS_i386 = -m32 -fPIC -I $( S ) src/etc/mingw-fix-include
28
28
LIBUV_FLAGS_x86_64 = -m64 -fPIC
29
29
ifeq ($(OSTYPE_$(1 ) ) , linux-androideabi)
30
30
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
Original file line number Diff line number Diff line change
1
+ The purpose of these headers is to fix issues with mingw v4.0, as described in #9246.
2
+
3
+ This works by adding this directory to GCC include search path before mingw system headers directories,
4
+ so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
5
+
6
+ Once mingw fixes all 3 issues mentioned in #9246, this directory and all references to it from rust/mk/* may be removed.
Original file line number Diff line number Diff line change
1
+ #ifndef _FIX_CXXCONFIG_H
2
+ #define _FIX_CXXCONFIG_H 1
3
+
4
+ #define _GLIBCXX_HAVE_FENV_H 1
5
+
6
+ #include_next <bits/c++config.h>
7
+
8
+ #endif
Original file line number Diff line number Diff line change
1
+ #ifndef _FIX_WINBASE_H
2
+ #define _FIX_WINBASE_H 1
3
+
4
+ #define NTDDK_VERSION NTDDI_VERSION
5
+
6
+ #include_next <winbase.h>
7
+
8
+ #endif
Original file line number Diff line number Diff line change
1
+ #ifndef _FIX_WINSOCK2_H
2
+ #define _FIX_WINSOCK2_H 1
3
+
4
+ #include_next <winsock2.h>
5
+
6
+ typedef struct pollfd {
7
+ SOCKET fd ;
8
+ short events ;
9
+ short revents ;
10
+ } WSAPOLLFD , * PWSAPOLLFD , * LPWSAPOLLFD ;
11
+
12
+ #endif
You can’t perform that action at this time.
0 commit comments