* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2011-10-18 17:36 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2011-10-18 17:36 UTC (permalink / raw
To: gentoo-commits
commit: f4d0c96ff5510f0b70219fb634d354b694741891
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 12 21:30:00 2011 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Oct 12 21:32:13 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=f4d0c96f
cross-emerge: optimize/fix portageq usage
Only execute portageq once to speed things up, and only remove the
variables we are looking up from the env. Using the -i flag makes
portage very unhappy when $PATH goes missing.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-emerge | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index 85f847d..7af770b 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2010 Gentoo Foundation
+# Copyright 2008-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
if [ -z "${CHOST}" ] ; then
@@ -20,10 +20,14 @@ fi
# Portage defaults CBUILD to CHOST, so we have to remove CHOST
# from the env to get a "good" value for CBUILD
-: ${CBUILD=$(env -i portageq envvar CBUILD)}
-: ${BUILD_CFLAGS=$(env -i portageq envvar CFLAGS)}
-: ${BUILD_CXXFLAGS=$(env -i portageq envvar CXXFLAGS)}
-: ${BUILD_CPPFLAGS=$(env -i portageq envvar CPPFLAGS)}
+query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS"
+clean_vars="${query_vars} CHOST SYSROOT PORTAGE_CONFIGROOT"
+eval $(env $(printf -- '-u %s ' ${clean_vars}) \
+ portageq envvar -v ${query_vars} | sed s:^:_E_:)
+: ${CBUILD=${_E_CBUILD}}
+: ${BUILD_CFLAGS=${_E_CFLAGS}}
+: ${BUILD_CXXFLAGS=${_E_CXXFLAGS}}
+: ${BUILD_CPPFLAGS=${_E_CPPFLAGS}}
export CBUILD BUILD_CFLAGS BUILD_CXXFLAGS BUILD_CPPFLAGS
FAKEROOT=
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2012-02-27 23:13 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2012-02-27 23:13 UTC (permalink / raw
To: gentoo-commits
commit: f2920e67f3747925f72e04b89f193e79f6ff8ab4
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 27 22:58:33 2012 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Feb 27 22:58:33 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=f2920e67
cross-pkg-config: use SYSROOT from env if set
If we already have SYSROOT set in the env, just go with that. This lets
us do multiple sysroots-per-target by manipulating the env. Idea based
on the work in ChromiumOS.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index b39bbf6..37f3690 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -42,23 +42,25 @@ if [ "$1" = "--cross-pkg-config-install" ] ; then
fi
unset EXTRA_PKG_CONFIG_LIBDIR
-if [ "@CROSS_PKG_CONFIG_INSTALLED@" = "installed" ] ; then
- # Manual install
- SYSROOT="@CROSS_PKG_CONFIG_PATH@"
-elif [ -n "${ROOT}" ] ; then
- # Gentoo
- SYSROOT=${ROOT}
-elif [ -n "${STAGEDIR}" ] ; then
- # uClinux-dist
- SYSROOT=${STAGEDIR}
- EXTRA_PKG_CONFIG_LIBDIR=${UCLINUX_PKG_CONFIG_LIBDIR}
-else
- # /usr/<target>
- CHOST=${0##*/}
- CHOST=${CHOST%-pkg-config}
- SYSROOT="/usr/${CHOST}"
- if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
- error "Need \$ROOT or \$STAGEDIR set first"
+if [ -z "${SYSROOT}" ] ; then
+ if [ "@CROSS_PKG_CONFIG_INSTALLED@" = "installed" ] ; then
+ # Manual install
+ SYSROOT="@CROSS_PKG_CONFIG_PATH@"
+ elif [ -n "${ROOT}" ] ; then
+ # Gentoo
+ SYSROOT=${ROOT}
+ elif [ -n "${STAGEDIR}" ] ; then
+ # uClinux-dist
+ SYSROOT=${STAGEDIR}
+ EXTRA_PKG_CONFIG_LIBDIR=${UCLINUX_PKG_CONFIG_LIBDIR}
+ else
+ # /usr/<target>
+ CHOST=${0##*/}
+ CHOST=${CHOST%-pkg-config}
+ SYSROOT="/usr/${CHOST}"
+ if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
+ error "Need \$ROOT or \$STAGEDIR set first"
+ fi
fi
fi
# abort infinite loop due to misconfiguration
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2013-01-28 22:51 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2013-01-28 22:51 UTC (permalink / raw
To: gentoo-commits
commit: 434caf3a873e9c900d4ed5fda2d9c4a845052d72
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 28 22:32:14 2013 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Jan 28 22:32:14 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=434caf3a
emerge-wrapper: stop setting up make.globals
Portage will take care of this itself internally.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/emerge-wrapper | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 20b32ff..be81f95 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -35,13 +35,6 @@ cross_wrap_etc()
setup_warning=false
cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
- local f
- for f in /usr/share/portage/config/make.globals /etc/{portage/,}make.globals ; do
- if [[ -e ${f} ]] ; then
- ln -sf ${f} "${SYSROOT}"/etc/portage/make.globals || return 1
- break
- fi
- done
local conf=${SYSROOT}/etc/portage/make.conf
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2013-12-23 3:06 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2013-12-23 3:06 UTC (permalink / raw
To: gentoo-commits
commit: ef372284c03b42c6c7f0c48a56c925e6c8abd9a8
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 23 03:06:03 2013 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Dec 23 03:06:03 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=ef372284
emerge-wrapper: drop "wrap all targets" logic
We don't really need to do this anymore as crossdev will initialize things
automatically for you now.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/emerge-wrapper | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index be81f95..9a85f05 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -86,12 +86,15 @@ cross_wrap_etc()
cross_wrap_bin()
{
[[ $1 == "-q" ]] || echo "${CHOST}: Setting up symlinks"
+
+ pushd "${0%/*}" >/dev/null
local wrapper
for wrapper in emerge fix-root pkg-config ; do
ln -sf cross-${wrapper} ${CHOST}-${wrapper}
done
# some people like their tab completion
ln -sf cross-emerge emerge-${CHOST}
+ popd >/dev/null
}
cross_wrap()
@@ -106,26 +109,13 @@ cross_wrap()
cross_init()
{
- cd "${0%/*}" || err "unable to cd to ${0%/*}"
+ if [[ ${CHOST} == "wrapper" ]] ; then
+ err "missing --target <CHOST> option"
+ fi
# Initialize env for just one target. This is the automated behavior
# when crossdev is setting things up for people.
- if [[ ${CHOST} != "wrapper" ]] ; then
- cross_wrap -q
- return $?
- fi
-
- # When called generically, blindly set up wrappers for all installed
- # toolchains. This is more historical behavior and not really
- # recommended anymore ...
- [[ ${0##*/} != emerge-wrapper ]] && err "I wont understand things"
-
- for CHOST in `find /usr/lib/gcc -maxdepth 1 -mindepth 1 -type d` ; do
- CHOST=${CHOST##*/}
- [[ ${CHOST} == ${CBUILD} ]] && continue
- type -P -- ${CHOST}-gcc >/dev/null || continue
- cross_wrap
- done
+ cross_wrap -q
}
# CBUILD must be the first thing we export, but might as well avoid
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-01-18 19:37 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-01-18 19:37 UTC (permalink / raw
To: gentoo-commits
commit: 42f4f3f2ab3851e9d09088c7dc7857bbf027d916
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 19:35:06 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 19:35:06 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=42f4f3f2
emerge-wrapper: mark the C library/linux-headers as provided in the sysroot
Since the cross-xxx/{glibc,linux-headers} packages are installed into the
sysroot, we don't want to try and install them in here too as they'll run
into file collisions. So automatically add them to package.provided.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/emerge-wrapper | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 545e8c2..7bcbcf0 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -60,6 +60,15 @@ cross_wrap_etc()
-e "s:__CBUILD__:${CBUILD}:g" \
"${conf}"
+ # Try to figure out the libc version & os headers to avoid installing over top of it.
+ # XXX: Would be nice to use virtual/libc and virtual/os-headers here ...
+ cd "${SYSROOT}/etc/portage"
+ mkdir -p profile
+ qlist -ICv "cross-${CHOST}/" | \
+ egrep '/(linux-headers|glibc|musl|newlib|uclibc)-' | \
+ sed "s:^[^/]*:sys-libs:" \
+ > profile/package.provided
+
return 0
}
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-03-27 6:43 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-03-27 6:43 UTC (permalink / raw
To: gentoo-commits
commit: c1fa947ec08bd8783f6b2415dfe670e8701b09a1
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 27 06:43:32 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Mar 27 06:43:32 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=c1fa947e
cross-pkg-config: minor style fix up
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 37f3690..d124261 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -34,10 +34,10 @@ if [ "$1" = "--cross-pkg-config-install" ] ; then
pkg_config="${3:-$0}"
sed -i.tmp \
-e "s:@CROSS_PKG_CONFIG_INSTALLED@:installed:" \
- -e "s:@CROSS_PKG_CONFIG_PATH@:$pkg_path:" \
- "$pkg_config"
- rm -f "$pkg_config".tmp
- chmod a+rx "$pkg_config"
+ -e "s:@CROSS_PKG_CONFIG_PATH@:${pkg_path}:" \
+ "${pkg_config}"
+ rm -f "${pkg_config}".tmp
+ chmod a+rx "{$pkg_config}"
exit 0
fi
@@ -115,7 +115,7 @@ if [ -n "${bad_lines}" ] ; then
pkg-config --debug "$@" 1>&2
warn "### end of dump ###############################"
warn "### suspicious compile flags dumped here ######"
- echo "$bad_lines"
+ echo "${bad_lines}"
warn "### end of flag dump ##########################"
error "host -I or -L paths detected: ${output}"
fi
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
2014-09-17 21:41 Mike Frysinger
@ 2014-07-29 6:07 ` Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-07-29 6:07 UTC (permalink / raw
To: gentoo-commits
commit: a8d5eab601c99724dec4dae611d1cb316f92318d
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 29 05:50:38 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jul 29 05:50:38 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=a8d5eab6
cross-pkg-config: set up PKG_CONFIG_SYSTEM_LIBRARY_PATH
Rather than hardcode /usr/lib, set PKG_CONFIG_SYSTEM_LIBRARY_PATH to the
right libdir paths. This should handle lib vs lib64 vs lib correctly.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 859ef05..f928bd0 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -42,6 +42,10 @@ if [ "$1" = "--cross-pkg-config-install" ] ; then
fi
unset EXTRA_PKG_CONFIG_LIBDIR
+if [ -z "${CHOST}" ] ; then
+ CHOST=${0##*/}
+ CHOST=${CHOST%-pkg-config}
+fi
if [ -z "${SYSROOT}" ] ; then
if [ "@CROSS_PKG_CONFIG_INSTALLED@" = "installed" ] ; then
# Manual install
@@ -55,8 +59,6 @@ if [ -z "${SYSROOT}" ] ; then
EXTRA_PKG_CONFIG_LIBDIR=${UCLINUX_PKG_CONFIG_LIBDIR}
else
# /usr/<target>
- CHOST=${0##*/}
- CHOST=${CHOST%-pkg-config}
SYSROOT="/usr/${CHOST}"
if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
error "Need \$ROOT or \$STAGEDIR set first"
@@ -75,9 +77,25 @@ unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
unset PKG_CONFIG_ALLOW_SYSTEM_LIBS
#
+# Try and figure out the appropriate libdir for this target.
+# This logic matches Gentoo's get_libdir which uses $ABI.
+#
+: ${ABI:=${DEFAULT_ABI:-default}}
+var="LIBDIR_${ABI}"
+libdir=${!var}
+if [ -z "${libdir}" ] ; then
+ # Fall back to probing the compiler.
+ libc=$(realpath $(${CC:-${CHOST}-gcc} ${CFLAGS} ${LDFLAGS} -print-file-name=libc.so))
+ # Chopping the basename isn't exactly correct, but it's good enough for now.
+ libdir=$(basename "${libc%/*}")
+fi
+: ${libdir:=lib}
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH="/usr/${libdir}:/${libdir}"
+
+#
# Set the pkg-config search paths to our staging directory.
#
-export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig"
+export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/${libdir}/pkgconfig:${SYSROOT}/usr/share/pkgconfig"
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
fi
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
2014-09-17 21:41 Mike Frysinger
@ 2014-07-29 6:07 ` Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-07-29 6:07 UTC (permalink / raw
To: gentoo-commits
commit: b800ebdbe6e8d22701d1203a298bdba92a735f49
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 29 03:33:11 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jul 29 03:33:11 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=b800ebdb
cross-pkg-config: utilize PKG_CONFIG_SYSROOT_DIR
Now that the 0.24 release has been out for a few years, we can start
relying on its availability.
URL: https://bugs.gentoo.org/517530
Reported-by: Mike Marineau <mike <AT> marineau.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index d124261..859ef05 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2010 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
@@ -23,7 +23,7 @@ error() {
#
# Sanity/distro checks
#
-MIN_VER="0.20" # needs PKG_CONFIG_SYSROOT_DIR
+MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR
if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then
error pkg-config is too old ... upgrade to at least v${MIN_VER}
fi
@@ -81,12 +81,7 @@ export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgc
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
fi
-#
-# This guy is horribly broken in pkg-config <=0.23:
-# https://bugs.freedesktop.org/show_bug.cgi?id=16905
-#
-#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
-unset PKG_CONFIG_SYSROOT_DIR
+export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
#
# Sanity check the output to catch common errors that do not
@@ -95,13 +90,6 @@ unset PKG_CONFIG_SYSROOT_DIR
output=$(pkg-config "$@")
ret=$?
-#
-# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed.
-# We can't mung the .pc files as some of the vars are used at compile
-# time to encode runtime paths.
-#
-output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g')
-
# We turn the output into a newline separate string of options, then use grep
# to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things
# outside the ${SYSROOT}.
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-09-17 21:41 Mike Frysinger
2014-07-29 6:07 ` Mike Frysinger
0 siblings, 1 reply; 43+ messages in thread
From: Mike Frysinger @ 2014-09-17 21:41 UTC (permalink / raw
To: gentoo-commits
commit: b800ebdbe6e8d22701d1203a298bdba92a735f49
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 29 03:33:11 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jul 29 03:33:11 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=b800ebdb
cross-pkg-config: utilize PKG_CONFIG_SYSROOT_DIR
Now that the 0.24 release has been out for a few years, we can start
relying on its availability.
URL: https://bugs.gentoo.org/517530
Reported-by: Mike Marineau <mike <AT> marineau.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index d124261..859ef05 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2010 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
@@ -23,7 +23,7 @@ error() {
#
# Sanity/distro checks
#
-MIN_VER="0.20" # needs PKG_CONFIG_SYSROOT_DIR
+MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR
if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then
error pkg-config is too old ... upgrade to at least v${MIN_VER}
fi
@@ -81,12 +81,7 @@ export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgc
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
fi
-#
-# This guy is horribly broken in pkg-config <=0.23:
-# https://bugs.freedesktop.org/show_bug.cgi?id=16905
-#
-#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
-unset PKG_CONFIG_SYSROOT_DIR
+export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
#
# Sanity check the output to catch common errors that do not
@@ -95,13 +90,6 @@ unset PKG_CONFIG_SYSROOT_DIR
output=$(pkg-config "$@")
ret=$?
-#
-# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed.
-# We can't mung the .pc files as some of the vars are used at compile
-# time to encode runtime paths.
-#
-output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g')
-
# We turn the output into a newline separate string of options, then use grep
# to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things
# outside the ${SYSROOT}.
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-09-17 21:41 Mike Frysinger
2014-07-29 6:07 ` Mike Frysinger
0 siblings, 1 reply; 43+ messages in thread
From: Mike Frysinger @ 2014-09-17 21:41 UTC (permalink / raw
To: gentoo-commits
commit: a8d5eab601c99724dec4dae611d1cb316f92318d
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 29 05:50:38 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jul 29 05:50:38 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=a8d5eab6
cross-pkg-config: set up PKG_CONFIG_SYSTEM_LIBRARY_PATH
Rather than hardcode /usr/lib, set PKG_CONFIG_SYSTEM_LIBRARY_PATH to the
right libdir paths. This should handle lib vs lib64 vs lib correctly.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 859ef05..f928bd0 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -42,6 +42,10 @@ if [ "$1" = "--cross-pkg-config-install" ] ; then
fi
unset EXTRA_PKG_CONFIG_LIBDIR
+if [ -z "${CHOST}" ] ; then
+ CHOST=${0##*/}
+ CHOST=${CHOST%-pkg-config}
+fi
if [ -z "${SYSROOT}" ] ; then
if [ "@CROSS_PKG_CONFIG_INSTALLED@" = "installed" ] ; then
# Manual install
@@ -55,8 +59,6 @@ if [ -z "${SYSROOT}" ] ; then
EXTRA_PKG_CONFIG_LIBDIR=${UCLINUX_PKG_CONFIG_LIBDIR}
else
# /usr/<target>
- CHOST=${0##*/}
- CHOST=${CHOST%-pkg-config}
SYSROOT="/usr/${CHOST}"
if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
error "Need \$ROOT or \$STAGEDIR set first"
@@ -75,9 +77,25 @@ unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
unset PKG_CONFIG_ALLOW_SYSTEM_LIBS
#
+# Try and figure out the appropriate libdir for this target.
+# This logic matches Gentoo's get_libdir which uses $ABI.
+#
+: ${ABI:=${DEFAULT_ABI:-default}}
+var="LIBDIR_${ABI}"
+libdir=${!var}
+if [ -z "${libdir}" ] ; then
+ # Fall back to probing the compiler.
+ libc=$(realpath $(${CC:-${CHOST}-gcc} ${CFLAGS} ${LDFLAGS} -print-file-name=libc.so))
+ # Chopping the basename isn't exactly correct, but it's good enough for now.
+ libdir=$(basename "${libc%/*}")
+fi
+: ${libdir:=lib}
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH="/usr/${libdir}:/${libdir}"
+
+#
# Set the pkg-config search paths to our staging directory.
#
-export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig"
+export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/${libdir}/pkgconfig:${SYSROOT}/usr/share/pkgconfig"
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
fi
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-09-17 21:41 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-09-17 21:41 UTC (permalink / raw
To: gentoo-commits
commit: 8863e239450466dda4c174d3d473b48f2b8053ea
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 17 21:25:23 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Sep 17 21:25:23 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=8863e239
cross-pkg-config: probe pkgconfig dir directly
Since we're looking for the pkgconfig dir, let's probe it directly rather
than rely on specific C library files.
URL: https://bugs.gentoo.org/518790
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index f928bd0..000d6ad 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -85,9 +85,9 @@ var="LIBDIR_${ABI}"
libdir=${!var}
if [ -z "${libdir}" ] ; then
# Fall back to probing the compiler.
- libc=$(realpath $(${CC:-${CHOST}-gcc} ${CFLAGS} ${LDFLAGS} -print-file-name=libc.so))
+ libdir=$(realpath "$(${CC:-${CHOST}-gcc} ${CFLAGS} ${LDFLAGS} -print-file-name=pkgconfig)/..")
# Chopping the basename isn't exactly correct, but it's good enough for now.
- libdir=$(basename "${libc%/*}")
+ libdir=$(basename "${libdir}")
fi
: ${libdir:=lib}
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="/usr/${libdir}:/${libdir}"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-09-18 16:52 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-09-18 16:52 UTC (permalink / raw
To: gentoo-commits
commit: 56b32e1a3c5da6c3a39270840a8bc99fe321227d
Author: Joakim Tjernlund <Joakim.Tjernlund <AT> transmode <DOT> se>
AuthorDate: Sun Mar 2 17:56:49 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Sep 18 16:51:43 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=56b32e1a
cross-emerge: drop automatic fakeroot usage
Portage is not designed to run wrapped in fakeroot. Instead one should
set FEATURES="fakeroot". Wrapping emerge with fakeroot triggers emerge
to disable fakeroot.
URL: https://bugs.gentoo.org/489016
URL: https://bugs.gentoo.org/523098
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund <AT> transmode.se>
---
wrappers/cross-emerge | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index 7af770b..0ea38e3 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -30,10 +30,5 @@ eval $(env $(printf -- '-u %s ' ${clean_vars}) \
: ${BUILD_CPPFLAGS=${_E_CPPFLAGS}}
export CBUILD BUILD_CFLAGS BUILD_CXXFLAGS BUILD_CPPFLAGS
-FAKEROOT=
-if [ $(id -u) -ne 0 ] ; then
- type -P fakeroot >/dev/null && FAKEROOT=fakeroot
-fi
-
: ${CROSS_CMD:=emerge --root-deps=rdeps}
-exec ${FAKEROOT} ${CROSS_CMD} "$@"
+exec ${CROSS_CMD} "$@"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-10-31 0:52 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-10-31 0:52 UTC (permalink / raw
To: gentoo-commits
commit: 4642d41545192b4ac7c6034663c09e75fa78561c
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 00:51:54 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 31 00:51:54 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=4642d415
cross-pkg-config: avoid bashism
URL: https://bugs.gentoo.org/525068
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/cross-pkg-config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 000d6ad..6b68fa7 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -82,7 +82,7 @@ unset PKG_CONFIG_ALLOW_SYSTEM_LIBS
#
: ${ABI:=${DEFAULT_ABI:-default}}
var="LIBDIR_${ABI}"
-libdir=${!var}
+eval libdir=\${${var}}
if [ -z "${libdir}" ] ; then
# Fall back to probing the compiler.
libdir=$(realpath "$(${CC:-${CHOST}-gcc} ${CFLAGS} ${LDFLAGS} -print-file-name=pkgconfig)/..")
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-10-31 1:56 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-10-31 1:56 UTC (permalink / raw
To: gentoo-commits
commit: d3264b37b65a81045cd7a0d0daf5b52f1af1c335
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 01:04:15 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 31 01:04:15 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=d3264b37
emerge-wrapper: improve warning messages
The current output isn't clear as to what is wrong.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/emerge-wrapper | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 154d82e..9ba46b4 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -21,11 +21,13 @@ err() { echo "emerge-wrapper: $*" 1>&2; exit 1; }
emit_setup_warning()
{
- ${setup_warning:-false} && return 0
- setup_warning=true
- echo "!!! WARNING - Cannot auto-configure CHOST ${CHOST}"
- echo "!!! You should edit ${conf}"
- echo "!!! by hand to complete your configuration"
+ if ! ${setup_warning} ; then
+ setup_warning=true
+ echo "!!! WARNING - Cannot auto-configure CHOST ${CHOST};"
+ echo "!!! You should edit ${conf}"
+ echo "!!! by hand to complete your configuration."
+ fi
+ echo "!!! $*"
}
cross_wrap_etc()
@@ -44,13 +46,13 @@ cross_wrap_etc()
. "${MAIN_REPO_PATH}"/eclass/toolchain-funcs.eclass
tc-arch
)
- [[ ${ARCH} == "unknown" ]] && emit_setup_warning
+ [[ ${ARCH} == "unknown" ]] && emit_setup_warning "No ARCH is known for this target."
LIBC="__LIBC__"
case ${CHOST} in
*gnu*) LIBC=glibc ;;
*uclibc*) LIBC=uclibc ;;
- *) emit_setup_warning ;;
+ *) emit_setup_warning "No LIBC is known for this target." ;;
esac
sed -i \
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2014-10-31 1:56 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2014-10-31 1:56 UTC (permalink / raw
To: gentoo-commits
commit: b94a97a6fd59b88e4a2de19a258f9e255ae7ef72
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 01:52:53 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 31 01:52:53 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=b94a97a6
crossdev: set LIBC=mingw for mingw targets
URL: https://bugs.gentoo.org/340989
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
wrappers/emerge-wrapper | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 9ba46b4..4056601 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -50,9 +50,10 @@ cross_wrap_etc()
LIBC="__LIBC__"
case ${CHOST} in
- *gnu*) LIBC=glibc ;;
- *uclibc*) LIBC=uclibc ;;
- *) emit_setup_warning "No LIBC is known for this target." ;;
+ *gnu*) LIBC=glibc ;;
+ *uclibc*) LIBC=uclibc ;;
+ *mingw*) LIBC=mingw ;;
+ *) emit_setup_warning "No LIBC is known for this target." ;;
esac
sed -i \
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2015-07-23 3:47 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2015-07-23 3:47 UTC (permalink / raw
To: gentoo-commits
commit: 70b1b4ec394ab952a5dcf2bbe2c888852e9412b4
Author: Joakim Tjernlund <joakim.tjernlund <AT> transmode <DOT> se>
AuthorDate: Tue Jul 21 08:11:33 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jul 23 03:47:32 2015 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=70b1b4ec
cross-emerge: handle LDFLAGS too
BUILD_LDFLAGS was missing, add it too.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund <AT> transmode.se>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
wrappers/cross-emerge | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index 0ea38e3..fc6117e 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -20,7 +20,7 @@ fi
# Portage defaults CBUILD to CHOST, so we have to remove CHOST
# from the env to get a "good" value for CBUILD
-query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS"
+query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS"
clean_vars="${query_vars} CHOST SYSROOT PORTAGE_CONFIGROOT"
eval $(env $(printf -- '-u %s ' ${clean_vars}) \
portageq envvar -v ${query_vars} | sed s:^:_E_:)
@@ -28,7 +28,8 @@ eval $(env $(printf -- '-u %s ' ${clean_vars}) \
: ${BUILD_CFLAGS=${_E_CFLAGS}}
: ${BUILD_CXXFLAGS=${_E_CXXFLAGS}}
: ${BUILD_CPPFLAGS=${_E_CPPFLAGS}}
-export CBUILD BUILD_CFLAGS BUILD_CXXFLAGS BUILD_CPPFLAGS
+: ${BUILD_LDFLAGS=${_E_LDFLAGS}}
+export CBUILD BUILD_CFLAGS BUILD_CXXFLAGS BUILD_CPPFLAGS BUILD_LDFLAGS
: ${CROSS_CMD:=emerge --root-deps=rdeps}
exec ${CROSS_CMD} "$@"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2016-01-16 8:22 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2016-01-16 8:22 UTC (permalink / raw
To: gentoo-commits
commit: 2cdf8714b2d575d6e1554b6ed397451b153ae76c
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 16 08:21:37 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Jan 16 08:21:37 2016 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=2cdf8714
cross-pkg-config: fix typo w/pkg_config
URL: https://bugs.gentoo.org/570762
Reported-by: Fabio Rossi <rossi.f <AT> inwind.it>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
wrappers/cross-pkg-config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 6b68fa7..e7a234c 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -37,7 +37,7 @@ if [ "$1" = "--cross-pkg-config-install" ] ; then
-e "s:@CROSS_PKG_CONFIG_PATH@:${pkg_path}:" \
"${pkg_config}"
rm -f "${pkg_config}".tmp
- chmod a+rx "{$pkg_config}"
+ chmod a+rx "${pkg_config}"
exit 0
fi
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2017-12-30 17:45 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2017-12-30 17:45 UTC (permalink / raw
To: gentoo-commits
commit: 32e6558e820f146190dfcbadeafd307826150133
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 30 17:44:43 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Dec 30 17:44:43 2017 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=32e6558e
wrappers/emerge-wrapper: add ELIBC=musl autodetection
Reported-by: Marty E. Plummer
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 1 +
1 file changed, 1 insertion(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index c123259..3153f8b 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -52,6 +52,7 @@ cross_wrap_etc()
case ${CHOST} in
*gnu*) LIBC=glibc ;;
*uclibc*) LIBC=uclibc ;;
+ *musl*) LIBC=musl ;;
*mingw*) LIBC=mingw ;;
*) emit_setup_warning "No LIBC is known for this target." ;;
esac
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2017-12-30 22:37 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2017-12-30 22:37 UTC (permalink / raw
To: gentoo-commits
commit: 4bb607a66f7c2f4249c1211810eedad262e8c857
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 30 22:36:57 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Dec 30 22:36:57 2017 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=4bb607a6
wrappers/emerge-wrapper: add ELIBC=Cygwin autodetection
Reported-by: Marty E. Plummer
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 1 +
1 file changed, 1 insertion(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 3153f8b..97fc30e 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -53,6 +53,7 @@ cross_wrap_etc()
*gnu*) LIBC=glibc ;;
*uclibc*) LIBC=uclibc ;;
*musl*) LIBC=musl ;;
+ *cygwin*) LIBC=Cygwin ;;
*mingw*) LIBC=mingw ;;
*) emit_setup_warning "No LIBC is known for this target." ;;
esac
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2018-03-10 13:07 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2018-03-10 13:07 UTC (permalink / raw
To: gentoo-commits
commit: 21a0f5a3d83084436e6f6b66114cc5c593528866
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 10 13:04:46 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Mar 10 13:04:46 2018 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=21a0f5a3
cross-emerge: tweak EPREFIX handling to be POSIX sh, bug #650100
Reported and fixed by Scall.
Reported-by: Scall
Fixed-by: Scall
Closes: https://bugs.gentoo.org/650100
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/cross-emerge | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index fb98951..d775b90 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -10,7 +10,7 @@ fi
export CHOST
EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
-if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then
+if [ ${EPREFIX} = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
EPREFIX=""
fi
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2018-03-24 15:13 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2018-03-24 15:13 UTC (permalink / raw
To: gentoo-commits
commit: 394fb518fbc0789402b853d7ec44eaf283ffae51
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 24 15:08:00 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Mar 24 15:12:51 2018 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=394fb518
cross-emerge: fix empty EPREFIX handling, bug #650100
commit 21a0f5a3d83084436e6f6b66114cc5c593528866
("cross-emerge: tweak EPREFIX handling to be POSIX sh, bug #650100")
introduced a bug:
$ foo-emerge
foo-emerge: line 13: [: =: unary operator expected
Tweak it by quoting 'test' argument.
Reported-by: Marty E. Plummer
Bug: https://bugs.gentoo.org/650100
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/cross-emerge | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index d775b90..7b63756 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -10,7 +10,7 @@ fi
export CHOST
EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
-if [ ${EPREFIX} = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
+if [ "${EPREFIX}" = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
EPREFIX=""
fi
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2018-04-05 6:56 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2018-04-05 6:56 UTC (permalink / raw
To: gentoo-commits
commit: 25d321ff00f53a4fa23e57cdb479315591618451
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 5 06:43:10 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Apr 5 06:43:10 2018 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=25d321ff
emerge-wrapper: add a note that 'package.provided' are normally incomplete
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 1 +
1 file changed, 1 insertion(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 97fc30e..2a3a91d 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -67,6 +67,7 @@ cross_wrap_etc()
# Try to figure out the libc version & os headers to avoid installing over top of it.
# XXX: Would be nice to use virtual/libc and virtual/os-headers here ...
+ # TODO: this does not work as crossdev calls --init before any packages are installed
cd "${SYSROOT}/etc/portage"
mkdir -p profile
qlist -ICv "cross-${CHOST}/" | \
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2018-10-20 20:08 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2018-10-20 20:08 UTC (permalink / raw
To: gentoo-commits
commit: 5776c062f85c04612a73519f1da43f1988087116
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 20 18:30:13 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 20 18:30:13 2018 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=5776c062
wrappers/Makefile: drop unused TOPDIR variable
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/wrappers/Makefile b/wrappers/Makefile
index df5eb2b..edb6a26 100644
--- a/wrappers/Makefile
+++ b/wrappers/Makefile
@@ -6,7 +6,6 @@ include ../settings.mk
PORTDIR ?= $(shell portageq envvar PORTDIR)
FNAMES = cross-emerge cross-fix-root cross-pkg-config emerge-wrapper
SITE = $(PREFIX)/share/crossdev/include/site
-TOPDIR =
all:
sed -i -e "s,@GENTOO_PORTAGE_EPREFIX@,$(EPREFIX),g" cross-emerge
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2019-03-11 22:13 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2019-03-11 22:13 UTC (permalink / raw
To: gentoo-commits
commit: f920068ec22daee3adc8e30b544c73771fcfc1fb
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 11 22:11:58 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar 11 22:11:58 2019 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=f920068e
emerge-wrapper: declare KERNEL=Winnt for *mingw* targets, bug #594576
Reported-by: Fabio Rossi
Bug: https://bugs.gentoo.org/594576
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 1 +
1 file changed, 1 insertion(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index d554eba..325d988 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -65,6 +65,7 @@ cross_wrap_etc()
KERNEL="__KERNEL__"
case ${CHOST} in
*linux*) KERNEL=linux ;;
+ *mingw*) KERNEL=Winnt ;;
*) emit_setup_warning "No KERNEL is known for this target." ;;
esac
if [[ -n ${KERNEL} ]]; then
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2019-03-18 22:54 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2019-03-18 22:54 UTC (permalink / raw
To: gentoo-commits
commit: 6e280b057cf2971f1a94aae83117fa6d9c194c72
Author: Palmer Dabbelt <palmer <AT> dabbelt <DOT> com>
AuthorDate: Mon Mar 18 10:25:59 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar 18 22:52:23 2019 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=6e280b05
emerge-wrapper: pin bare-metal targets to LIBC=newlib
Signed-off-by: Palmer Dabbelt <palmer <AT> dabbelt.com>
wrappers/emerge-wrapper | 1 +
1 file changed, 1 insertion(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 325d988..c652df5 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -59,6 +59,7 @@ cross_wrap_etc()
*musl*) LIBC=musl ;;
*cygwin*) LIBC=Cygwin ;;
*mingw*) LIBC=mingw ;;
+ *-newlib|*-elf|*-eabi) LIBC=newlib ;;
*) emit_setup_warning "No LIBC is known for this target." ;;
esac
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2019-07-12 7:24 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2019-07-12 7:24 UTC (permalink / raw
To: gentoo-commits
commit: 2652a5494f4910700b18298796f7f7fefdf0ba78
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 07:23:01 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jul 12 07:23:01 2019 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=2652a549
wrappers: tweak rarning message to contain config file paths
commit 393e1cd0c6d3ac81fa166bafe6065d42849f622c
("wrappers: create profile/ and override ARCH, LIBC and KERNEL there")
broke config paths reporting as it upgraded 'conf' singleton
to 'confs' array but did not update warning message accordingly.
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index c652df5..d084a96 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -24,7 +24,7 @@ emit_setup_warning()
if ! ${setup_warning} ; then
setup_warning=true
echo "!!! WARNING - Cannot auto-configure CHOST ${CHOST};"
- echo "!!! You should edit ${conf}"
+ echo "!!! You should edit ${confs[*]}"
echo "!!! by hand to complete your configuration."
fi
echo "!!! $*"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2019-07-21 13:41 James Le Cuirot
0 siblings, 0 replies; 43+ messages in thread
From: James Le Cuirot @ 2019-07-21 13:41 UTC (permalink / raw
To: gentoo-commits
commit: cd2aa636cc5d0476bff29d50fbaab7591b48903e
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 9 20:58:41 2019 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 21 13:35:32 2019 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=cd2aa636
cross-emerge: Default to using no prefix
On non-prefixed systems, cross-emerge installs to /usr/${CHOST} by
default. On prefixed systems, this default effectively becomes
${BROOT}/usr/${CHOST}/${BROOT}, which is unexpected and makes little
sense. The first BROOT originates from the ROOT setting in the cross
make.conf. The second BROOT is the prefix that Portage is configured
to use by default.
We therefore need to avoid the second BROOT by overriding Portage with
a blank EPREFIX value. Note that a bug in Portage itself means that
this is ineffective on versions before 2.3.69 but it's no worse than
it was before either.
For users who do want to set their own EPREFIX, the PORTAGE_CONFIGROOT
default has been updated to ${SYSROOT}${EPREFIX} as the prefixed
location is required for this variable. This is despite man emerge
suggesting otherwise!
Closes: https://bugs.gentoo.org/642604
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
wrappers/cross-emerge | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index 7b63756..a85d41e 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2011 Gentoo Foundation
+# Copyright 2008-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
if [ -z "${CHOST}" ] ; then
@@ -9,14 +9,15 @@ if [ -z "${CHOST}" ] ; then
fi
export CHOST
-EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
-if [ "${EPREFIX}" = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
- EPREFIX=""
+BROOT="@GENTOO_PORTAGE_EPREFIX@"
+if [ "${BROOT}" = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
+ BROOT=""
fi
-: ${SYSROOT=${EPREFIX}/usr/${CHOST}}
-: ${PORTAGE_CONFIGROOT=${SYSROOT}}
-export SYSROOT PORTAGE_CONFIGROOT
+: ${EPREFIX=}
+: ${SYSROOT=${BROOT}/usr/${CHOST}}
+: ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}}
+export EPREFIX SYSROOT PORTAGE_CONFIGROOT
if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
echo "cross-emerge: CHOST is not set properly"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2019-08-30 7:32 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2019-08-30 7:32 UTC (permalink / raw
To: gentoo-commits
commit: be327d4e749d3cc8ece772c87843b64d856cbbf0
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 30 07:30:43 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Aug 30 07:30:43 2019 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=be327d4e
wrappers/emerge-wrapper: drop population of profile/package.provided
'profile/package.provided' is created empty for quite a while
because wrapper init is called before any cross-* package gets merged.
Let's drop that completely and focus on always installing
headers and libc into target.
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index d084a96..381214e 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -84,16 +84,6 @@ cross_wrap_etc()
-e "s:__CBUILD__:${CBUILD}:g" \
"${confs[@]}"
- # Try to figure out the libc version & os headers to avoid installing over top of it.
- # XXX: Would be nice to use virtual/libc and virtual/os-headers here ...
- # TODO: this does not work as crossdev calls --init before any packages are installed
- cd "${SYSROOT}/etc/portage"
- mkdir -p profile
- qlist -ICv "cross-${CHOST}/" | \
- egrep '/(linux-headers|glibc|musl|newlib|uclibc)-' | \
- sed "s:^[^/]*:sys-libs:" \
- > profile/package.provided
-
return 0
}
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2021-01-17 8:09 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2021-01-17 8:09 UTC (permalink / raw
To: gentoo-commits
commit: 9f5826dfc470a52cc69a5a7d545438e0f8f6f212
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 16 21:54:24 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 08:09:39 2021 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=9f5826df
cross-pkg-config: Respect PKG_CONFIG_SYSROOT_DIR if its already set
When using --variable, pkgconf prepends PKG_CONFIG_SYSROOT_DIR to the
value when it starts with /, even though the original pkg-config
didn't do this. Upstream have confirmed that this is intentional
[1]. The original pkg-config is no longer maintained and will probably
be dropped from Gentoo.
$ PKG_CONFIG_SYSROOT_DIR=/foo pkgconf --variable=udevdir udev
/foo/lib/udev
$ PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev
/lib/udev
In some contexts, we do not want the SYSROOT to be prepended
here. This would normally just be a case of not setting
PKG_CONFIG_SYSROOT_DIR but our wrapper uses SYSROOT to set both
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR. It will not set one
without the other but we need the latter to find the right .pc file in
the first place.
One example where this issue arises is Gentoo's udev eclass. Packages
installing udev rules call get_udevdir() to find out where to put
them. With ROOT=/foo SYSROOT=/foo, this will return something like
/foo/lib/udev but since ROOT is already handled by Portage when
merging, the rules will actually end up in /foo/foo/lib/udev.
This can be resolved by respecting PKG_CONFIG_SYSROOT_DIR, even when
it is set but blank. It is unlikely to be set more widely when using
cross-pkg-config so this should be safe.
[1] https://github.com/pkgconf/pkgconf/issues/69#issuecomment-48434876
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/cross-pkg-config | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index e7a234c..d569bb9 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -99,7 +99,8 @@ export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/${libdir}/pkgconfig:${SYSROOT}/usr/shar
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
fi
-export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
+: ${PKG_CONFIG_SYSROOT_DIR=${SYSROOT}}
+export PKG_CONFIG_SYSROOT_DIR
#
# Sanity check the output to catch common errors that do not
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2021-06-21 21:23 Sergei Trofimovich
0 siblings, 0 replies; 43+ messages in thread
From: Sergei Trofimovich @ 2021-06-21 21:23 UTC (permalink / raw
To: gentoo-commits
commit: c121a1faf88221af7246c45687578f5258c416af
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 21 20:56:09 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jun 21 20:56:09 2021 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=c121a1fa
wrappers/emerge-wrapper: fail crossdev setup when toolchain-funcs.eclass sourcing fails
Before the change toolchain-funcs.eclass import failure did not fail hard
and generated suboptimal default ARCH. It's not as bad as crossdev's
equivalent 'multilib.eclass' source failure, but still not perfect.
The change exposes die() calls to be visible in crossdev run:
```
$ rm -rf '@GENTOO_PORTAGE_EPREFIX <AT> /usr/foo/etc'; ./emerge-wrapper --target foo --init
emerge-wrapper: ERROR: toolchain-funcs.eclass: EAPI 0 not supported
emerge-wrapper: ERROR: Failed calling 'tc-arch' from toolchain-funcs.eclass.
```
Reported-by: Marco Scardovi (scardracs)
Bug: https://bugs.gentoo.org/797367
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
wrappers/emerge-wrapper | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 381214e..d9ba08b 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -17,7 +17,7 @@ PREFIX="@PREFIX@"
# Enable this script to be manually installed while debugging
[[ ${PREFIX} == "@"PREFIX"@" ]] && PREFIX="/usr"
-err() { echo "emerge-wrapper: $*" 1>&2; exit 1; }
+err() { echo "emerge-wrapper: ERROR: $*" 1>&2; exit 1; }
emit_setup_warning()
{
@@ -47,9 +47,11 @@ cross_wrap_etc()
# Re-use existing CHOST->portage ARCH mapping code
ARCH=$(
inherit() { :; }
+ die() { err "toolchain-funcs.eclass$*"; }
. "${MAIN_REPO_PATH}"/eclass/toolchain-funcs.eclass
tc-arch
)
+ [[ $? -ne 0 ]] && err "Failed calling 'tc-arch' from toolchain-funcs.eclass."
[[ ${ARCH} == "unknown" ]] && emit_setup_warning "No ARCH is known for this target."
LIBC="__LIBC__"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2021-10-27 8:55 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2021-10-27 8:55 UTC (permalink / raw
To: gentoo-commits
commit: 748fcd09f89d10b8cf85d11dc574aad3896281d9
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 27 08:27:15 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Oct 27 08:27:15 2021 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=748fcd09
wrappers: add an ebuild helper too
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
wrappers/emerge-wrapper | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index d8c6537..57e26c3 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -95,7 +95,7 @@ cross_wrap_bin()
pushd "${0%/*}" >/dev/null
local wrapper
- for wrapper in emerge fix-root pkg-config ; do
+ for wrapper in build emerge fix-root pkg-config ; do
ln -sf cross-${wrapper} ${CHOST}-${wrapper}
done
# some people like their tab completion
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2021-11-26 19:02 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2021-11-26 19:02 UTC (permalink / raw
To: gentoo-commits
commit: 7eeb1d8f8fbb712706165e780c9b2904e4da7b92
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 26 19:01:08 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Nov 26 19:01:08 2021 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=7eeb1d8f
wrappers: fix typo in ebuild wrapper
Closes: https://bugs.gentoo.org/519636
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
wrappers/emerge-wrapper | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 57e26c3..051948a 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -95,7 +95,7 @@ cross_wrap_bin()
pushd "${0%/*}" >/dev/null
local wrapper
- for wrapper in build emerge fix-root pkg-config ; do
+ for wrapper in ebuild emerge fix-root pkg-config ; do
ln -sf cross-${wrapper} ${CHOST}-${wrapper}
done
# some people like their tab completion
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2022-01-13 8:20 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2022-01-13 8:20 UTC (permalink / raw
To: gentoo-commits
commit: 19ab8f908103d9ca3bfd69b9eb7ea017e1c599e0
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 08:15:45 2022 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 08:15:45 2022 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=19ab8f90
cross-pkg-config: drop old version check
pkg-config-0.24 was released over a decade ago. We can stop checking
for it now.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
wrappers/cross-pkg-config | 4 ----
1 file changed, 4 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index d569bb9..d51edd2 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -23,10 +23,6 @@ error() {
#
# Sanity/distro checks
#
-MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR
-if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then
- error pkg-config is too old ... upgrade to at least v${MIN_VER}
-fi
if [ "$1" = "--cross-pkg-config-install" ] ; then
# --cross-pkg-config-install <sysroot dir> [pkg-config wrapper]
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2022-01-13 8:20 Mike Frysinger
0 siblings, 0 replies; 43+ messages in thread
From: Mike Frysinger @ 2022-01-13 8:20 UTC (permalink / raw
To: gentoo-commits
commit: 02da661244ab0cb663d753f80e2e18d9a2629c2e
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 08:18:30 2022 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 08:18:30 2022 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=02da6612
cross-pkg-config: allow basic options for $1
Tools sometimes probe pkg-config to see if it itself works. Allow
those basic options through. We specifically don't parse the full
command line to keep the code simple, faster, and to avoid dealing
with ugly edge cases (like `pkg-config -- --help`).
Closes: https://bugs.gentoo.org/830840
Reported-by: Alexandra Parker <alex.iris.parker <AT> gmail.com>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
wrappers/cross-pkg-config | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index d51edd2..62f0dfa 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -20,6 +20,17 @@ error() {
exit 1
}
+#
+# Allow very basic checks. This is not very sophisticated, but should get the
+# job done, practically speaking.
+#
+
+case $1 in
+--about|--help|--version)
+ exec pkg-config "$@"
+ ;;
+esac
+
#
# Sanity/distro checks
#
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2022-08-18 21:57 Sam James
0 siblings, 0 replies; 43+ messages in thread
From: Sam James @ 2022-08-18 21:57 UTC (permalink / raw
To: gentoo-commits
commit: 2e96f9900cccc95bd86dbe2d181047fbb00674fb
Author: Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Thu Aug 18 21:49:32 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 21:57:26 2022 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=2e96f990
wrappers/Makefile: fix weird double spaces
Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Closes: https://github.com/gentoo/crossdev/pull/4
Signed-off-by: Sam James <sam <AT> gentoo.org>
wrappers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/Makefile b/wrappers/Makefile
index 79f47aa..031f099 100644
--- a/wrappers/Makefile
+++ b/wrappers/Makefile
@@ -4,7 +4,7 @@
include ../settings.mk
PORTDIR ?= $(shell portageq envvar PORTDIR)
-FNAMES = cross-ebuild cross-emerge cross-fix-root cross-pkg-config emerge-wrapper
+FNAMES = cross-ebuild cross-emerge cross-fix-root cross-pkg-config emerge-wrapper
SITEDIR = $(PREFIX)/share/crossdev/include/site
ETC_SITEDIR = $(EPREFIX)/etc/crossdev/include/site
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2022-08-18 21:57 Sam James
0 siblings, 0 replies; 43+ messages in thread
From: Sam James @ 2022-08-18 21:57 UTC (permalink / raw
To: gentoo-commits
commit: c4cf9b41b4b7b7bc36d3878383666a77d51c804b
Author: Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Thu Aug 18 21:16:38 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 21:57:25 2022 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=c4cf9b41
wrappers/cross-ebuild: new file
Crossdev currently installs a dead symlink to cross-ebuild. This commit
creates it. Mostly copied from cross-emerge.
Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
wrappers/Makefile | 2 +-
wrappers/cross-ebuild | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/wrappers/Makefile b/wrappers/Makefile
index 19a1da3..79f47aa 100644
--- a/wrappers/Makefile
+++ b/wrappers/Makefile
@@ -4,7 +4,7 @@
include ../settings.mk
PORTDIR ?= $(shell portageq envvar PORTDIR)
-FNAMES = cross-emerge cross-fix-root cross-pkg-config emerge-wrapper
+FNAMES = cross-ebuild cross-emerge cross-fix-root cross-pkg-config emerge-wrapper
SITEDIR = $(PREFIX)/share/crossdev/include/site
ETC_SITEDIR = $(EPREFIX)/etc/crossdev/include/site
diff --git a/wrappers/cross-ebuild b/wrappers/cross-ebuild
new file mode 100644
index 0000000..6f47cb8
--- /dev/null
+++ b/wrappers/cross-ebuild
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright 2008-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+if [ -z "${CHOST}" ] ; then
+ CHOST=${0##*/}
+ CHOST=${CHOST%-ebuild}
+ CHOST=${CHOST#ebuild-}
+fi
+export CHOST
+
+BROOT="@GENTOO_PORTAGE_EPREFIX@"
+if [ "${BROOT}" = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
+ BROOT=""
+fi
+
+: ${EPREFIX=}
+: ${SYSROOT=${BROOT}/usr/${CHOST}}
+: ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}}
+export EPREFIX SYSROOT PORTAGE_CONFIGROOT
+
+if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
+ echo "cross-ebuild: CHOST is not set properly"
+ exit 1
+fi
+
+# Portage defaults CBUILD to CHOST, so we have to remove CHOST
+# from the env to get a "good" value for CBUILD
+query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS"
+clean_vars="${query_vars} CHOST SYSROOT PORTAGE_CONFIGROOT"
+eval $(env $(printf -- '-u %s ' ${clean_vars}) \
+ portageq envvar -v ${query_vars} | sed s:^:_E_:)
+: ${CBUILD=${_E_CBUILD}}
+: ${BUILD_CFLAGS=${_E_CFLAGS}}
+: ${BUILD_CXXFLAGS=${_E_CXXFLAGS}}
+: ${BUILD_CPPFLAGS=${_E_CPPFLAGS}}
+: ${BUILD_LDFLAGS=${_E_LDFLAGS}}
+export CBUILD BUILD_CFLAGS BUILD_CXXFLAGS BUILD_CPPFLAGS BUILD_LDFLAGS
+
+: ${CROSS_CMD:=ebuild}
+exec ${CROSS_CMD} "$@"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2022-12-27 16:06 Sam James
0 siblings, 0 replies; 43+ messages in thread
From: Sam James @ 2022-12-27 16:06 UTC (permalink / raw
To: gentoo-commits
commit: cbaa46284277310826fbe3e32c0f33ae8d977960
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 15:49:41 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 16:06:30 2022 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=cbaa4628
cross-pkg-config: Rework to properly support prefix
This helps with both cross-compiling into a prefix and cross-compiling
within a prefix.
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
wrappers/cross-pkg-config | 87 +++++++++++++++++++++++++++--------------------
1 file changed, 51 insertions(+), 36 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 62f0dfa..f178147 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2014 Gentoo Foundation
+# Copyright 2008-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
@@ -20,6 +20,9 @@ error() {
exit 1
}
+# abort infinite loop due to misconfiguration
+[ "${0##*/}" = "pkg-config" ] && error "aborting infinite loop! (make sure to delete uClinux-dist/tools/pkg-config)"
+
#
# Allow very basic checks. This is not very sophisticated, but should get the
# job done, practically speaking.
@@ -48,32 +51,49 @@ if [ "$1" = "--cross-pkg-config-install" ] ; then
exit 0
fi
-unset EXTRA_PKG_CONFIG_LIBDIR
+export PKG_CONFIG_LIBDIR=
+unset PREFIX
+
if [ -z "${CHOST}" ] ; then
CHOST=${0##*/}
CHOST=${CHOST%-pkg-config}
fi
-if [ -z "${SYSROOT}" ] ; then
- if [ "@CROSS_PKG_CONFIG_INSTALLED@" = "installed" ] ; then
- # Manual install
- SYSROOT="@CROSS_PKG_CONFIG_PATH@"
- elif [ -n "${ROOT}" ] ; then
- # Gentoo
- SYSROOT=${ROOT}
- elif [ -n "${STAGEDIR}" ] ; then
- # uClinux-dist
- SYSROOT=${STAGEDIR}
- EXTRA_PKG_CONFIG_LIBDIR=${UCLINUX_PKG_CONFIG_LIBDIR}
+
+if [ -n "${ESYSROOT+x}" ] ; then
+ # Gentoo EAPI 7+
+ : ${PKG_CONFIG_SYSROOT_DIR=${SYSROOT}}
+ PREFIX=${ESYSROOT%/}
+ PREFIX=${PREFIX#${SYSROOT%/}}
+elif [ -n "${ROOT+x}" ] ; then
+ # Gentoo EAPI 0-6
+ if [ -n "${SYSROOT%/}" ]; then
+ : ${PKG_CONFIG_SYSROOT_DIR=${SYSROOT}}
+ PREFIX=${EPREFIX%/}
else
- # /usr/<target>
- SYSROOT="/usr/${CHOST}"
- if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
- error "Need \$ROOT or \$STAGEDIR set first"
- fi
+ : ${PKG_CONFIG_SYSROOT_DIR=}
+ PREFIX=${PORTAGE_OVERRIDE_EPREFIX%/}
+ fi
+elif [ -n "${SYSROOT+x}" ] ; then
+ # Generic
+ : ${PKG_CONFIG_SYSROOT_DIR=${SYSROOT}}
+elif [ "@CROSS_PKG_CONFIG_INSTALLED@" = "installed" ] ; then
+ # Manual install
+ : ${PKG_CONFIG_SYSROOT_DIR="@CROSS_PKG_CONFIG_PATH@"}
+elif [ -n "${STAGEDIR}" ] ; then
+ # uClinux-dist
+ : ${PKG_CONFIG_SYSROOT_DIR=${STAGEDIR}}
+ PKG_CONFIG_LIBDIR=${UCLINUX_PKG_CONFIG_LIBDIR}
+else
+ # /usr/<target>
+ : ${PKG_CONFIG_SYSROOT_DIR=/usr/${CHOST}}
+
+ if [ -z "${CHOST}" ] || [ ! -d "${PKG_CONFIG_SYSROOT_DIR}" ] ; then
+ error "Need \$ROOT or \$STAGEDIR set first"
fi
fi
-# abort infinite loop due to misconfiguration
-[ "${0##*/}" = "pkg-config" ] && error "aborting infinite loop! (make sure to delete uClinux-dist/tools/pkg-config)"
+
+export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR%/}
+PKG_CONFIG_ESYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}${PREFIX}
#
# Some distributions pollute the pkg-config environment.
@@ -94,20 +114,15 @@ if [ -z "${libdir}" ] ; then
# Fall back to probing the compiler.
libdir=$(realpath "$(${CC:-${CHOST}-gcc} ${CFLAGS} ${LDFLAGS} -print-file-name=pkgconfig)/..")
# Chopping the basename isn't exactly correct, but it's good enough for now.
- libdir=$(basename "${libdir}")
+ libdir=${libdir##*/}
fi
: ${libdir:=lib}
-export PKG_CONFIG_SYSTEM_LIBRARY_PATH="/usr/${libdir}:/${libdir}"
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PREFIX}/usr/${libdir}:${PREFIX}/${libdir}"
#
# Set the pkg-config search paths to our staging directory.
#
-export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/${libdir}/pkgconfig:${SYSROOT}/usr/share/pkgconfig"
-if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
- PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
-fi
-: ${PKG_CONFIG_SYSROOT_DIR=${SYSROOT}}
-export PKG_CONFIG_SYSROOT_DIR
+PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR}${PKG_CONFIG_LIBDIR:+:}${PKG_CONFIG_ESYSROOT_DIR}/usr/${libdir}/pkgconfig:${PKG_CONFIG_ESYSROOT_DIR}/usr/share/pkgconfig"
#
# Sanity check the output to catch common errors that do not
@@ -118,20 +133,20 @@ ret=$?
# We turn the output into a newline separate string of options, then use grep
# to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things
-# outside the ${SYSROOT}.
-bad_lines=$(echo "${output}" | # Get the pkg-config output.
- tr -s ' ' '\n' | # Put each flags on its own line.
- grep '^-[LI]' | # Find all -I and -L lines.
- grep -v -E "..${SYSROOT}" # Find all things outside the SYSROOT.
- )
+# outside the ${PKG_CONFIG_ESYSROOT_DIR}.
+bad_lines=$(
+ printf "%s\n" ${output} | # Put each flags on its own line.
+ grep '^-[LI]' | # Find all -I and -L lines.
+ grep -v "^..${PKG_CONFIG_ESYSROOT_DIR}" # Find all things outside the sysroot.
+)
if [ -n "${bad_lines}" ] ; then
warn "### falling down so here is a dump state ######"
pkg-config --debug "$@" 1>&2
warn "### end of dump ###############################"
warn "### suspicious compile flags dumped here ######"
- echo "${bad_lines}"
+ printf "%s\n" "${bad_lines}"
warn "### end of flag dump ##########################"
error "host -I or -L paths detected: ${output}"
fi
-[ -n "${output}" ] && echo "${output}"
+[ -n "${output}" ] && printf "%s\n" "${output}"
exit ${ret}
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2023-06-16 20:21 Mike Gilbert
0 siblings, 0 replies; 43+ messages in thread
From: Mike Gilbert @ 2023-06-16 20:21 UTC (permalink / raw
To: gentoo-commits
commit: 54839f5869b46c727c43f247e421b1f9e32704d4
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 18:17:34 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 18:17:34 2023 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=54839f58
Avoid calling portageq from Makefile
It is probably better to look up the repo path at runtime anyway.
Bug: https://bugs.gentoo.org/908602
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
wrappers/Makefile | 4 +---
wrappers/emerge-wrapper | 3 ++-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/wrappers/Makefile b/wrappers/Makefile
index 031f099..a55c2bc 100644
--- a/wrappers/Makefile
+++ b/wrappers/Makefile
@@ -1,9 +1,8 @@
-# Copyright 2008-2010 Gentoo Foundation
+# Copyright 2008-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
include ../settings.mk
-PORTDIR ?= $(shell portageq envvar PORTDIR)
FNAMES = cross-ebuild cross-emerge cross-fix-root cross-pkg-config emerge-wrapper
SITEDIR = $(PREFIX)/share/crossdev/include/site
ETC_SITEDIR = $(EPREFIX)/etc/crossdev/include/site
@@ -24,6 +23,5 @@ install:
sed -i -e s:@SITEDIR@:$(SITEDIR):g $(DESTDIR)$(SITEDIR)/config.site
sed -i -e s:@ETC_SITEDIR@:$(ETC_SITEDIR):g $(DESTDIR)$(SITEDIR)/config.site
mv $(DESTDIR)$(SITEDIR)/config.site $(DESTDIR)$(PREFIX)/share/
- ln -sf $(PORTDIR)/profiles/embedded $(DESTDIR)$(PREFIX)/share/crossdev/etc/portage/make.profile
.PHONY: all install
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 051948a..87dcb00 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2010 Gentoo Foundation
+# Copyright 2008-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
if [[ $1 == "--help" || $1 == "-h" ]] ; then
@@ -37,6 +37,7 @@ cross_wrap_etc()
setup_warning=false
cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
+ ln -snf "${MAIN_REPO_PATH}/profiles/embedded" "${SYSROOT}/etc/portage/make.profile" || return 1
local confs=(
${SYSROOT}/etc/portage/make.conf
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2023-09-23 12:56 Sam James
0 siblings, 0 replies; 43+ messages in thread
From: Sam James @ 2023-09-23 12:56 UTC (permalink / raw
To: gentoo-commits
commit: d57c266058fcfd2bc3f535a832ab86efde3fb0ab
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 20 07:59:29 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 23 12:56:09 2023 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=d57c2660
cross-pkg-config: Properly set PKG_CONFIG_SYSTEM_*_PATH variables
Perhaps this was a difference between pkg-config and pkgconf, but we
have not set PKG_CONFIG_SYSTEM_LIBRARY_PATH correctly since we began
setting it in 2014. It should include the SYSROOT. We also never set
PKG_CONFIG_SYSTEM_INCLUDE_PATH at all.
These variables tell pkg-config not to emit paths that the toolchain
would search in anyway. This helps to reduce the noise appearing in
newly-installed .pc files.
This change does assume that if you have set SYSROOT differently to the
toolchain's default, then you have also added the --sysroot argument to
your compiler flags. Neither Portage nor Gentoo currently do this for
you. cross-boss does, but it's not an officially supported solution. The
change could therefore potentially break things, but it's likely you'll
run into other problems if you don't add --sysroot anyway.
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Closes: https://github.com/gentoo/crossdev/pull/13
Signed-off-by: Sam James <sam <AT> gentoo.org>
wrappers/cross-pkg-config | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 4e4da92..ba4d3ac 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -118,7 +118,9 @@ if [ -z "${libdir}" ] ; then
libdir=${libdir##*/}
fi
: ${libdir:=lib}
-export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PREFIX}/usr/${libdir}:${PREFIX}/${libdir}"
+export \
+ PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_ESYSROOT_DIR}/usr/${libdir}:${PKG_CONFIG_ESYSROOT_DIR}/${libdir}" \
+ PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_ESYSROOT_DIR}/usr/include"
#
# Set the pkg-config search paths to our staging directory.
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2023-10-15 4:23 Matt Turner
0 siblings, 0 replies; 43+ messages in thread
From: Matt Turner @ 2023-10-15 4:23 UTC (permalink / raw
To: gentoo-commits
commit: 7392a9387240d86af931b517178ff657453ac4d6
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 13 18:51:33 2023 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Oct 15 04:23:17 2023 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=7392a938
cross-pkg-config: Set PKG_CONFIG_FDO_SYSROOT_RULES=1
When cross-compiling, pkgconf behaves in a way that causes many packages
to install files to ${SYSROOT}/${SYSROOT}/... without
PKG_CONFIG_FDO_SYSROOT_RULES set.
I'm aware of at least gobject-introspection, modemmanager, and libp11,
but there are likely more.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
wrappers/cross-pkg-config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index ba4d3ac..eb4047f 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -95,6 +95,9 @@ fi
export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR%/}
PKG_CONFIG_ESYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}${PREFIX}
+# https://github.com/pkgconf/pkgconf/issues/205
+export PKG_CONFIG_FDO_SYSROOT_RULES=1
+
#
# Some distributions pollute the pkg-config environment.
# Time to pull a captain planet on them.
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2024-01-08 14:28 Sam James
0 siblings, 0 replies; 43+ messages in thread
From: Sam James @ 2024-01-08 14:28 UTC (permalink / raw
To: gentoo-commits
commit: 40d924aafe602583a23aa3212528ca3d528c5b2c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 8 14:27:31 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 8 14:27:31 2024 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=40d924aa
cross-{ebuild,emerge}: improve error message for missing SYSROOT
This can happen if you rm -rf the SYSROOT (rather than crossdev -C).
Signed-off-by: Sam James <sam <AT> gentoo.org>
wrappers/cross-ebuild | 7 ++++++-
wrappers/cross-emerge | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/wrappers/cross-ebuild b/wrappers/cross-ebuild
index 6f47cb8..a520e18 100644
--- a/wrappers/cross-ebuild
+++ b/wrappers/cross-ebuild
@@ -19,11 +19,16 @@ fi
: ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}}
export EPREFIX SYSROOT PORTAGE_CONFIGROOT
-if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
+if [ -z "${CHOST}" ] ; then
echo "cross-ebuild: CHOST is not set properly"
exit 1
fi
+if [ ! -d "${SYSROOT}" ] ; then
+ echo "cross-ebuild: ${SYSROOT} does not exist (is CHOST set properly?)"
+ exit 1
+fi
+
# Portage defaults CBUILD to CHOST, so we have to remove CHOST
# from the env to get a "good" value for CBUILD
query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS"
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index a85d41e..eb2d5b5 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -19,11 +19,16 @@ fi
: ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}}
export EPREFIX SYSROOT PORTAGE_CONFIGROOT
-if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
+if [ -z "${CHOST}" ] ; then
echo "cross-emerge: CHOST is not set properly"
exit 1
fi
+if [ ! -d "${SYSROOT}" ] ; then
+ echo "cross-emerge: ${SYSROOT} does not exist (is CHOST set properly?)"
+ exit 1
+fi
+
# Portage defaults CBUILD to CHOST, so we have to remove CHOST
# from the env to get a "good" value for CBUILD
query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS"
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2024-05-04 11:58 Sam James
0 siblings, 0 replies; 43+ messages in thread
From: Sam James @ 2024-05-04 11:58 UTC (permalink / raw
To: gentoo-commits
commit: 1a15a8788a72f6649636a52b468e0e8d440b7e1b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 4 11:58:47 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 4 11:58:47 2024 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=1a15a878
wrappers/README: update config.site path
Signed-off-by: Sam James <sam <AT> gentoo.org>
wrappers/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrappers/README b/wrappers/README
index 0ff42ac..9fdb2ae 100644
--- a/wrappers/README
+++ b/wrappers/README
@@ -1,2 +1,2 @@
Drop here your local overrides for autoconf cache variables.
-See @PREFIX@/share/config.site for details.
+See @PREFIX@/share/config.site.d/80crossdev.conf for details.
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-commits] proj/crossdev:master commit in: wrappers/
@ 2024-09-22 8:35 James Le Cuirot
0 siblings, 0 replies; 43+ messages in thread
From: James Le Cuirot @ 2024-09-22 8:35 UTC (permalink / raw
To: gentoo-commits
commit: a1f5ed5e8f866cd904e439b3792ac7505895f7f3
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 21 21:35:27 2024 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Sep 21 21:48:40 2024 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=a1f5ed5e
cross-pkg-config: Don't unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS/LIBS
These variables control whether pkg-config returns flags to search
directories that the toolchain would search by default anyway. Rust's
pkg-config-rs enables them by default, and some crates expect flags to
always be returned, even if they are technically unnecessary. Unsetting
these variables in the wrapper therefore breaks some crates. Having seen
how this works in detail, it would be fruitless to ask upstream to
change it.
These lines were originally added at a time when we expected other
non-Gentoo-based distributions to use crossdev. That didn't happen.
Gentoo itself doesn't set these variables anywhere that I can see. Even
if they were set, they are unlikely to break anything in practise now
that our cross builds are better behaved than they used to be.
Bug: https://bugs.gentoo.org/939334
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
wrappers/cross-pkg-config | 2 --
1 file changed, 2 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index eb4047f..9bff474 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -103,8 +103,6 @@ export PKG_CONFIG_FDO_SYSROOT_RULES=1
# Time to pull a captain planet on them.
#
unset PKG_CONFIG_PATH
-unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
-unset PKG_CONFIG_ALLOW_SYSTEM_LIBS
#
# Try and figure out the appropriate libdir for this target.
^ permalink raw reply related [flat|nested] 43+ messages in thread
end of thread, other threads:[~2024-09-22 8:35 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17 8:09 [gentoo-commits] proj/crossdev:master commit in: wrappers/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2024-09-22 8:35 James Le Cuirot
2024-05-04 11:58 Sam James
2024-01-08 14:28 Sam James
2023-10-15 4:23 Matt Turner
2023-09-23 12:56 Sam James
2023-06-16 20:21 Mike Gilbert
2022-12-27 16:06 Sam James
2022-08-18 21:57 Sam James
2022-08-18 21:57 Sam James
2022-01-13 8:20 Mike Frysinger
2022-01-13 8:20 Mike Frysinger
2021-11-26 19:02 Mike Frysinger
2021-10-27 8:55 Mike Frysinger
2021-06-21 21:23 Sergei Trofimovich
2019-08-30 7:32 Sergei Trofimovich
2019-07-21 13:41 James Le Cuirot
2019-07-12 7:24 Sergei Trofimovich
2019-03-18 22:54 Sergei Trofimovich
2019-03-11 22:13 Sergei Trofimovich
2018-10-20 20:08 Sergei Trofimovich
2018-04-05 6:56 Sergei Trofimovich
2018-03-24 15:13 Sergei Trofimovich
2018-03-10 13:07 Sergei Trofimovich
2017-12-30 22:37 Sergei Trofimovich
2017-12-30 17:45 Sergei Trofimovich
2016-01-16 8:22 Mike Frysinger
2015-07-23 3:47 Mike Frysinger
2014-10-31 1:56 Mike Frysinger
2014-10-31 1:56 Mike Frysinger
2014-10-31 0:52 Mike Frysinger
2014-09-18 16:52 Mike Frysinger
2014-09-17 21:41 Mike Frysinger
2014-09-17 21:41 Mike Frysinger
2014-07-29 6:07 ` Mike Frysinger
2014-09-17 21:41 Mike Frysinger
2014-07-29 6:07 ` Mike Frysinger
2014-03-27 6:43 Mike Frysinger
2014-01-18 19:37 Mike Frysinger
2013-12-23 3:06 Mike Frysinger
2013-01-28 22:51 Mike Frysinger
2012-02-27 23:13 Mike Frysinger
2011-10-18 17:36 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox