summaryrefslogtreecommitdiff
path: root/xmake/scripts
diff options
context:
space:
mode:
authorRedbeanw44602 <[email protected]>2025-10-27 20:45:44 +0800
committerRedbeanw44602 <[email protected]>2025-10-27 20:45:44 +0800
commitaf28a9b562d59e048a18aacb5b7741c1b7262b3b (patch)
tree1b8a391f05111117d1fadebcd9226dce9085ac56 /xmake/scripts
parent4dade56c47f64fbf089b1b4299ae284b4e2dd5eb (diff)
add libtool patches (2.4.3~2.6.0)
Diffstat (limited to 'xmake/scripts')
-rw-r--r--xmake/scripts/patches/libtool/2.4.3.patch40
-rw-r--r--xmake/scripts/patches/libtool/2.4.4.patch40
-rw-r--r--xmake/scripts/patches/libtool/2.4.7.patch40
-rw-r--r--xmake/scripts/patches/libtool/2.5.0.patch40
-rw-r--r--xmake/scripts/patches/libtool/2.6.0.patch31
5 files changed, 191 insertions, 0 deletions
diff --git a/xmake/scripts/patches/libtool/2.4.3.patch b/xmake/scripts/patches/libtool/2.4.3.patch
new file mode 100644
index 000000000..3283ea39a
--- /dev/null
+++ b/xmake/scripts/patches/libtool/2.4.3.patch
@@ -0,0 +1,40 @@
+--- a/__xmake_patched_libtool
++++ b/__xmake_patched_libtool
+@@ -4921,6 +4921,13 @@ func_mode_link ()
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
++ target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=
++ continue
++ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+@@ -5318,7 +5325,7 @@ func_mode_link ()
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -stdlib=* select c++ std lib with clang
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+@@ -5328,6 +5335,14 @@ func_mode_link ()
+ continue
+ ;;
+
++ -target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=target
++ continue
++ ;;
++
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
diff --git a/xmake/scripts/patches/libtool/2.4.4.patch b/xmake/scripts/patches/libtool/2.4.4.patch
new file mode 100644
index 000000000..d4f72dd33
--- /dev/null
+++ b/xmake/scripts/patches/libtool/2.4.4.patch
@@ -0,0 +1,40 @@
+--- a/__xmake_patched_libtool
++++ b/__xmake_patched_libtool
+@@ -4921,6 +4921,13 @@ func_mode_link ()
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
++ target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=
++ continue
++ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+@@ -5318,7 +5325,7 @@ func_mode_link ()
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -stdlib=* select c++ std lib with clang
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+@@ -5328,6 +5335,14 @@ func_mode_link ()
+ continue
+ ;;
+
++ -target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=target
++ continue
++ ;;
++
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
diff --git a/xmake/scripts/patches/libtool/2.4.7.patch b/xmake/scripts/patches/libtool/2.4.7.patch
new file mode 100644
index 000000000..c95c4f6d3
--- /dev/null
+++ b/xmake/scripts/patches/libtool/2.4.7.patch
@@ -0,0 +1,40 @@
+--- a/__xmake_patched_libtool
++++ b/__xmake_patched_libtool
+@@ -4921,6 +4921,13 @@ func_mode_link ()
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
++ target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=
++ continue
++ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+@@ -5318,7 +5325,7 @@ func_mode_link ()
+ # -fuse-ld=* Linker select flags for GCC
+ # -Wa,* Pass flags directly to the assembler
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
+ func_quote_arg pretty "$arg"
+@@ -5328,6 +5335,14 @@ func_mode_link ()
+ continue
+ ;;
+
++ -target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=target
++ continue
++ ;;
++
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
diff --git a/xmake/scripts/patches/libtool/2.5.0.patch b/xmake/scripts/patches/libtool/2.5.0.patch
new file mode 100644
index 000000000..076c8d907
--- /dev/null
+++ b/xmake/scripts/patches/libtool/2.5.0.patch
@@ -0,0 +1,40 @@
+--- a/__xmake_patched_libtool
++++ b/__xmake_patched_libtool
+@@ -4921,6 +4921,13 @@ func_mode_link ()
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
++ target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=
++ continue
++ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+@@ -5318,7 +5325,7 @@ func_mode_link ()
+ # -Wa,* Pass flags directly to the assembler
+ # -Werror, -Werror=* Report (specified) warnings as errors
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
+ -stdlib=*|-rtlib=*|--unwindlib=*| \
+ -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
+@@ -5328,6 +5335,14 @@ func_mode_link ()
+ continue
+ ;;
+
++ -target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=target
++ continue
++ ;;
++
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
diff --git a/xmake/scripts/patches/libtool/2.6.0.patch b/xmake/scripts/patches/libtool/2.6.0.patch
new file mode 100644
index 000000000..3c2aa17e6
--- /dev/null
+++ b/xmake/scripts/patches/libtool/2.6.0.patch
@@ -0,0 +1,31 @@
+--- a/__xmake_patched_libtool
++++ b/__xmake_patched_libtool
+@@ -4921,6 +4921,13 @@ func_mode_link ()
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
++ target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=
++ continue
++ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+@@ -5328,6 +5335,14 @@ func_mode_link ()
+ continue
+ ;;
+
++ -target)
++ func_append compile_command " $arg"
++ func_append finalize_command " $arg"
++ func_append compiler_flags " $arg"
++ prev=target
++ continue
++ ;;
++
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options