File tree Expand file tree Collapse file tree 7 files changed +38
-3
lines changed
src/etc/mingw-fix-include Expand file tree Collapse file tree 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
2828
2929$$(LLVM_CONFIG_$(1 ) ) : $$(LLVM_DEPS ) $$(LLVM_STAMP_$(1 ) )
3030 @$$(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 ) )
3232 $$(Q ) touch $$(LLVM_CONFIG_$(1 ) )
3333endif
3434
Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ AR_i686-pc-mingw32=$(AR)
352352CFG_LIB_NAME_i686-pc-mingw32 =$(1 ) .dll
353353CFG_LIB_GLOB_i686-pc-mingw32 =$(1 ) -*.dll
354354CFG_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
356356CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
357357CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
358358CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
@@ -361,6 +361,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
361361CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
362362CFG_INSTALL_NAME_i686-pc-mingw32 =
363363CFG_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
364365CFG_EXE_SUFFIX_i686-pc-mingw32 := .exe
365366CFG_WINDOWSY_i686-pc-mingw32 := 1
366367CFG_UNIXY_i686-pc-mingw32 :=
Original file line number Diff line number Diff line change 2424# working under these assumptions).
2525
2626# 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
2828LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929ifeq ($(OSTYPE_$(1 ) ) , linux-androideabi)
3030LIBUV_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