1 diff --git a/Makefile.in b/Makefile.in
2 index a375471..83c5ecb 100644
5 @@ -804,7 +804,7 @@ BASE_FLAGS_TO_PASS = \
6 "STAGE1_LANGUAGES=$(STAGE1_LANGUAGES)" \
7 "GNATBIND=$(GNATBIND)" \
8 "GNATMAKE=$(GNATMAKE)" \
10 + "`echo 'GDC=$(GDC)' | sed -e 's/-idirafter [^ ]*//g'`" \
11 "GDCFLAGS=$(GDCFLAGS)" \
12 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
13 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
14 @@ -817,7 +817,7 @@ BASE_FLAGS_TO_PASS = \
15 "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
16 "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
17 "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
18 - "GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
19 + "`echo 'GDC_FOR_TARGET=$(GDC_FOR_TARGET)' | sed -e 's/-idirafter [^ ]*//g'`" \
20 "GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \
21 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
22 "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
23 @@ -890,7 +890,7 @@ EXTRA_HOST_FLAGS = \
24 'DLLTOOL=$(DLLTOOL)' \
25 'GFORTRAN=$(GFORTRAN)' \
28 + "`echo 'GDC=$(GDC)' | sed -e 's/-idirafter [^ ]*//g'`" \
32 @@ -966,8 +966,11 @@ EXTRA_TARGET_FLAGS = \
33 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
34 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
36 +EXTRA_TARGET_FLAGS_D = \
37 + "`echo $(EXTRA_TARGET_FLAGS) | sed -e 's/-idirafter [^ ]*//g'`"
39 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
40 +TARGET_FLAGS_TO_PASS_D = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS_D)
42 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
43 # unfortunately needs the native compiler and the target ar and
44 @@ -47285,7 +47288,7 @@ check-target-libphobos:
45 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
46 $(NORMAL_TARGET_EXPORTS) \
47 (cd $(TARGET_SUBDIR)/libphobos && \
48 - $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
49 + $(MAKE) $(TARGET_FLAGS_TO_PASS_D) check)
51 @endif target-libphobos
53 @@ -47300,7 +47303,7 @@ install-target-libphobos: installdirs
54 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
55 $(NORMAL_TARGET_EXPORTS) \
56 (cd $(TARGET_SUBDIR)/libphobos && \
57 - $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
58 + $(MAKE) $(TARGET_FLAGS_TO_PASS_D) install)
60 @endif target-libphobos
62 @@ -47315,7 +47318,7 @@ install-strip-target-libphobos: installdirs
63 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
64 $(NORMAL_TARGET_EXPORTS) \
65 (cd $(TARGET_SUBDIR)/libphobos && \
66 - $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
67 + $(MAKE) $(TARGET_FLAGS_TO_PASS_D) install-strip)
69 @endif target-libphobos
71 diff --git a/Makefile.tpl b/Makefile.tpl
72 index 41cae58..b3d32e7 100644
75 @@ -721,8 +721,11 @@ EXTRA_TARGET_FLAGS = \
76 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
77 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
79 +EXTRA_TARGET_FLAGS_D = \
80 + "`echo $(EXTRA_TARGET_FLAGS) | sed -e 's/-idirafter [^ ]*//g'`"
82 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
83 +TARGET_FLAGS_TO_PASS_D = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS_D)
85 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
86 # unfortunately needs the native compiler and the target ar and
87 diff --git a/libphobos/Makefile.in b/libphobos/Makefile.in
88 index e894417..2d18dcb 100644
89 --- a/libphobos/Makefile.in
90 +++ b/libphobos/Makefile.in
91 @@ -365,6 +365,7 @@ AM_MAKEFLAGS = \
92 "LIBCFLAGS=$(LIBCFLAGS)" \
93 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
95 + "`echo 'MAKEFLAGS=$(MAKEFLAGS)' | sed -e 's/-j[0-9]+/-j1/'`" \
96 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
97 "PICFLAG=$(PICFLAG)" \
98 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
99 @@ -694,6 +695,8 @@ uninstall-am:
105 # GNU Make needs to see an explicit $(MAKE) variable in the command it
106 # runs to enable its job server during parallel builds. Hence the
108 diff --git a/libphobos/configure b/libphobos/configure
109 index b3cb5f3..25adf2b 100755
110 --- a/libphobos/configure
111 +++ b/libphobos/configure
112 @@ -5122,6 +5122,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
116 +GDC=`$as_echo "$GDC" | sed -e 's/-idirafter [^ ]*//g'`
119 ac_compile='$GDC -c $GDCFLAGS conftest.$ac_ext >&5'