Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
d42eeec3
Commit
d42eeec3
authored
May 21, 2009
by
Simon Marlow
Browse files
Fix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES
parent
ad9ca094
Changes
3
Hide whitespace changes
Inline
Side-by-side
mk/config.mk.in
View file @
d42eeec3
...
...
@@ -777,6 +777,16 @@ LD_X = @LdXFlag@
# overflowing command-line length limits.
LdIsGNULd
=
@LdIsGNULd@
# On MSYS, building with SplitObjs=YES fails with
# ar: Bad file number
# see #3201. We need to specify a smaller max command-line size
# to work around it. 32767 doesn't work; 30000 does.
ifeq
"$(Windows)" "YES"
XARGS
=
xargs
-s
30000
else
XARGS
=
xargs
endif
#
# In emergency situations, REAL_SHELL is used to perform shell commands
# from within the ghc driver script, by scribbling the command line to
...
...
rts/ghc.mk
View file @
d42eeec3
...
...
@@ -160,7 +160,7 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) rts/libs.depend
else
$$(rts_$1_LIB)
:
$$(rts_$1_OBJS)
$
$(RM)
$$
@
echo
$$
(
rts_
$1_OBJS
)
|
xargs
$
$(AR)
$
$(EXTRA_AR_ARGS)
$$
@
echo
$$
(
rts_
$1_OBJS
)
|
$
$(XARGS)
$
$(AR)
$
$(EXTRA_AR_ARGS)
$$
@
endif
endef
...
...
rules/build-package-way.mk
View file @
d42eeec3
...
...
@@ -52,11 +52,11 @@ else
ifeq
"$$($1_$2_SplitObjs)" "YES"
$$($1_$2_$3_LIB)
:
$$($1_$2_$3_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS)
$
$(RM)
$$
@
(
echo
$$
(
$1_$2_v_C_OBJS
)
$$
(
$1_$2_v_S_OBJS
)
`
$$
(
$1_$2_$3_MKSTUBOBJS
)
`
;
find
$
$(
patsubst
%.
$$
(
$3_osuf
)
,%_split,
$$
(
$1_$2_$3_HS_OBJS
))
-name
'*.$$($3_osuf)'
-print
)
|
xargs
$
$(AR)
$
$(EXTRA_AR_ARGS)
$$
@
(
echo
$$
(
$1_$2_v_C_OBJS
)
$$
(
$1_$2_v_S_OBJS
)
`
$$
(
$1_$2_$3_MKSTUBOBJS
)
`
;
find
$
$(
patsubst
%.
$$
(
$3_osuf
)
,%_split,
$$
(
$1_$2_$3_HS_OBJS
))
-name
'*.$$($3_osuf)'
-print
)
|
$
$(XARGS)
$
$(AR)
$
$(EXTRA_AR_ARGS)
$$
@
||
$(RM)
$$
@
else
$$($1_$2_$3_LIB)
:
$$($1_$2_$3_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS)
$
$(RM)
$$
@
echo
$$
(
$1_$2_v_C_OBJS
)
$$
(
$1_$2_v_S_OBJS
)
$$
(
$1_$2_$3_HS_OBJS
)
`
$$
(
$1_$2_$3_MKSTUBOBJS
)
`
|
xargs
$
$(AR)
$
$(EXTRA_AR_ARGS)
$$
@
echo
$$
(
$1_$2_v_C_OBJS
)
$$
(
$1_$2_v_S_OBJS
)
$$
(
$1_$2_$3_HS_OBJS
)
`
$$
(
$1_$2_$3_MKSTUBOBJS
)
`
|
$
$(XARGS)
$
$(AR)
$
$(EXTRA_AR_ARGS)
$$
@
||
$(RM)
$$
@
endif
endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment