summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/flag-o-matic.eclass4
-rw-r--r--eclass/postgres-multi.eclass6
-rw-r--r--eclass/postgres.eclass4
-rw-r--r--eclass/toolchain-funcs.eclass10
-rw-r--r--eclass/usr-ldscript.eclass2
5 files changed, 13 insertions, 13 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 365741a6dddf..a4e8f19e0071 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -986,7 +986,7 @@ append-atomic-flags() {
# fails because -latomic is actually needed or if we have a
# broken toolchain (like due to bad FLAGS)
read -r -d '' code <<- EOF
- int main()
+ int main(void)
{
return 0;
}
@@ -1007,7 +1007,7 @@ append-atomic-flags() {
# https://github.com/buildroot/buildroot/commit/6856e417da4f3aa77e2a814db2a89429af072f7d
read -r -d '' code <<- EOF
#include <stdint.h>
- int main()
+ int main(void)
{
uint$((${bytesize} * 8))_t a = 0;
__atomic_add_fetch(&a, 3, __ATOMIC_RELAXED);
diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index c73f33c71b49..9dcf22e64a12 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
inherit multibuild postgres
@@ -58,7 +58,7 @@ export _POSTGRES_INTERSECT_SLOTS=( )
_postgres-multi_multibuild_wrapper() {
debug-print-function ${FUNCNAME} "${@}"
export PG_SLOT=${MULTIBUILD_VARIANT}
- export PG_CONFIG=$(which pg_config${MULTIBUILD_VARIANT//./})
+ export PG_CONFIG=$(type -P pg_config${MULTIBUILD_VARIANT//./})
if [[ -n ${PKG_CONFIG_PATH} ]] ; then
PKG_CONFIG_PATH="$(${PG_CONFIG} --libdir)/pkgconfig:${PKG_CONFIG_PATH}"
else
@@ -139,7 +139,7 @@ postgres-multi_src_prepare() {
# Portage, but won't be caught by /usr/bin/ebuild)
local slot
for slot in ${_POSTGRES_INTERSECT_SLOTS[@]} ; do
- if [[ -z $(which pg_config${slot/.} 2> /dev/null) ]] ; then
+ if [[ -z $(type -P pg_config${slot/.} 2> /dev/null) ]] ; then
eerror
eerror "postgres_targets_postgres${slot/.} use flag is enabled, but hasn't been emerged."
eerror
diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass
index 3ae1c49adc68..8e204e2ade8c 100644
--- a/eclass/postgres.eclass
+++ b/eclass/postgres.eclass
@@ -106,7 +106,7 @@ postgres_check_slot() {
fi
# Don't die because we can't run postgresql-config during pretend.
- [[ "$EBUILD_PHASE" = "pretend" && -z "$(which postgresql-config 2> /dev/null)" ]] \
+ [[ "$EBUILD_PHASE" = "pretend" && -z "$(type -P postgresql-config 2> /dev/null)" ]] \
&& return 0
if has $(postgresql-config show 2> /dev/null) "${POSTGRES_COMPAT[@]}"; then
@@ -148,7 +148,7 @@ postgres_pkg_setup() {
fi
export PG_SLOT=${best_slot}
- export PG_CONFIG=$(which pg_config${best_slot//./})
+ export PG_CONFIG=$(type -P pg_config${best_slot//./})
local pg_pkg_config_path="$(${PG_CONFIG} --libdir)/pkgconfig"
if [[ -n "${PKG_CONFIG_PATH}" ]]; then
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 32e446cb2368..a184887ad3b9 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -466,7 +466,7 @@ tc-ld-is-gold() {
# options and not CFLAGS/CXXFLAGS.
local base="${T}/test-tc-gold"
cat <<-EOF > "${base}.c"
- int main() { return 0; }
+ int main(void) { return 0; }
EOF
out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
rm -f "${base}"*
@@ -499,7 +499,7 @@ tc-ld-is-lld() {
# options and not CFLAGS/CXXFLAGS.
local base="${T}/test-tc-lld"
cat <<-EOF > "${base}.c"
- int main() { return 0; }
+ int main(void) { return 0; }
EOF
out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
rm -f "${base}"*
@@ -538,7 +538,7 @@ tc-ld-force-bfd() {
# to its value (like multilib). #545218
local ld=$(tc-getLD "$@")
local bfd_ld="${ld%% *}.bfd"
- local path_ld=$(which "${bfd_ld}" 2>/dev/null)
+ local path_ld=$(type -P "${bfd_ld}" 2>/dev/null)
[[ -e ${path_ld} ]] && export LD=${bfd_ld}
# Set up LDFLAGS to select bfd based on the gcc / clang version.
@@ -583,7 +583,7 @@ _tc-has-openmp() {
local base="${T}/test-tc-openmp"
cat <<-EOF > "${base}.c"
#include <omp.h>
- int main() {
+ int main(void) {
int nthreads, tid, ret = 0;
#pragma omp parallel private(nthreads, tid)
{
@@ -1083,7 +1083,7 @@ gen_usr_ldscript() {
# If they're using gold, manually invoke the old bfd. #487696
local d="${T}/bfd-linker"
mkdir -p "${d}"
- ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld
+ ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld
flags+=( -B"${d}" )
fi
output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
diff --git a/eclass/usr-ldscript.eclass b/eclass/usr-ldscript.eclass
index a8229ed2ac2e..c821abd60846 100644
--- a/eclass/usr-ldscript.eclass
+++ b/eclass/usr-ldscript.eclass
@@ -70,7 +70,7 @@ gen_usr_ldscript() {
# If they're using gold, manually invoke the old bfd. #487696
local d="${T}/bfd-linker"
mkdir -p "${d}"
- ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld
+ ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld
flags+=( -B"${d}" )
fi
output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')