Skip to content

Commit 2b92db9

Browse files
committed
patch updates
1 parent 9699f1b commit 2b92db9

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

patches/patches_GNULIB_BUILD_AUX_HANDLE_DOT_A_LIBS.patch

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ index 1521987496..fa651e18a5 100644
104104
+ func_ar_run -LIST ${COLOR_MAJOR}"$archive"${COLOR_NONE}
105105
fi
106106
diff --git a/build-aux/compile b/build-aux/compile
107-
index c3e8760e96..c7e79e33fb 100644
107+
index c3e8760e96..55eb76649e 100644
108108
--- a/build-aux/compile
109109
+++ b/build-aux/compile
110110
@@ -1,5 +1,10 @@
@@ -232,15 +232,17 @@ index c3e8760e96..c7e79e33fb 100644
232232
fi
233233
}
234234

235-
@@ -132,6 +175,7 @@ func_cl_wrapper ()
235+
@@ -132,6 +175,9 @@ func_cl_wrapper ()
236236
# Assume a capable shell
237237
lib_path=
238238
shared=:
239239
+ STD_DECLARE=""
240+
+ IS_GAS_CALL=0
241+
+ GAS_OUTPUT_FILE=""
240242
linker_opts=
241243
for arg
242244
do
243-
@@ -145,16 +189,32 @@ func_cl_wrapper ()
245+
@@ -145,16 +191,32 @@ func_cl_wrapper ()
244246
case $2 in
245247
*.o | *.lo | *.[oO][bB][jJ])
246248
func_file_conv "$2"
@@ -275,7 +277,7 @@ index c3e8760e96..c7e79e33fb 100644
275277
-I)
276278
eat=1
277279
func_file_conv "$2" mingw
278-
@@ -187,6 +247,21 @@ func_cl_wrapper ()
280+
@@ -187,6 +249,21 @@ func_cl_wrapper ()
279281
-static)
280282
shared=false
281283
;;
@@ -297,7 +299,7 @@ index c3e8760e96..c7e79e33fb 100644
297299
-Wl,*)
298300
arg=${1#-Wl,}
299301
save_ifs="$IFS"; IFS=','
300-
@@ -200,18 +275,25 @@ func_cl_wrapper ()
302+
@@ -200,18 +277,32 @@ func_cl_wrapper ()
301303
eat=1
302304
linker_opts="$linker_opts $2"
303305
;;
@@ -316,6 +318,13 @@ index c3e8760e96..c7e79e33fb 100644
316318
+ set x "$@" -Tp "$file"
317319
shift
318320
;;
321+
+ *.s)
322+
+ IS_GAS_CALL=1
323+
+ GAS_OUTPUT_FILE="$1"
324+
+ set x "$@" "$1"
325+
+ GAS_OUTPUT_FILE=`echo "$GAS_OUTPUT_FILE" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.s$/.obj/'`
326+
+ shift
327+
+ ;;
319328
+ *.a)
320329
+ linker_opts="$linker_opts $1"
321330
+ ;;
@@ -326,12 +335,29 @@ index c3e8760e96..c7e79e33fb 100644
326335
shift
327336
;;
328337
*)
329-
@@ -225,8 +307,12 @@ func_cl_wrapper ()
338+
@@ -225,8 +316,29 @@ func_cl_wrapper ()
330339
if test -n "$linker_opts"; then
331340
linker_opts="-link$linker_opts"
332341
fi
333342
- exec "$@" $linker_opts
334343
- exit 1
344+
+ if [[ $IS_GAS_CALL -eq 1 && "$AS" ]]; then
345+
+ shift
346+
+ local FINAL_ARR=("$AS")
347+
+ for VAL in "$@"; do
348+
+ case $VAL in
349+
+ "-nologo")
350+
+ ;;
351+
+ \/*) #strip slash commands
352+
+ ;;
353+
+ *)
354+
+ FINAL_ARR+=($VAL)
355+
+ ;;
356+
+ esac
357+
+ done
358+
+ FINAL_ARR+=("-o" $GAS_OUTPUT_FILE)
359+
+ set -- "${FINAL_ARR[@]}"
360+
+ fi
335361
+ if [[ $GNU_BUILD_WRAPPER_DEBUG -eq 1 ]]; then
336362
+ wrapper_exec "$@" $STD_DECLARE $linker_opts
337363
+ else

0 commit comments

Comments
 (0)