diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2020-03-09 15:47:24 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-26 07:07:50 +0100 |
commit | 4a89021d31213acfde52945512b6da0d01965963 (patch) | |
tree | 8679b99a74bf629a1c55d51a50d5909db0a97beb /prefix-stack-ccwrap | |
parent | app-portage/prefix-toolkit: drop /portage from child's PORTAGE_TMPDIR (diff) | |
download | prefix-toolkit-4a89021d31213acfde52945512b6da0d01965963.tar.gz prefix-toolkit-4a89021d31213acfde52945512b6da0d01965963.tar.bz2 prefix-toolkit-4a89021d31213acfde52945512b6da0d01965963.zip |
app-portage/prefix-toolkit(winnt): pull pthreads4w, intercept -pthreadprefix-toolkit-6
Some X11 library build system is dumb enough to just use -pthread,
while others do triage this, before trying with -lpthread. So we
intercept the -pthread compiler flag and add -lpthread instead.
We cannot do that in parity because pthreads4w is installed in the
stacked prefix, where it is built using parity.
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
(cherry picked from commit f2795c7e3b35c00c41cfc5a9937c55639a57783a)
Diffstat (limited to 'prefix-stack-ccwrap')
-rw-r--r-- | prefix-stack-ccwrap | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/prefix-stack-ccwrap b/prefix-stack-ccwrap index 4e297ce..00b3a36 100644 --- a/prefix-stack-ccwrap +++ b/prefix-stack-ccwrap @@ -7,6 +7,7 @@ fi myself=${0##*/} # basename $0 link_dirs=() +linkopts=() opts=() chost="@GENTOO_PORTAGE_CHOST@" prefix="@GENTOO_PORTAGE_EPREFIX@" @@ -21,6 +22,18 @@ orig_args=("$@") for opt in "$@" do + if [[ ${chost} == *"-winnt"* ]]; then + # We depend on dev-libs/pthreads4w, no? + case ${opt} in + -pthread | -lpthread) + case " ${linkopts[*]} " in + *" -lpthread "*) ;; + *) linkopts=( "${linkopts[@]}" "-lpthread" ) ;; + esac + continue + ;; + esac + fi case "$opt" in -L) link_dirs=("${link_dirs[@]}" "-L$1") @@ -83,7 +96,7 @@ esac [[ ${myself} == *-*-*-* ]] || myself=${chost}-${myself#${chost}-} case "$mode" in -link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" ;; +link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" "${linkopts[@]}" ;; compile) exec "${myself}" "${link_dirs[@]}" "${opts[@]}" "${pfx_comp[@]}" ;; version) exec "${myself}" "${orig_args[@]}" ;; dirs) |